Skip to Content
Vatis TechAPI docs
Batch transcription

Idempotency

Send a request again safely after a timeout: the same Idempotency-Key gets the first answer, and no second job starts.

When a request times out or its connection breaks, you cannot know whether the job started. Send an Idempotency-Key header with a unique string of your own (1 to 255 printable characters, a UUID for example), and send the same request again with the same key:

curl -sS -H "Authorization: Bearer $VATIS_KEY" -H "Idempotency-Key: 9b7f3c1e-crm-2026-118" \
  https://api.eu.vatis.tech/v1/speech-to-text -F model_id=vatis_ro_v9 -F file=@speech.wav

Expected result: sent twice, both answers carry the same id, and no second job starts.

  • The same key within 24 hours gets the first request's answer, also while that job still runs.
  • The same key with other fields or another file: 409 idempotency_conflict (param Idempotency-Key).
  • Keys are remembered for each API key apart.
  • If the first transcript was deleted, or sent with store=false, the same key starts a new job.

Use a new key for every new job. Use it again only to repeat the same request.