Upload a file
/v2/upload Uploads an audio or video file (multipart form, field audio, up to 1000 MB) and returns its audio_url for POST /v2/pre-recorded. Or send the URL of a file as JSON ({"audio_url": "https://..."}): the API downloads it (same size limit, a public address only, redirects followed) and answers the same; audio_metadata.source is then that URL. Use it to keep a copy of a file whose link expires before the job runs. The file is kept as long as your workspace keeps its recorded audio. One upload feeds any number of jobs (one per option set, to compare them): deleting a job keeps the file while another job uses it, the last job's deletion deletes it. A workspace in zero data retention uploads nothing: 403. 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
curl -X POST https://eu1.api.gladia.io/v2/upload \ -H "x-gladia-key: $GLADIA_API_KEY" \ -F "audio=@call.wav"curl -X POST https://eu1.api.gladia.io/v2/upload \ -H "x-gladia-key: $GLADIA_API_KEY" \ -H "content-type: application/json" \ -d '{"audio_url": "https://files.example.com/calls/call.wav"}'Try it
Body
-
audio_urlstring requiredThe http(s) URL of an audio or video file the API downloads and stores, for a
POST /v2/pre-recordedthat may run later than the URL lives (a short-lived presigned link). It must be at a public address; redirects are followed. Same size limit as a multipart upload.
Responses
200 The file is stored.
-
audio_urlstring requiredThe file's address for
POST /v2/pre-recorded. Only your account's jobs can use it. -
audio_metadataobject requiredWhat the API read of the file.
7 fields
-
idstring requiredIdentifier of the uploaded file.
-
filenamestring requiredName of the uploaded file.
-
extensionstring requiredExtension of the file name.
-
sizeinteger requiredSize of the file, in bytes.
-
audio_durationnumber requiredDuration in seconds, read from a WAV file's header; null for other formats (the job's
filegives it once transcribed). -
number_of_channelsinteger requiredChannels of a WAV file; null for other formats.
-
sourcestring requiredThe URL the file was downloaded from (the JSON form); null for a file sent in a multipart form.
-
{ "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b", "audio_metadata": { "id": "0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b", "filename": "call.wav", "extension": "wav", "size": 960044, "audio_duration": 30, "number_of_channels": 1, "source": "string" }} 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.
{ "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.
{ "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).
{ "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 larger than 1000 MB.
{ "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.
{ "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"}