Kooma API
Français API keys Sign up

Making a request

Conventions shared by every endpoint.

Request body & files

The text endpoints (text to speech, translation) expect a body JSON with Content-Type: application/json. Endpoints that take a media file (subtitling, dubbing) expect an upload multipart/form-data with a field file, or a source_url.

ConstraintValue
Accepted media formatsmp3, wav, m4a, webm, mp4, mov …
Maximum file size80 MB beyond that: 413
Maximum text length5,000 characters per request
Language codesSee Languages (e.g. bam_Latn, fra_Latn, eng_Latn)

Synchronous vs asynchronous

Two families of calls, depending on processing time:

  • Synchronous — text to speech, translation. The response (JSON or file) comes back in the same call.
  • Asynchronous (jobs) — subtitling and dubbing process a whole video. The creation call returns immediately {"job_id": "…", "status": "queued"}. You then poll for progress.

Track a job (polling)

Poll the status endpoint until status move on to done (or error), then download the result.

Typical polling loop on an asynchronous job.

# poll every 5 s
curl https://api.kooma.ai/subtitle/jobs/JOB_ID \
  -H "Authorization: Bearer sk-intermo-YOUR_KEY"
Job statuses

queued → processing → done. If it fails: error with a field error readable. An interval of 5 s between two polls is a sensible compromise.

Idempotency & retries

Subtitling and dubbing are billed when the job is created. Don't resubmit an identical job in a loop: reuse the job_id and its status.

↑↓ navigate↵ openesc close