Skip to content
API referenceCreate a transcription

Create a transcription

POST/v1/audio/transcriptions

Create a transcription.

Compatible with OpenAI's create-transcription endpoint: upload an audio file as multipart/form-data and get its text back. The provider is the one behind your credential; Sarvam and ElevenLabs answers are returned in the same shape. The file must have an audio/* content type and be at most 25 MB (1 GB on ElevenLabs), else a 400. With stream=true the response is a text/event-stream of the provider's transcription events (OpenAI only; another provider is a 501).

Authenticate with a BYOK virtual key or with x-provider and x-api-key; a PLATFORM virtual key is a 400. The key's checks, the plan's limits and the organization's approved-provider policy (403) apply. The call is priced on the audio's duration (the audio_duration_seconds you send, else the duration the provider reports) and the cost is in the x-operation-cost-usd response header. Without x-retry-count a failed call is retried up to 3 times on 429 and 5xx; a stream is not retried.

Authorization

  • AuthorizationBearer <slug>.<secret>

    A virtual key's API key (vk-....<secret>), as Authorization: Bearer. What the OpenAI SDK sends from its api_key. Used by the inference endpoints.

  • orx-virtual-keyheader

    A virtual key's API key in the x-virtual-key header, for clients that keep Authorization for something else.

  • orx-api-keyheader

    Direct credentials: the provider's own API key in x-api-key, with the provider named in x-provider (for example openai). On /v1/messages a virtual key is accepted in x-api-key too, which is what the Claude SDK sends.

Headers

  • x-providerstring

    With direct credentials: the provider x-api-key belongs to, for example openai or anthropic (case and dashes are normalised). Not used with a virtual key.

  • x-retry-countinteger<int32>

    How many times to retry a failed provider call, 0 to 5. Without the header, chat completions, Claude Messages and prompt completions do not retry, and the other endpoints retry up to 3 times. Retries back off exponentially from 1 second and honour a numeric Retry-After. The number made is in the x-retry-count response header.

  • x-retry-status-codesstring

    Comma-separated provider status codes to retry on. Default 429,500,502,503,504,529.

Request body multipart/form-data

  • filestring<binary>required

    the file to upload

  • modelstringrequired

    the model, for example whisper-1 or gpt-4o-transcribe

  • languagestring

    the audio's language as an ISO-639-1 code, for example en; optional

  • promptstring

    text to guide the model's style or continue a previous segment; optional

  • response_formatstring

    json (the default) or verbose_json, which adds the language, duration, segments and words (transcriptions only)

  • temperaturestring

    sampling temperature from 0 to 1; optional

  • timestamp_granularitiesstring

    word or segment, with verbose_json: the timestamps to include

  • audio_duration_secondsstring

    the audio's length in seconds, used to price the call when the provider does not report it (always on a stream); optional

  • streamstring

    true to stream the transcription as server-sent events; default false

Responses

200application/json

The transcription, or a stream of transcription events with stream=true

  • textstringrequired

    The transcribed text.

  • languagestring

    The detected or given language of the audio. With verbose_json only.

  • durationnumber<float>

    The audio's length, in seconds. With verbose_json only.

  • segmentsobject[]

    The transcription split into timed segments. With verbose_json and segment timestamps only.

    Child attributes
    • idinteger<int32>

      The segment's index, from 0.

    • seekinteger<int32>

      The seek offset of the segment, in the model's audio frames.

    • startnumber<float>

      When the segment starts, in seconds from the beginning of the audio.

    • endnumber<float>

      When the segment ends, in seconds from the beginning of the audio.

    • textstring

      The segment's text.

    • tokensinteger<int32>[]

      The token ids of the segment's text.

    • temperaturenumber<float>

      The sampling temperature used for this segment.

    • avg_logprobnumber<float>

      The average log probability of the segment's tokens. Below -1, the segment may be unreliable.

    • compression_rationumber<float>

      The segment's compression ratio. Above 2.4, the text may be repetitive or unreliable.

    • no_speech_probnumber<float>

      The probability, 0 to 1, that the segment contains no speech.

  • wordsobject[]

    Every word with its timing. With verbose_json and timestamp_granularities including word only.

    Child attributes
    • wordstring

      The word as transcribed.

    • startnumber<float>

      When the word starts, in seconds from the beginning of the audio.

    • endnumber<float>

      When the word ends, in seconds from the beginning of the audio.

NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.