POST
/
v2
/
transcription
curl --request POST \
  --url https://api.gladia.io/v2/transcription \
  --header 'Content-Type: application/json' \
  --header 'x-gladia-key: <api-key>' \
  --data '{
  "context_prompt": "<string>",
  "custom_vocabulary": [
    "<string>"
  ],
  "detect_language": true,
  "enable_code_switching": true,
  "language": "en",
  "callback_url": "http://callback.example",
  "subtitles": true,
  "subtitles_config": {
    "formats": [
      "srt"
    ]
  },
  "diarization": true,
  "diarization_config": {
    "number_of_speakers": 2,
    "min_speakers": 1,
    "max_speakers": 2
  },
  "translation": true,
  "translation_config": {
    "target_languages": [
      "en"
    ],
    "model": "base"
  },
  "summarization": true,
  "summarization_config": {
    "type": "general"
  },
  "moderation": true,
  "audio_to_llm": true,
  "audio_to_llm_config": {
    "prompts": [
      "Extract the key points from the transcription"
    ]
  },
  "custom_metadata": {},
  "sentences": true,
  "audio_url": "http://files.gladia.io/example/audio-transcription/split_infinity.wav"
}'
{
  "id": "45463597-20b7-4af7-b3b3-f5fb778203ab",
  "result_url": "https://api.gladia.io/v2/transcription/45463597-20b7-4af7-b3b3-f5fb778203ab"
}

Authorizations

x-gladia-key
string
headerrequired

Your personal Gladia API key

Body

application/json
context_prompt
string

Context to feed the transcription model with for possible better performance

custom_vocabulary
string[]

Specific vocabulary list to feed the transcription model with

detect_language
boolean
default: true

Detect the language from the given audio

enable_code_switching
boolean
default: false

Detect multiple languages in the given audio

language
enum<string>

Set the spoken language for the given audio

Available options:
af,
sq,
am,
ar,
hy,
as,
az,
ba,
eu,
be,
bn,
bs,
br,
bg,
ca,
zh,
hr,
cs,
da,
nl,
en,
at,
fo,
fi,
fr,
gl,
ka,
de,
el,
gu,
ht,
ha,
haw,
he,
hi,
hu,
is,
id,
it,
jp,
jv,
kn,
kk,
km,
ko,
lo,
la,
lv,
ln,
lt,
lb,
mk,
mg,
ms,
ml,
mt,
mi,
mr,
mn,
mymr,
ne,
no,
nn,
oc,
ps,
fa,
pl,
pt,
pa,
ro,
ru,
sa,
sr,
sn,
sd,
si,
sk,
sl,
so,
es,
su,
sw,
sv,
tl,
tg,
ta,
tt,
te,
th,
bo,
tr,
tk,
uk,
ur,
uz,
vi,
cy,
yi,
yo
callback_url
string

Callback URL we will do a POST request to with the result of the transcription

subtitles
boolean
default: false

Enable subtitles generation for this transcription

subtitles_config
object

Configuration for subtitles generation if subtitles is enabled

diarization
boolean
default: false

Enable speaker recognition (diarization) for this audio

diarization_config
object

Speaker recognition configuration, if diarization is enabled

translation
boolean
default: false

Enable translation for this audio

translation_config
object

Translation configuration, if translation is enabled

summarization
boolean
default: false

Enable summarization for this audio

summarization_config
object

Summarization configuration, if summarization is enabled

moderation
boolean
default: false

Enable moderation for this audio

audio_to_llm
boolean
default: false

Enable audio to llm processing for this audio

audio_to_llm_config
object

Audio to llm configuration, if audio_to_llm is enabled

custom_metadata
object

Custom metadata you can attach to this transcription

sentences
boolean
default: false

Enable sentences for this audio

audio_url
string
required

URL to a Gladia file or to an external audio or video file

Response

201 - application/json
id
string
required

id of your transcription request

result_url
string
required

Prebuilt URL with your transcription id to fetch the result