Skip to Content

File transcription jobs

Upload long recordings, follow durable transcription jobs, and retrieve text or aligned word times.

Use asynchronous file jobs for recordings up to five hours, within the selected model's published byte and duration limits. Upload your original file directly to storage, submit a job, and return for the result later. Closing the browser or disconnecting your client does not cancel a submitted job.

Availability is published per model. Check GET /v1/inference/models for supports_async, max_async_audio_seconds, max_async_upload_bytes, async_audio_formats, timestamp_granularities, and alignment_languages. A model can support short HTTP requests or live transcription without accepting file jobs.

Limits and supported audio

LimitMaximum
Decoded duration18,000 seconds inclusive; longer audio is rejected, never silently truncated
Original file5 GiB (5,368,709,120 bytes), independently of duration
FormatsWAV/RF64, MP3, FLAC, AAC/M4A, Ogg Opus or Vorbis
Audio streams / channelsOne selected audio stream, at most two channels
Upload session24 hours; part URLs last at most 15 minutes and can be refreshed
Processing deadline24 hours from job creation, separately from upload time

The server checks actual decoded samples and format. Container duration, filename, MIME type and client-reported duration do not establish validity. Upload the original audio; five-hour files do not need browser decoding or conversion to WAV. Video containers, remote source URLs and speaker diarization are not part of this interface. Model-specific limits can be lower than the maximums above. Five hours is an input limit, not a completion-time promise.

Workspace quotas and shared capacity

Authorized operators can adjust the workspace’s Async file job limits on its Inference page. Quota changes require operator access. The public Inference API continues to use the upload and transcription-job endpoints below.

Workspace quotaDefaultAllowed range
Active jobs11–10
Outstanding jobs101–100
Outstanding uploads21–10
Retained artifacts and reserved processing space10 GiBAbove zero, up to 100 GiB, in whole bytes
Concurrent ASR chunks11–32
Concurrent alignment chunks21–8

Active jobs cannot exceed outstanding jobs. Upload and outstanding-job budgets also apply while an upload is unsubmitted or a job is awaiting credit. Storage is entered in GiB and saved as an exact whole-byte budget. A reduction below current retained artifacts and reserved processing space returns 409 inference_job_limit, including a reset to a smaller default.

The form preserves unsaved edits during background refresh. If another administrator changes the limits, load the latest saved version before saving or resetting. Use platform defaults requires confirmation. Changes govern new uploads, job admissions and future chunk claims; running work and committed charges are preserved. Monthly credit and synchronous/realtime concurrency have their own controls.

Authorized operators manage shared budgets in Inference capacity → Async transcription. These settings apply to async file transcription on STT models published in Inference; ordinary Voice, interactive/short-file transcription and TTS retain their separate controls. The saved database policy governs future claims and admissions, without cancelling work already running.

Shared Inference controlAllowed rangeScope
Transcription concurrency (chunks)0–4Across async Inference jobs; zero pauses new recognition claims
Transcription chunks per instance1–4Independent bound on each shared model instance
Reserved Voice connection slots1–10000Admission headroom on the shared instance; not GPU preemption
Alignment concurrency (chunks)1–2Shared CPU alignment work
Preparation concurrency (jobs)1–2Shared audio preparation work

Capacity edits are version-checked. Unsaved changes survive background refresh; if another administrator saves first, explicitly load the current version before retrying. Global capacity has no reset-to-defaults action. Workspace quotas keep their separate confirmed reset.

The effective ASR or alignment upper bound is the smaller of the workspace quota and the corresponding shared budget. Raising a quota does not allocate GPUs or reserve dedicated capacity. Admission, model availability, reserved headroom and remaining shared-instance capacity can reduce actual concurrency further. An active-file allowance controls files; a chunk allowance controls how much of those files can be processed together.

Preparation, transcription and alignment workers can scale with eligible work, including useful in-flight work. Their deployment safety ceilings are two preparation workers, four transcription workers and two alignment workers; these are distinct from the current database budgets. One long file can create multiple eligible chunks, but extra replicas alone do not authorize more GPU requests. The STT server separately enforces its physical request ceiling.

File-job recognition can run alongside open Voice or realtime connections when shared capacity and reserved headroom permit it. Both use the same native engine; reserved admission headroom does not provide strict Voice preemption or exclusive GPU compute.

Additional CPU workers do not increase the GPU dispatch budget or change word-alignment accuracy. Queueing can continue when a workspace has unused quota, and shared work can affect latency. Five hours remains an input limit, not a processing-speed or completion-time guarantee.

Upload and submit

Authenticate control requests with an Inference key holding inference-stt:create. Add inference-models:read for model discovery and inference-stt:read to follow jobs and retrieve their content.

  1. POST /v1/inference/uploads with filename, size_bytes, and content_type. Keep one stable Idempotency-Key for this logical upload. Save its returned id, part_size_bytes and expires_at.
  2. Divide the file into the returned part size, currently 16 MiB, except the final remainder. Calculate base64 SHA-256 of each part. Request at most four URLs at a time with POST /v1/inference/uploads/{id}/parts:
{
  "parts": [
    { "part_number": 1, "checksum_sha256": "BASE64_SHA256_OF_PART_BYTES" }
  ]
}
  1. Send each part with PUT to its returned url, using its exact headers. Send no API key or cookies to storage. Browser JavaScript must let the browser set Content-Length; it must not set that header manually.
  2. POST /v1/inference/uploads/{id}/complete with {} and its own stable Idempotency-Key. The server reconciles the actual stored parts and size. A multipart ETag is not a whole-file SHA-256 checksum.
  3. POST /v1/inference/transcription-jobs with a third stable idempotency key:
{
  "upload_id": "UPLOAD_UUID",
  "model": "kejue-stt",
  "language": "ar",
  "timestamp_granularity": "word"
}

The response is 202 Accepted, with a durable job id. Use the public model alias, not a provider ID or backend runtime name. The model version and backend release are pinned to the job. language is ar, en, or auto; timestamp_granularity is none (default), chunk, or word, within the catalog's capabilities. Word alignment with auto is refused unless explicitly qualified and published. unklang is not reliable detected-language metadata.

All API-key POST operations require Idempotency-Key. Reuse the original key and payload after an ambiguous network failure. Use a new key to refresh part URLs after expiry. An upload attaches to one logical job; retries cannot create duplicate processing or charges.

Resume an interrupted upload

Read GET /v1/inference/uploads/{id} for the authoritative parts inventory. Reuse a stored part only after checking its size and SHA-256 against the selected local file. Reupload a part if its checksum is unavailable, and stop if a checksum differs. Refresh URLs for missing parts while the upload session is valid. A browser reload may require selecting the same local file again.

Studio saves only upload metadata and stable operation identities locally; it does not put credentials, signed URLs, audio or transcripts in local storage. Pause upload stops local transfers without discarding completed parts. Discard upload aborts an unused upload and schedules part cleanup.

Runnable backend example

The Python upload-and-poll example uploads bounded parts, checks resumable checksums, keeps stable idempotency keys in a local state file, polls with backoff, and saves JSON results. It uses a separate storage request so API credentials cannot reach the storage origin.

pip install requests
export KEJUE_INFERENCE_KEY="kejue_<prefix>_<secret>"
export KEJUE_API_BASE="https://api.kejue.co/v1"

python async-transcription.py recording.m4a \
  --model kejue-stt --language ar --timestamps word \
  --state recording-upload.json --output recording-transcript.json \
  --reason "Customer review for support ticket 4321"

Rerun with the same source, state path and options to resume. Keep the key in your environment; it is never written to the state file. Word mode works only when that model and language advertise aligned word timing.

Follow a job

Read GET /v1/inference/transcription-jobs/{id}. Poll with increasing delays, for example 2, 3, 5, 10 and then 30 seconds. List durable history with GET /v1/inference/transcription-jobs; follow next_cursor until null.

StateMeaning
validatingInspecting, decoding and preparing the original audio
awaiting_creditsPrepared, but the full-duration reservation could not be made; no recognition work starts
queuedValidated and waiting for processing capacity
processingRecognizing audio or aligning requested words
finalizingAssembling committed results and settling the reservation
completedThe requested output is ready
failed / cancelledTerminal; explicitly partial committed output may still be available

phase describes the current stage. progress.total_chunks, completed_chunks and processed_ms describe durable committed progress, not an estimated time remaining. Audio duration is null until preparation validates it. deadline_at does not move on retries. Add credit and POST /v1/inference/transcription-jobs/{id}/resume to retry a prepared job's reservation before that deadline. A submitted job does not depend on a browser tab or its ordinary session expiry, but revoked access stops new work.

In Settings → Webhooks, configure an active workspace destination and subscribe it to the Inference transcription events. Pass its ID as webhook_config_id when creating a job; an Inference key references the existing workspace configuration rather than managing Voice webhook endpoints. Jobs send terminal notifications: inference.transcription.completed, inference.transcription.failed, or inference.transcription.cancelled. The canonical envelope adds transcription_job: {id, model, status, request_id} with call: null and campaign: null; it contains no audio, transcript or storage URL. Existing call/campaign envelopes keep their current fields. Keep notifications small, verify signatures, deduplicate deliveries and fetch the result separately. File-job notifications have their own durable retries and are outside the existing Voice delivery-history/manual-replay view. Polling remains a fallback when a callback is delayed or missed. A notification is not the only copy of your transcript.

Read text and timestamps

Fetch GET /v1/inference/transcription-jobs/{id}/result?format=json or format=text with inference-stt:read. Content access is audited and follows workspace sensitive-data policy. Supply reason when required. In approval mode, dashboard users request access for that transcription job through the shared access-request queue; a grant for a different call or job is not enough. Inference API keys use their explicit inference-stt:read grant for content access and must supply an 8–500 character reason in reason or approval mode. Job approval requests are a dashboard workflow; Voice API-key approval lists continue to return call requests only.

none returns text without timing arrays. chunk returns coarse audio chunk ranges, which are not aligned speech-segment or word timestamps. word returns acoustically aligned words with full-file millisecond offsets:

{
  "timestamp_granularity": "word",
  "timestamp_source": "forced_alignment",
  "words": [
    {"index": 0, "text": "مرحبا", "start_ms": 120, "end_ms": 470, "alignment_status": "aligned"},
    {"index": 1, "text": "بكم", "start_ms": null, "end_ms": null, "alignment_status": "unaligned"}
  ],
  "alignment": {
    "status": "partial",
    "model_version": "PINNED_ALIGNMENT_RELEASE",
    "coverage": 0.5,
    "aligned_words": 1,
    "total_words": 2
  }
}

This is an illustrative excerpt. Results also identify the job, model, language, original duration and transcript. Spelling, punctuation and word order are preserved. Unsupported words and uncertain spans have null times; they are not assigned evenly spaced or interpolated estimates. Alignment coverage and model version explain the timing provenance. Cohere supplies recognition; a separate acoustic aligner supplies word timing. These are not native Cohere timestamps, speaker labels or calibrated per-word confidence.

partial: true means only committed output is present, with missing intervals left unfilled. 409 inference_result_not_ready means there is no committed output to retrieve yet. Studio displays paged word rows and downloads complete JSON or plain text without rendering the entire word list at once.

Charges, cancellation and deletion

The full validated duration is reserved from your existing STT wallet before recognition begins. Async processing has separate job slots and does not use your interactive session concurrency. Only unique committed audio intervals are charged; internal recognition/alignment retries add no second charge. For word-mode jobs, the requested aligned result must be committed before its interval is charged. Silence remains part of validated audio duration. A successful five-hour job uses 300 STT minutes.

POST /v1/inference/transcription-jobs/{id}/cancel stops new work, rejects late results, settles committed partial duration and releases the remainder. Paid partial output remains retrievable until expiry. If no output was committed, the transcription charge is zero. See Usage and limits.

DELETE /v1/inference/transcription-jobs/{id} needs inference-stt:delete. It cancels outstanding work and removes content access immediately, then retries physical object cleanup in the background. An unused upload can be aborted with DELETE /v1/inference/uploads/{id}. Billing/audit metadata remains; already downloaded results cannot be recalled.

Retention includes the stored files

The original source is deleted once its durable prepared audio is committed. Unsubmitted uploads expire after 24 hours, including unfinished multipart parts. Intermediate audio is cleaned up within 24 hours after the job ends. Transcript content is retained for seven days after termination, shortened by stricter workspace retention. Cleanup failures are retried and monitored.

Read result_expires_at and content_expired. Result access stops at expiry; later reads return 410 inference_content_expired, even if physical cleanup is still retrying. Expired job history can remain as billing and audit metadata. These rules cover our stored S3 objects as well as database content references. Existing imported call recordings continue to follow their separate call retention policy.

On this page