Skip to Content
Speech to text

Transcribe an audio file

Permissioninference-stt:createAdd-onInferenceRetriesIdempotency-Key identifies the computationAuthentication
POST
/inference/audio/transcriptions

Transcribes an uploaded audio file. Accepts PCM16 mono 16 kHz WAV, up to the model's published limit and at most 300 seconds.

What you are charged

The accepted input duration, once the request is dispatched — including a partial failure. A refusal before dispatch releases the reservation. Audio and transcript content are not retained by the usage ledger.

Reusing an Idempotency-Key returns 409 rather than transcribing again.

See file transcription.

Authorization

inferenceBearerAuth
headerAuthorizationBearer <token>

Use an Inference API key. Access and keys.

Header Parameters

Idempotency-Key*string

Identifies one computation. Reuse returns 409 inference_request_exists; results are not replayed. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

multipart/form-data
  1. body
model*string
Length1 <= length <= 80
file*file

PCM16 mono 16 kHz WAV. Up to 300 seconds, bounded by the published model.

Formatbinary
language?string
Default"ar"
Value in"ar""en""auto"

Response Body

Transcribe an audio file

application/json
  1. response
text*string
language*string

Language the model reports. It echoes the requested language, and returns unklang when the request asked for auto.

duration_ms*integer
Range1 <= value
request_id*string
Formatuuid
model*string
Example Request
curl -X POST 'https://api.kejue.co/v1/inference/audio/transcriptions' \  -H 'Idempotency-Key: string' \  -F 'model=string' \  -F 'file=string'
Example Response
{  "text": "string",  "language": "string",  "duration_ms": 1,  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "model": "string"}