For the complete documentation index, see llms.txt. This page is also available as Markdown.

Audio

Audio Transcriptions

post

Transcribes audio into the input language.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
filestringRequired

The audio file object (not file name) to transcribe, in one of these formats: mp3 or wav.

modelstringRequired

ID of the model to use. Call /v1/models endpoint to get the list of available models, only automatic-speech-recognition model type is supported.

languagestring · enum · nullableOptional

The language of the output audio. If the output language is different than the audio language, the audio language will be translated into the output language. Output language must be supplied in ISO-639-1 format (e.g. en, fr) format.

Possible values:
promptstringOptional

An optional text to tell the model what to do with the input audio.

Default: ""
response_formatstring · enumOptional

The format of the transcript output: json (default), text, diarized_json to return per-segment speaker labels, srt or vtt for subtitle formats.

Default: jsonPossible values:
temperaturenumber · max: 1Optional

The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.

Default: 0
Responses
200

Successful Response

application/json
idstringRequired

A unique identifier for the audio transcription.

textstringRequired

The transcription text.

modelstringRequired

The model used to generate the transcription.

Other propertiesanyOptional
post/v1/audio/transcriptions
POST /v1/audio/transcriptions HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 99

{
  "file": "text",
  "model": "text",
  "language": "af",
  "prompt": "",
  "response_format": "json",
  "temperature": 0
}
{
  "id": "text",
  "text": "text",
  "model": "text",
  "segments": [
    {
      "id": 1,
      "type": "transcript.text.segment",
      "text": "text",
      "start": 1,
      "end": 1,
      "speaker": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0,
    "cost": 0,
    "impacts": {
      "kWh": 0,
      "kgCO2eq": 0,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "requests": 0,
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Last updated

Was this helpful?