Skip to content

Create a job

POST /v2/pre-recorded

Starts transcribing a file with its options; read the job with GET /v2/pre-recorded/{id} until it is done, or get a callback. Jobs run on Gladia Enterprise's own pre-recorded hosts, or on Gladia's standard API (Gladia SaaS, with zero data retention), as the cluster's operator set it; the API is the same either way.

Authentication: your API key in the x-gladia-key header (Authentication).

Example

Terminal window
curl -X POST https://eu1.api.gladia.io/v2/pre-recorded \
-H "x-gladia-key: $GLADIA_API_KEY" \
-H "content-type: application/json" \
-d '{"audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e", "language_config": {"languages": ["en"]}, "diarization": true, "custom_metadata": {"call_id": "42"}}'

Try it

Body

  • language_config object

    languages: the codes the audio may be in (one code fixes it); code_switching: re-detect the language per utterance.

    2 fields
    • languages array of string

      The codes the audio may be in (en, fr...); one code fixes the language. Empty or absent: detected.

      default: null

    • code_switching boolean

      Detect the language again for each utterance (default false).

      default: null

  • model string

    The model, by code name: solaria-1 (the default) or solaria-3, each with its own price. On a cluster whose pre-recorded hosts do not serve solaria-1, a job naming it runs on the model they serve. trantoria-1, solaria-4 and the solaria-2 family are on staging only for now, unbilled, until they have a price: refused with a 400 elsewhere.

    default: null · one of: solaria-1, solaria-3, trantoria-1, solaria-4, solaria-2, solaria-2.1, solaria-2-med-en, solaria-2-med-de, solaria-2-en-dict

  • diarization boolean

    Tell who speaks when (speaker on each utterance).

    default: null

  • diarization_config object

    number_of_speakers, or min_speakers / max_speakers, when known.

    4 fields
    • number_of_speakers integer

      The exact number of speakers, when known.

      default: null · 1 to 100

    • min_speakers integer

      At least this many speakers.

      default: null · 1 to 100

    • max_speakers integer

      At most this many speakers.

      default: null · 1 to 100

    • enhanced boolean

      Gladia's enhanced diarization flag.

      default: null

  • translation boolean

    Translate the transcript.

    default: null

  • translation_config object

    target_languages (required), model, ...

    5 fields
    • target_languages array of string

      The codes to translate into: required when translation is on, and one of the targets this cluster's hosts translate into (x-translation-targets of this document); another is refused with a 400 when the job is created.

      default: null

    • model string

      The translation model: base (the default) or enhanced on Gladia's API, batch on the cluster's own endpoints; the backend refuses one it does not run.

      default: null

    • context_adaptation boolean

      Adapt the translation to context.

      default: null

    • context string

      What the audio is about.

      default: null

    • informal boolean

      Informal forms of address.

      default: null

  • summarization boolean

    Summarize the transcript.

    default: null

  • summarization_config object

    type: general, bullet_points or concise.

    1 fields
    • type string

      The summary's form: general (the default), bullet_points or concise; checked when summarization is on.

      default: null

  • named_entity_recognition boolean

    Find the named entities.

    default: null

  • sentiment_analysis boolean

    Find the sentiment of each sentence.

    default: null

  • sentiment_analysis_config object

    unit: sentence (the default, one result per sentence) or utterance (one per utterance, as the live API); use_audio / emotion_use_audio: fuse the speech profiler's heads (default false = text only, EU AI Act).

    default: null

  • pii_redaction boolean

    Redact personal information from the transcript.

    default: null

  • pii_redaction_config object

    Which entities to redact, and how.

    default: null

    2 fields
    • entity_types array of string

      Presets (GDPR, HIPAA_SAFE_HARBOR, PCI...) and entity types (NAME, PHONE_NUMBER...) to redact, as Gladia's API names them (upper case): only those are redacted, each preset what Gladia's API redacts for it. Omitted or empty: Gladia's API's own default set (no health information). An unknown name is refused with a 400 that names it.

      default: null

    • processed_text_type string

      MARKER: each value replaced by its type and its number, one per value and type in the order first heard ([NAME_1], [EMAIL_ADDRESS_1]); MASK: each character of the value replaced by #, the blanks included (##########).

      default: "MARKER" · one of: MARKER, MASK

  • custom_vocabulary boolean

    Favour your own words and names.

    default: null

  • custom_vocabulary_config object

    vocabulary: the words, default_intensity.

    2 fields
    • vocabulary array of string or object required

      The words to favour: plain strings, or entries with their own intensity.

      4 fields
      • value string required

        The word or name.

      • intensity number

        How much to favour it.

        default: null · 0 to 1

      • pronunciations array of string

        How it may be heard.

        default: null

      • language string

        Its language's code.

        default: null

    • default_intensity number

      The intensity of the plain strings (default 0.5).

      default: null · 0 to 1

  • custom_spelling boolean

    Rewrite words your way.

    default: null

  • custom_spelling_config object

    spelling_dictionary: spelling -> heard forms.

    1 fields
    • spelling_dictionary object required

      Each spelling, with the forms heard that it replaces.

  • subtitles boolean

    Produce subtitles.

    default: null

  • subtitles_config object

    formats (srt, vtt) and their layout.

    6 fields
    • formats array of string

      The formats to produce (default srt).

      default: null

    • minimum_duration number

      A caption's shortest duration, seconds.

      default: null · at least 0

    • maximum_duration number

      A caption's longest duration, seconds.

      default: null · at least 0

    • maximum_characters_per_row integer

      A row's longest length.

      default: null · at least 1

    • maximum_rows_per_caption integer

      A caption's most rows.

      default: null · 1 to 5

    • style string

      compliance: broadcast captioning rules.

      default: null · one of: default, compliance

  • sentences boolean

    Split the transcript into sentences.

    default: null

  • display_mode boolean

    Regroup the transcript into display lines: the words of each utterance, in time order, cut where another speaker's word falls between them.

    default: null

  • punctuation_enhanced boolean

    Finer punctuation.

    default: null

  • name_consistency boolean

    One spelling per name across the transcript (Catherine and Katherine become one).

    default: null

  • adapter string

    A specialised version of the model for a domain or a dialect (medical), decoding the job's language: set it in language_config.languages (medical: en). Refused with a 400 where no model serves it.

    default: null

  • audio_to_llm boolean

    Ask your own prompts about the transcript: each one is answered by the cluster's LLM (audio_to_llm_config.prompts). Where no LLM is connected for it (GET /v2/features addons.audio_to_llm), refused with a 400.

    default: null

  • audio_to_llm_config object

    prompts: what to ask about the transcript.

    default: null

    2 fields
    • prompts array of string

      Your prompts, each asked of the LLM over the transcript (one answer each, in their order): 1 to 10, each up to 4000 characters. Required when audio_to_llm is on.

      default: null · at least 1 item(s)

    • model string

      The LLM model the prompts are asked of, by its code (google/gemini-3.5-flash-lite): one of the models GET /v2/audio-to-llm/models lists for your workspace (any model of your cluster's LLM provider is accepted, that list shows the most used). Omitted: the cluster's default model. Refused (400) until your cluster's operator turns model choice on. Always run by your cluster's own LLM provider, at your workspace's sovereignty level; a model the provider does not serve is a 400. Billed what the provider charges for the job's calls, plus the cluster's markup.

      default: null

  • audio_url string

    The file: an audio_url of POST /v2/upload, the public URL of an audio or video file, or, where the cluster takes them, the URL of an online video page (YouTube, TikTok, Facebook, LinkedIn, ShareChat, Likee): see the documentation's Supported formats and limits page. Exactly one of audio_url and from_session_id.

    default: null

  • from_session_id string

    A live session of yours that ended with its audio recorded: its recording is the file, transcribed again by the pre-recorded pipeline, its live transcript speeding the pass up (the post-call pass of finalization). Exactly one of audio_url and from_session_id.

    default: null

  • callback boolean

    Call callback_config.url when the job ends.

    default: null

  • callback_config object

    Where to call when the job ends.

    default: null

    2 fields
    • url string required

      Your HTTPS endpoint, called when the job ends.

    • method string

      POST or PUT.

      default: "POST" · one of: POST, PUT

  • callback_url string deprecated

    The URL to call when the job ends, Gladia Classic's form of callback with callback_config.url. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. Use callback: true with callback_config.url instead.

    default: null

  • custom_metadata object

    Your own data, returned with the job and its callback, and a filter of the list.

    default: null

  • moderation any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • chapterization any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • structured_data_extraction any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • structured_data_extraction_config any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • speaker_reidentification any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • speaker_reidentification_config any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • audio_enhancer any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • context_prompt any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • diarization_enhanced any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • x_gladia_version any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • x_user_agent any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • x_transcription_pipeline any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

  • accurate_words_timestamps any deprecated

    Accepted with any value and ignored. Deprecated: kept only for clients migrated from Gladia Classic (Gladia's cloud API, api.gladia.io). Do not use it in new integrations: it may be removed (decommissioned) in a future release. It has no effect: remove it from your requests.

Responses

201 The job is created.
  • id string required

    Identifier of the job (a time-ordered UUID).

  • result_url string required

    Where to read the job (GET /v2/pre-recorded/{id}).

Example
{
"id": "0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b",
"result_url": "https://eu1.api.gladia.io/v2/pre-recorded/0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b"
}
400 The request is invalid (validation_errors lists why), or pre-recorded transcription is not available or turned off on this cluster (message says so): do not retry.
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
401 No API key, or an unknown one.
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
402 Your workspace has no credits left (insufficient_credits).
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
403 The key may not do this (its scopes, or the addresses it may be used from).
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
413 The file is too long for your workspace (its maximum audio duration), or larger than 1000 MB: split it, or ask your operator for a higher limit.
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
429 Too many of your jobs are waiting, or too many requests in the minute: wait the seconds of the Retry-After header when it is sent, then retry.
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}
503 Pre-recorded transcription is not available right now: try again.
Error body
{
"statusCode": 400,
"timestamp": "2026-10-12T09:04:17.210Z",
"path": "/v2/live",
"message": "Invalid parameter(s). See validation_errors for more details.",
"request_id": "G-1a2b3c4d",
"validation_errors": [
"sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
],
"error": "string"
}