Speech to Text

Create job

Queue 1 to 50 files for background transcription, with an optional completion webhook.

POST/v1/stt/jobs

Upload the files as multipart/form-data, repeating the files field once per file, with the same options as POST /v1/stt. Every file is checked and measured up front, the total cost of every file is held from your credits once, and the job is accepted with 202. Each file is then charged on its own when it succeeds ($0.006 / min on v3, minimum 2¢ per file). An account can have 1 job queued or running at a time by default. Requires an API key with all permission. See the Batch transcription guide.

from wistfareai import WistfareAI

client = WistfareAI()  # reads WISTFARE_API_KEY

job = client.speech_to_text.jobs.create(
    files=["calls/0915.mp3", "calls/0932.mp3", "calls/1004.mp3"],
    model="wistfare-stt-v3-beta",
    language="auto",
    key_terms=["MTN MoMo", "Irembo"],
    webhook_url="https://example.com/hooks/wistfare",
)
print(job.id, job.status, job.webhook_secret)

Request

FieldTypeDefaultDescription
filesfile, repeatedrequired1 to 50 audio or video files, up to 1 GB in total. Each obeys the POST /v1/stt limits: 128 MB and 30 minutes.
modelstringwistfare-stt-v3-betaAs for POST /v1/stt.
languagestringautoAs for POST /v1/stt.
timestampsbooleantrueAs for POST /v1/stt.
diarizebooleanfalseSpeaker labels on v3, up to 4 speakers.
boost v3string—Key terms, one per line or comma-separated (≤ 200 × 100 characters).
enhanced v3booleantrueLanguage-model accuracy mode.
punctuation v3booleantruePunctuation and capitals.
webhook_urlstring—A public https:// URL that receives one stt.job.completed POST when the job finishes.

The options apply to every file in the job. Send an Idempotency-Key header so a retried upload can't create the job twice; see Idempotency.

Response

202 Accepted with the job object, plus webhook_secret when you passed a webhook_url:

{
  "id": "sttjob_k3n8q2x7d1v9m4b6c0zt",
  "status": "queued",
  "options": {
    "model": "wistfare-stt-v3-beta",
    "language": "auto",
    "timestamps": true,
    "diarize": false,
    "boost": ["MTN MoMo", "Irembo"],
    "enhanced": true,
    "punctuation": true
  },
  "webhook_url": "https://example.com/hooks/wistfare",
  "created_at": "2026-10-11T09:40:00Z",
  "completed_at": null,
  "items": [
    { "id": "sttitem_p4w9c2m7x1k8d3q6v0bn", "name": "0915.mp3", "status": "queued", "audio_seconds": 312.48, "transcription_id": null, "cost_cents": null, "error": null },
    { "id": "sttitem_b7t2r9k4m1x6c8d3w5qz", "name": "0932.mp3", "status": "queued", "audio_seconds": 845.2, "transcription_id": null, "cost_cents": null, "error": null },
    { "id": "sttitem_z5n1q8c3v7m2k9x4d6pt", "name": "1004.mp3", "status": "queued", "audio_seconds": 1210.7, "transcription_id": null, "cost_cents": null, "error": null }
  ],
  "totals": { "items": 3, "queued": 3, "running": 0, "succeeded": 0, "failed": 0, "canceled": 0, "audio_seconds": 0.0, "cost_cents": 0 },
  "webhook_secret": "whsec_I2yJucZjZmd_QZ1fWCJR8DX9z3CBL_agig8sszOkKnk"
}

Store webhook_secret now

webhook_secret is returned only in this response and signs every webhook delivery for this job. Save it alongside the job id.

Errors

StatusCodeMeaning
400no_files / too_many_filesThe job needs 1 to 50 files.
400invalid_webhook_urlwebhook_url isn't a public https:// URL.
400unknown_model, unsupported_language, too_many_boost_terms, boost_term_too_longAn option isn't valid, as for POST /v1/stt.
400empty_file, unsupported_audio, audio_too_short, audio_too_longA file isn't usable. The message starts with the file's name.
401unauthorizedMissing, invalid or revoked API key.
402insufficient_credits / budget_exceededThe job's total doesn't fit your available balance or budget. Nothing was queued.
403read_only_key / account_suspendedThe key is read-only, or spending is suspended on the account.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
413file_too_large / job_too_largeA file is over 128 MB, or all files together are over 1 GB.
422validation_error / idempotency_mismatchThe files field is missing, or the Idempotency-Key was used with a different request.
429concurrency_limit / rate_limitedThe account already has its maximum of active jobs (1 by default), or hit its request rate. Retry after Retry-After seconds.

On this page