Transcriptions
Transcribe audio into text with automatic language detection.
Transcribe audio into text. The endpoint mirrors OpenAI's
audio.transcriptions.create so any OpenAI SDK works out of the box - just
point baseURL at https://api.aivene.com/v1.
POST /v1/audio/transcriptionsAuthentication
AuthorizationBearerrequiredAPI key as bearer token in the Authorization header. Create keys at
Manage API Keys.
Headers
Content-TypestringrequiredMust be multipart/form-data.
Body
fileFileoptionalAudio file to transcribe. Supported formats: flac, mp3, mp4, mpeg,
mpga, m4a, ogg, wav, webm.
urlstringoptionalPublic URL of an audio file to fetch. Send either file or url; if
you send both, file is used.
modelstringrequiredTranscription model id from GET /v1/models.
languagestringoptionalISO-639-1 language code (e.g. en, ja, es). Improves accuracy when
specified.
promptstringoptionalOptional text to guide the model's style or continue a previous segment.
response_formatstringoptionalDefault jsonOutput format. verbose_json includes word-level timestamps.
jsontextverbose_jsontemperaturenumberoptionalDefault 0Sampling temperature between 0 and 1. Lower is more deterministic.
timestamp_granularitiesstring[]optionalTimestamp detail level. Only with response_format: 'verbose_json'.
wordsegmentFile or URL
Provide file (multipart upload) or url (remote fetch). A request with
neither is rejected with 400. If you send both, file is used and url
is ignored.
Response
textstringoptionalThe transcribed text.
languagestringoptionalDetected or specified language code.
durationnumberoptionalAudio duration in seconds (verbose_json only).
wordsWord[]optionalWord-level timestamps (verbose_json with timestamp_granularities: ['word']).
segmentsSegment[]optionalSegment-level data with timestamps (verbose_json only).
Example
curl https://api.aivene.com/v1/audio/transcriptions \
-H "Authorization: Bearer $AIVENE_API_KEY" \
-F "[email protected]" \
-F "model=whisper-large-v3-turbo" \
-F "response_format=json"Response:
{
"text": "Hello, this is a test recording."
}Verbose response
{
"text": "Hello, this is a test recording.",
"language": "en",
"duration": 3.5,
"segments": [
{
"id": 0,
"start": 0.0,
"end": 3.5,
"text": "Hello, this is a test recording."
}
]
}Errors
All errors share one shape:
{ "error": { "message": "...", "type": "invalid_request_error" } }| Status | error.type | Meaning |
|---|---|---|
400 | validation_error | The body failed schema validation. The message names the offending field. |
400 | invalid_request_error | Unknown model, a model not available on this endpoint, or audio the model cannot read. |
401 | authentication_error | Missing or invalid API key. |
402 | invalid_request_error | Not enough credit for the request, an unpaid balance, or a spend limit was reached. |
403 | permission_denied_error | The account is suspended, an Admin key was used, or the model isn't included in your organization's tier. |
404 | not_found_error | The model is deprecated. The message names its replacement. |
408 | timeout_error | The model did not finish before the request timed out. |
429 | rate_limit_error | Your organization hit its rate limit for this model. Back off and retry. |
500 | internal_server_error | Unexpected server error. |
502 / 503 | upstream_error | The model is temporarily unavailable. Safe to retry. |
When the model itself rejects a request, the response keeps the model's
4xx status with type upstream_error or invalid_request_error, and
error.code names the cause when it is known (context_length_exceeded,
content_filter, request_too_large).