Skip to main content
This guide covers the three ways to submit audio for batch transcription. For endpoint details and schemas, see the Batch API reference.
The Batch API is served from https://api.batch.slng.ai, not https://api.slng.ai.
Use presigned upload (Method 2) for files above ~10 MB. Inline base64 (Method 3) is capped by the 10 MB request-body limit.
Prerequisites:
  • An SLNG API key from app.slng.ai/api-keys — a consumer key (slng_cu_...) or a batch key (slng_bt_...).
  • Audio in a supported format: wav, mp3, flac, aac, ogg, m4a, mp4, amr, mpeg

Authentication

Supply your SLNG API key on every request using either header:
Both headers are equivalent. Consumer (slng_cu_) and batch (slng_bt_) keys both authenticate; legacy zpka_ keys are still accepted during migration. Any other value returns 401 Unauthorized.

Placeholders

The snippets below use these placeholders. Replace them before running the code.

Input Methods

Method 1: URL Input

Provide a publicly accessible HTTPS URL. The system downloads the file. Supports presigned S3/GCS URLs for private files.

Method 2: Presigned Upload

Use this method for large files or when you need upload progress tracking. Three steps: request a presigned URL, upload the file directly to S3, then create the job referencing the upload.
1

Request a presigned S3 upload URL

Returns 200 OK (no job is created yet). The response carries the job_id, the validated transcription_config (echoed back), the future S3 locations, and an upload object with the presigned PUT URL plus the headers your upload must send:
Carry the returned transcription_config verbatim into step 3.
2

Upload the file to the presigned URL

Send the bytes with the exact headers from upload.headers (typically Content-Type: application/octet-stream):
3

Create the job

Reference the job_id and s3_key from step 1.

Method 3: Inline base64

Small files only — bounded by the 10 MB request-body cap. Use presigned upload for anything larger.

Job Lifecycle

After submission, a job moves through these statuses: QUEUEDIN_PROGRESSDECODINGPOST_PROCESSINGDONE / FAILED A successfully deleted job moves to DELETED (terminal). Poll GET /v1/batch/jobs/{jobId} until the status reaches DONE or FAILED. The response includes the full job record (config, timestamps, error_message on failures); see the API reference for the schema.
Once DONE, retrieve the transcripts:
Response shape:
Each output entry carries a format field: json, txt, or srt. Download URLs are presigned and expire after ~1 hour. To list jobs instead of polling a single one, use GET /v1/batch/jobs. It supports pagination (page, page_size) plus filtering by status, model_code, and submission date range, and sorting by submitted_at, status, or model_code. See the API reference for the full parameter list.

Delete a job

Returns 204 No Content on success, 404 if the job is unknown or already deleted. Removes the DB record and S3 inputs/outputs.

Errors

All error responses share the same envelope:

Example: full workflow (presigned upload)


Transcription Config

Example with diarization and the default enhanced operating point:

Limits

For files larger than 10 MB, use the presigned upload flow (Method 2) — the file goes directly to S3, bypassing the request-body cap.

Next Steps

Batch API reference

Endpoint details, request schemas, and response formats

Getting started

Set up your SLNG key and make your first request