Transcribe a recording (OpenAI-compatible)

POSThttps://api.paxalabs.com/v1/audio/transcriptions

POST /v1/audio/transcriptions serves the OpenAI audio.transcriptions request shape. The recording rides as a multipart file part, and response_format returns JSON, plain text, SubRip, or WebVTT.

View as Markdown
# The recording rides as a file part; nothing is base64 encoded.
curl -X POST https://api.paxalabs.com/v1/audio/transcriptions \
  --max-time 300 \
  -H "Authorization: Bearer $PAXA_API_KEY" \
  -F [email protected] \
  -F model=paxa-stt-lite-v1-preview \
  -F response_format=srt \
  -o meeting.srt

Point an OpenAI SDK at https://api.paxalabs.com/v1 and call audio.transcriptions.create. Pricing, ceilings, and refunds match POST /v1/stt, which is also where the transcript conventions, speaker turns, word timing, and the vocabulary live: this alias reads none of them. The OpenAI compatibility guide covers the field mapping.

Headers#

authorizationBearer pxa_...Required

Authorization: Bearer pxa_... (recommended).

x-api-keypxa_...

Alternative to the Authorization header. Ignored when Authorization is present.

idempotency-keystring

Makes a retry safe. Two requests carrying the same key charge once and synthesize the same content. One request per key runs at a time. A concurrent duplicate answers 409 idempotency_in_flight. Reuse a key only to retry an identical request. A changed payload is rejected with 422. Accepts up to 200 printable ASCII characters.

1 to 200 characterspattern ^[!-~]+$

Authentication

Body#

filefileRequired

The recording, as a file part. MP3, WAV (PCM), FLAC, Ogg (Opus or Vorbis), M4A, AAC (ADTS), or WebM; the format and the length are read from the bytes. The part's filename and content type are ignored. Same ceilings, pricing, and refusals as the audio field on POST /v1/stt: up to 60 minutes and 26,214,400 bytes.

modelstringRequired

Transcription model id, for example paxa-stt-lite-v1-preview. OpenAI's own model names are not served and answer 400.

1 to 100 charactersExample "paxa-stt-lite-v1-preview"
languagestring

The same field OpenAI defines. A BCP 47 tag the recording is expected to be in, such as "th". A hint that filters nothing. Omitted, the model detects the language itself.

up to 16 characterspattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$Example "th"
response_format"json" or "text" or "srt" or "vtt"

What the response body carries. "json" (the default) answers application/json with the transcript in a text field. "text" answers text/plain with the transcript alone. "srt" and "vtt" answer the subtitle file, cut the same way POST /v1/stt cuts it, at 60 characters a line. OpenAI's verbose_json is not served and answers 400. Every format is billed the same, by the recording's length.

Default "json"

Response#

The transcribed recording, in OpenAI's shape. Returned when response_format is "json" or absent.

textstringRequired

The transcript, verbatim in the language spoken. Empty when the recording carried no speech.

Errors#

400validationThe request body or headers failed validation against the endpoint schema.
400unknown_modelThe model field does not name a served model.
400audio_invalidThe audio field could not be read as an MP3, WAV, FLAC, Ogg, M4A, AAC, or WebM recording, or its length could not be read from the container. A damaged or truncated file answers this code. Nothing was charged.
413audio_too_largeThe decoded recording exceeds the model's size ceiling. Nothing was charged.
400audio_too_longThe recording is longer than the model's per-request ceiling. Nothing was charged.
401unauthorizedThe request carried no API key, or the key is invalid or disabled.
402insufficient_creditsThe account does not have enough credits for this request. Nothing was charged.
403key_limitThis API key reached its spending cap. Nothing was charged.
409idempotency_in_flightAnother request with this Idempotency-Key is in flight right now.
409idempotency_refundedThe original request under this Idempotency-Key failed and was refunded.
422idempotency_mismatchThis Idempotency-Key was already used for a different request.
422content_blockedThe upstream safety system declined to process this content. The charge was refunded.
429rate_limitedRequests per minute for the plan are exhausted. One window covers the whole account, across every product and every key.
429concurrency_limitedThe account holds the plan's full count of concurrent requests for this product. Nothing was charged. Each product is limited separately, and an open live connection holds one speech slot.
500internalRequest state was inconsistent on the server.
502provider_errorModel inference failed after the request was charged.
503provider_unavailableThe model behind this endpoint is not available right now. Nothing was charged.