aethexDocs

API Reference

Transcription API

Transcribe audio files into text.Four endpoints, picked by two questions: do you want the result back in the response, or queued? And inline upload or presigned upload?Sync, inline: POST /transcribe. Upload via multipart/form-data (up to 25 MiB and 5 minutes of audio), get the transcript in the response, or add stream=true to receive each piece as a server-sent event as it is transcribed.Async, inline: POST /transcribe/async. Same 25 MiB upload, but up to 4 hours of audio, and the job runs in the background. Poll GET /transcribe/{job_id} or pass a webhook_url to be notified when it finishes. Queued jobs, and long recordings while they are transcribed, can be cancelled with DELETE /transcribe/{job_id}.Sync, presigned: POST /transcribe/by-upload. First call `POST /uploads/presign` to mint an upload URL, PUT your file directly to that URL, then call this endpoint with the upload ID. Transcript comes back in the response. Same 25 MiB and 5-minute caps.Async, presigned: POST /transcribe/async/by-upload. The presigned-upload flow above, run as a background job with optional webhook. Up to 25 MiB and 5 minutes with kind audio/transcribe, or up to 1 GiB and 4 hours with kind audio/transcribe-long.Accepted formats: WAV, FLAC, Ogg/Opus, WebM/MKA, M4A/AAC/ALAC, MOV, MP3, AMR, 3GP, AIFF, CAF, WMA, AU, and raw AAC.Long recordings: past 5 minutes, an async job is transcribed piece by piece, at quiet moments, and each piece is stored the moment it lands. GET /transcribe/{job_id} shows its progress and the segments so far, GET /transcribe/{job_id}/events streams them as server-sent events, and webhook_events: ["segment"] posts each one. It is billed per second of audio as each piece completes, so a cancelled job pays only for what was done.Over the caps: audio longer than 5 minutes gets 413 on the sync endpoints and on audio/transcribe uploads; past 4 hours, on every endpoint. A file over 25 MiB gets 413 on the inline endpoints and 422 on the presigned ones, which check an upload's size when they fetch it.Corrected transcripts: add correct=true (with an optional prompt and keywords) to any endpoint and an LLM fixes the words the recogniser misheard, under the same contract our phone agents' transcripts are corrected with: it never adds answers, names or numbers, and never removes words. text_raw always holds what was heard.Correcting text: POST /transcribe/correct corrects a transcript you already have, as one text or turn by turn, under the same contract. POST /transcribe/{job_id}/correct corrects a stored transcription again, with a new prompt or keywords.Live: WS /transcribe/stream. Stream audio as it is spoken, for as long as an hour, and read the transcript as it comes.

Base URL
https://api.aethexai.com/api/v1
Endpoints
11
Scopes
transcribe:use
POST/transcribe

Synchronously transcribe an audio file.

Transcribe Audio

Uploads an audio file via multipart/form-data and returns the transcription synchronously. The request body is capped at 25 MiB and the audio at 5 minutes; larger or longer uploads return 413, and the async endpoints take recordings of up to 4 hours. Empty files return 400. Calls are metered against your account and deducted from credits when transcription completes successfully.

Request body

9
  • filebinaryrequired

    Audio file uploaded as multipart/form-data. Accepted formats: WAV, FLAC, Ogg/Opus, WebM/MKA, M4A/AAC/ALAC, MOV, MP3, AMR, 3GP, AIFF, CAF, WMA, AU, raw AAC. Maximum 25 MiB and 5 minutes. Other file types are rejected.

  • languagestringoptional

    The language spoken: by name (english, french, nigerian_pidgin), or as an ISO 639 code (en, fr), regional tag (fr-CA) or ASR token (fra_Latn), up to 50 characters. Omit it, or send auto, to let the model detect the language. A hint that is no language (klingon, xx) answers 422.

  • group_idstring (uuid)optional

    Optional UUID correlating multiple chunked uploads of one recording. Send the same value with every chunk; dashboards aggregate the chunks into a single transcription entry.

  • group_totalintegeroptional

    Expected number of chunks in the group, 1–10000 (requires group_id). Lets dashboards flag a group whose chunks did not all arrive as partial.

  • streambooleanoptional

    Answer as server-sent events instead of one JSON body: a segment event for each piece as it is transcribed (pieces vary in length, up to about five minutes), with its index as the event id and the progress, then completed with the body this endpoint otherwise returns, or failed. It is billed once the last piece completes; a stream that fails is not billed.

  • correctbooleanoptional

    Correct the transcript with an LLM: true fixes words the recogniser misheard, using prompt and keywords, and never changes what was said (no answers, names or numbers invented, no words removed). The response's text is then the correction and text_raw what the recogniser heard; corrected says whether they differ. Correction's LLM tokens are billed with the transcription. Off by default.

  • promptstringoptional

    With correct: what the audio is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    With correct: names and terms the audio may hold (up to 100, of up to 100 characters each), spelled as they should be written. Send the field once per term.

  • modelstringoptional

    Optional: leave it unset and Aethex picks the model for the language. The response's model reads aethex; an async job shows null until it has run.

Errors

8
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

403Capability not available

model names a transcription model your account may not use. The body's kind (stt_model) and value name it.

Leave model out for your account's default, or name a model your account may use.

400Empty File

The uploaded file is empty (zero bytes).

Upload a non-empty audio file.

401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the transcribe:use scope.

Issue a new key with the transcribe:use scope.

413Payload Too Large

The uploaded file is larger, or its audio longer, than the endpoint accepts.

Compress, trim or split the audio to fit under 25 MiB and 5 minutes before retrying, or send a longer recording to POST /transcribe/async, which takes up to 4 hours.

422Unprocessable Entity

Missing file field or unsupported audio format.

Attach a file field with a supported audio format (WAV, FLAC, Ogg/Opus, WebM/MKA, M4A/AAC/ALAC, MOV, MP3, AMR, 3GP, AIFF, CAF, WMA, AU, raw AAC).

503Service Unavailable

The ASR service is temporarily unavailable.

Retry after a few seconds; the service should recover automatically.

POST/transcribe/async

Queue a transcription job and receive results via webhook.

Transcribe Audio (Async)

Accepts an audio file, stores it, and processes the transcription in the background. The file is capped at 25 MiB but may run up to 4 hours: past 5 minutes it is transcribed piece by piece as a long recording (see POST /transcribe/async/by-upload). The result is sent to webhook_url when complete. Poll GET /transcribe/:job_id as a fallback if no webhook is configured.Webhook status field. webhook_status is null when no webhook_url was supplied — that is the steady-state value for polling-only clients. The non-null values (pending, delivered, failed, unsafe) only appear when a webhook is registered. unsafe is returned when the webhook URL is rejected by SSRF policy (e.g. private-network destination).

Request body

8
  • filebinaryrequired

    Audio file to transcribe (multipart/form-data). Up to 25 MiB and 4 hours of audio; past 5 minutes it is transcribed piece by piece.

  • languagestringoptional

    The language spoken: by name (english, french, nigerian_pidgin), or as an ISO 639 code (en, fr), regional tag (fr-CA) or ASR token (fra_Latn), up to 50 characters. Omit it, or send auto, to let the model detect the language. A hint that is no language (klingon, xx) answers 422.

  • webhook_urlstringoptional

    URL to receive a POST when transcription completes. Optional — poll GET /transcribe/:job_id if omitted.

  • webhook_eventsstring[]optional

    Webhook events to receive beyond the final one. ["segment"] posts a transcription.segment event for each piece of a long recording as it lands, with the piece and the job's progress; its event id is the same on every delivery of that piece. Segment events are best-effort: each is sent once, without retries, so a receiver that misses one reads the piece from GET /transcribe/{job_id} or its events stream, which are the source of truth. The final event is retried as every job's is. Needs webhook_url.

  • correctbooleanoptional

    Correct the transcript with an LLM: true fixes words the recogniser misheard, using prompt and keywords, and never changes what was said (no answers, names or numbers invented, no words removed). The response's text is then the correction and text_raw what the recogniser heard; corrected says whether they differ. Correction's LLM tokens are billed with the transcription. Off by default.

  • promptstringoptional

    With correct: what the audio is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    With correct: names and terms the audio may hold (up to 100, of up to 100 characters each), spelled as they should be written. Send the field once per term.

  • modelstringoptional

    Optional: leave it unset and Aethex picks the model for the language. The response's model reads aethex; an async job shows null until it has run.

Errors

10
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

403Capability not available

model names a transcription model your account may not use. The body's kind (stt_model) and value name it.

Leave model out for your account's default, or name a model your account may use.

400Empty File

The uploaded file is empty (zero bytes).

Upload a non-empty audio file.

401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

413Payload Too Large

The uploaded file is larger, or its audio longer, than the endpoint accepts.

Compress the audio to fit under 25 MiB before retrying, or presign it with kind audio/transcribe-long (up to 1 GiB) and submit it to POST /transcribe/async/by-upload. Split a recording past 4 hours.

422Unprocessable Entity

Missing file field or unsupported audio format.

Attach a file field with a supported audio format.

422Invalid Webhook URL

webhook_url is present but not a valid HTTPS URL.

Pass a valid https:// URL or omit webhook_url.

422Malware Detected

The uploaded file was flagged by the malware scanner.

Upload a clean audio file.

503Service Unavailable

The ASR service is temporarily unavailable.

Retry after a few seconds; the ASR service should recover automatically.

POST/transcribe/by-upload

Synchronously transcribe a file already in object storage.

Transcribe by Upload ID

Transcribes an audio file that was previously uploaded via POST /uploads/presign. Useful when you have already stored the file and want to avoid re-uploading it.

Request body

7
  • upload_idstringrequired

    Signed upload token returned by POST /uploads/presign. Opaque string, 8–8192 characters.

  • languagestringoptional

    The language spoken: by name (english, french, nigerian_pidgin), or as an ISO 639 code (en, fr), regional tag (fr-CA) or ASR token (fra_Latn), up to 50 characters. Omit it, or send auto, to let the model detect the language. A hint that is no language (klingon, xx) answers 422.

  • streambooleanoptional

    Answer as server-sent events instead of one JSON body: a segment event for each piece as it is transcribed (pieces vary in length, up to about five minutes), with its index as the event id and the progress, then completed with the body this endpoint otherwise returns, or failed. It is billed once the last piece completes; a stream that fails is not billed.

  • correctbooleanoptional

    Correct the transcript with an LLM: true fixes words the recogniser misheard, using prompt and keywords, and never changes what was said (no answers, names or numbers invented, no words removed). The response's text is then the correction and text_raw what the recogniser heard; corrected says whether they differ. Correction's LLM tokens are billed with the transcription. Off by default.

  • promptstringoptional

    With correct: what the audio is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    With correct: names and terms the audio may hold (up to 100, of up to 100 characters each), spelled as they should be written. Send the field once per term.

  • modelstringoptional

    Optional: leave it unset and Aethex picks the model for the language. The response's model reads aethex; an async job shows null until it has run.

Errors

9
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

403Capability not available

model names a transcription model your account may not use. The body's kind (stt_model) and value name it.

Leave model out for your account's default, or name a model your account may use.

401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

422Invalid Upload ID

upload_id is not a valid signed upload token.

Use the upload_id returned by POST /uploads/presign.

422Upload Not Found

The upload_id is valid but the file has already been consumed or expired.

Request a new upload token via POST /uploads/presign and re-upload the file.

422Upload Too Large

The uploaded file is larger than 25 MiB. A presigned upload's size is checked when this endpoint fetches it, so the PUT itself succeeds and the refusal comes here, as 422 rather than the inline endpoints' 413.

Compress, trim or split the audio to fit under 25 MiB, then request a new upload with POST /uploads/presign.

413Payload Too Large

The uploaded audio is longer than 5 minutes.

Trim or split the audio to fit under 5 minutes and request a new upload with POST /uploads/presign, or submit a new upload to POST /transcribe/async/by-upload, which transcribes it as a long recording.

503Service Unavailable

The ASR service is temporarily unavailable.

Retry after a few seconds.

POST/transcribe/async/by-upload

Queue a transcription job from a previously uploaded file.

Transcribe Async by Upload ID

Async variant of POST /transcribe/by-upload. Queues a background transcription job from a file already in object storage, then sends results to webhook_url when done.A long recording, presigned with kind audio/transcribe-long (up to 1 GiB and 4 hours) or an audio/transcribe upload past 5 minutes, is transcribed piece by piece: GET /transcribe/{job_id} shows its progress and the segments so far, GET /transcribe/{job_id}/events streams them as they land, and webhook_events: ["segment"] posts each one. It is billed per second of audio as each piece completes.

Request body

8
  • upload_idstringrequired

    Signed upload token returned by POST /uploads/presign. Opaque string, 8–8192 characters.

  • languagestringoptional

    The language spoken: by name (english, french, nigerian_pidgin), or as an ISO 639 code (en, fr), regional tag (fr-CA) or ASR token (fra_Latn), up to 50 characters. Omit it, or send auto, to let the model detect the language. A hint that is no language (klingon, xx) answers 422.

  • webhook_urlstringoptional

    URL to receive a POST when transcription completes. Optional.

  • webhook_eventsstring[]optional

    Webhook events to receive beyond the final one. ["segment"] posts a transcription.segment event for each piece of a long recording as it lands, with the piece and the job's progress; its event id is the same on every delivery of that piece. Segment events are best-effort: each is sent once, without retries, so a receiver that misses one reads the piece from GET /transcribe/{job_id} or its events stream, which are the source of truth. The final event is retried as every job's is. Needs webhook_url.

  • correctbooleanoptional

    Correct the transcript with an LLM: true fixes words the recogniser misheard, using prompt and keywords, and never changes what was said (no answers, names or numbers invented, no words removed). The response's text is then the correction and text_raw what the recogniser heard; corrected says whether they differ. Correction's LLM tokens are billed with the transcription. Off by default.

  • promptstringoptional

    With correct: what the audio is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    With correct: names and terms the audio may hold (up to 100, of up to 100 characters each), spelled as they should be written. Send the field once per term.

  • modelstringoptional

    Optional: leave it unset and Aethex picks the model for the language. The response's model reads aethex; an async job shows null until it has run.

Errors

10
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

403Capability not available

model names a transcription model your account may not use. The body's kind (stt_model) and value name it.

Leave model out for your account's default, or name a model your account may use.

401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

422Invalid Upload ID

upload_id is not a valid signed upload token.

Use the upload_id returned by POST /uploads/presign.

422Upload Not Found

The upload_id is valid but the file has already been consumed or expired.

Request a new upload token via POST /uploads/presign and re-upload the file.

422Upload Too Large

The uploaded file is larger than 25 MiB. A presigned upload's size is checked when this endpoint fetches it, so the PUT itself succeeds and the refusal comes here, as 422 rather than the inline endpoints' 413.

Compress, trim or split the audio to fit under 25 MiB, then request a new upload with POST /uploads/presign.

413Payload Too Large

A long recording (audio/transcribe-long) is larger than 1 GiB.

Split the recording into parts of up to 1 GiB, or re-encode it at a lower bitrate.

422Invalid Webhook URL

webhook_url is present but not a valid HTTPS URL.

Pass a valid https:// URL or omit webhook_url.

503Service Unavailable

The ASR service is temporarily unavailable.

Retry after a few seconds; the service should recover automatically.

POST/transcribe/batch

Queue up to 50 presigned uploads as async transcriptions in one request.

Queue Several Transcriptions

Queues up to 50 presigned uploads as async transcriptions, each exactly as POST /transcribe/async/by-upload queues one: each item takes that route's body (upload_id, language, model, correct, prompt, keywords, webhook_url, webhook_events). A long recording, presigned as audio/transcribe-long or past 5 minutes, is queued as that route queues one and transcribed piece by piece; an upload past its presigned size cap answers 422 in its place.Items are queued in order. jobs answers each item by its index: the job it queued, or the error that route would have answered for it: its status and detail, and for a refusal its code and fields (capability_not_available names the kind and value refused). One item failing never stops the rest. Each item counts against the per-minute limit on async transcriptions, so an item past it answers 429: submit it again a minute later.

Request body

1
  • itemsobject[]required

    1 to 50 items, each a POST /transcribe/async/by-upload body.

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the transcribe:use scope.

Issue a new key with the transcribe:use scope.

422Unprocessable Entity

items is empty or holds more than 50, or an item is not a POST /transcribe/async/by-upload body.

Send 1 to 50 items, and split a larger set across requests.

GET/transcribe/:job_id

Poll the status of an async transcription job.

Get Transcription Job

Returns the current state (pending, processing, completed, failed or cancelled) and the transcript text once processing is complete. A long recording also shows progress (done_s of total_s seconds, total_s null until known) and its segments so far, each {index, start, end, text, text_raw, corrected}; other jobs return progress: null and no segments.

Path & Query

1
  • job_idstringrequired

    UUID of the transcription job, returned by POST /transcribe/async.

Errors

4
401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

404Job Not Found

No job with this ID exists.

Confirm the id from POST /transcribe/async or POST /transcribe/async/by-upload.

422Invalid Job ID

job_id is not a valid UUID.

Pass the UUID returned by POST /transcribe/async.

GET/transcribe/:job_id/events

Stream a job's pieces as server-sent events as they land.

Stream Transcription Progress

Streams a transcription job as server-sent events: one segment event per piece of a long recording as it is stored, with the piece's index as the event id and the job's progress, then completed with the job (as GET /transcribe/{job_id} returns it), or failed with its status and error_message. A cancelled job ends on failed with status: cancelled.Reconnect with a Last-Event-ID header, or the after query parameter (for example ?after=3) when you cannot set headers, to resume after the last piece you received. A : keep-alive comment is sent every 15 seconds while nothing else is. A job with no pieces goes straight to its outcome. An account holds up to 20 streams open at once; past that, a new one answers 429.

Path & Query

3
  • job_idstringrequired

    UUID of the transcription job.

  • Last-Event-IDheaderoptional

    Header. The id of the last segment event you received: the stream resumes with the piece after it.

  • afterintegeroptional

    Query. The index of the last piece you received, for a client that cannot set Last-Event-ID: the stream resumes with the piece after it. A numeric Last-Event-ID header wins over it.

Errors

5
401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

404Job Not Found

No job with this ID exists.

Confirm the id from POST /transcribe/async or POST /transcribe/async/by-upload.

422Invalid Job ID

job_id is not a valid UUID.

Pass the UUID returned by POST /transcribe/async.

429Too Many Requests

The account already has 20 event streams open, the most it holds at once.

Close a stream you no longer read, or poll GET /transcribe/{job_id} instead, then retry after the seconds in the Retry-After header.

POST/transcribe/correct

Correct a transcript you already have as text, as our agents' call transcripts are corrected.

Correct a Transcript

Corrects a transcript that is already text, from any recogniser, under the contract our phone agents' transcripts are corrected with: an LLM fixes the words the recogniser misheard, and never adds answers, names or numbers or removes words. Send it as one text, or turn by turn in segments, each with an optional speaker. Each turn is corrected on its own, reading the one before it.Up to 50,000 characters in at most 200 turns, about an hour of speech. Send a longer transcript in parts, each with the end of the one before as context.The transcript is corrected in pieces of about 60 words, and pieces says how many. A piece is left as given when it holds a dictated number, an email address or a keypad entry such as DTMF: 3 (identifier: those are never sent to the LLM), when the LLM gives no answer in time (unanswered: retry to correct it), or when its correction fails a check (answer_changed, negation_changed, words_added, utterance_collapsed, length_tripled, digits_introduced, email_introduced, domain_introduced). uncorrected gives one reason for each such piece.Billed for the LLM's tokens, at the rate of an agent chat; usage reports them.

Request body

6
  • textstringoptional

    The transcript as one text. Send this or segments.

  • segmentsobject[]optional

    The transcript turn by turn, up to 200 turns, each an object with text and an optional speaker (up to 100 characters, returned as given). Send this or text.

  • languagestringoptional

    The transcript's language, by name or code (english, fr). Optional; it helps the LLM.

  • promptstringoptional

    What the transcript is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    Names and terms the transcript may hold (up to 100, of up to 100 characters each), spelled as they should be written.

  • contextstringoptional

    The transcript just before this one, up to 2,000 characters: its last sentences (about 60 words) are read with the first piece, and never corrected or returned.

Errors

6
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the transcribe:use scope.

Issue a new key with the transcribe:use scope.

422Unprocessable Entity

Neither or both of text and segments, an empty transcript, more than 50,000 characters or 200 turns, or a prompt, keywords or context over its cap.

Send one of text or segments within the caps; send a longer transcript in parts, each with the end of the one before as context.

429Too Many Requests

The LLM that corrects transcripts is at capacity, or the account has too many corrections and agent chats running at once.

Retry after the seconds in the Retry-After header.

503Service Unavailable

No LLM can correct transcripts right now, for example while it starts up.

Retry in a minute.

POST/transcribe/:job_id/correct

Correct a completed transcription again, with a new prompt or keywords.

Correct a Stored Transcription

Corrects a completed transcription from what the recogniser heard (text_raw), never from an earlier correction, guided by an optional prompt and keywords in a JSON body. The transcription's text becomes the new correction and text_raw stays what was heard, so GET /transcribe/{job_id} serves the new correction from then on. Its webhook is not sent again.Answers and is billed as POST /transcribe/correct does, with the transcription's id.

Path & Query

1
  • job_idstringrequired

    The transcription's ID, as any transcription endpoint returned it.

Request body

2
  • promptstringoptional

    What the transcript is about, such as who is speaking and the subject, up to 2,000 characters.

  • keywordsstring[]optional

    Names and terms the transcript may hold (up to 100, of up to 100 characters each), spelled as they should be written.

Errors

8
403Language not available

The language names a language your account does not include, by name or code (swahili, sw, swh_Latn): Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform. The body's language names it.

Use english, french or nigerian_pidgin, or move the work to the Aethex enterprise platform.

401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

404Job Not Found

No transcription with this ID exists on this account.

Use the id a transcription endpoint returned.

409Conflict

The transcription has no transcript yet: it is pending, processing, failed or cancelled.

Wait for status: completed, then correct it.

422Unprocessable Entity

job_id is not a UUID, or prompt or keywords is over its cap.

Pass the UUID a transcription endpoint returned, and keep prompt and keywords within their caps.

429Too Many Requests

The LLM that corrects transcripts is at capacity, or the account has too many corrections and agent chats running at once.

Retry after the seconds in the Retry-After header.

503Service Unavailable

No LLM can correct transcripts right now, for example while it starts up.

Retry in a minute.

WS/transcribe/stream

Stream audio over a WebSocket and get the transcript while it is spoken.

Stream live transcription

Opens a live transcription session over a WebSocket: wss://api.aethexai.com/api/v1/transcribe/stream. Authenticate with the X-API-Key header on the upgrade request; a key in the query string is refused. The events follow the usual realtime transcription shape, so existing realtime client code needs only the URL and the key changed.1. Configure. Within 15 seconds of connecting, send one session.update with the language, and the sample_rate, encoding, keywords and correct you need. Aethex picks the recognition model for the language. The server answers session.updated once it has taken every setting; a setting it cannot take gets an error event saying which, and the session ends.2. Stream audio. Send input_audio_buffer.append events, each carrying base64 audio in the session's encoding (PCM16 mono unless you set mulaw or alaw) at its sample_rate. A session that sends no audio for 60 seconds is closed.3. Read the transcript. The end of each utterance is found for you: each one arrives as input_audio_buffer.committed, then conversation.item.input_audio_transcription.completed with its transcript. Some sessions also send conversation.item.input_audio_transcription.interim events with the utterance's text so far; the next interim, or the completed event, replaces it. Send input_audio_buffer.commit to end an utterance yourself, and before you close the socket, so the last words come back.A session lasts at most 60 minutes. It is billed per second of audio streamed, at the transcription rate. A mode: understand session bills its audio at the voice-call rate instead, plus its answers' text tokens. Swahili, Hausa and the other African languages, and Arabic, are part of the Aethex enterprise platform: naming one in language without it closes the session with 4403.

Path & Query

9
  • modelstringoptional

    In session.update, optional: leave it unset and Aethex picks the model for the language. session.updated reads it as aethex.

  • languagestringoptional

    In session.update: the language spoken, as language, by name (english, french, nigerian_pidgin) or ISO 639-1 code (en, fr). Leave it out, or send auto, and the session listens for English. A value that is no language (klingon, xx) is refused and ends the session.

  • keywordsstring[]optional

    In session.update: up to 100 names and terms (100 characters each) the recogniser should listen for, such as product or people's names.

  • sample_rateintegeroptional

    In session.update: the rate of the mono audio you send, the same on every model. PCM16 can be 8000, 16000, 24000 or 48000, and 24000 is its default; G.711 (mulaw or alaw in encoding) is 8000 only, its default.

  • encodingstringoptional

    In session.update: the encoding of the audio you send, the same on every model. pcm16 (the default) is 16-bit little-endian PCM; mulaw and alaw are G.711, the 8000 Hz audio phone calls carry, so call audio can be streamed as it arrives. pcm and pcm_s16le also mean pcm16, ulaw, g711_ulaw and pcm_mulaw mean mulaw, and g711_alaw and pcm_alaw mean alaw.

  • modestringoptional

    In session.update: transcribe (default) or understand, which also answers your instructions about each committed segment.

  • instructionsstringoptional

    In session.update, required with mode: understand: what to do with each segment, up to 8,000 characters.

  • promptstringoptional

    In session.update: what the audio is about, up to 4,000 characters. With correct, its first 2,000 characters guide the correction.

  • correctbooleanoptional

    In session.update: correct each utterance with an LLM, as the file endpoints' correct does. Each ...completed event still comes at once, as heard; a conversation.item.input_audio_transcription.corrected event follows with the corrected transcript, the transcript_raw heard, and corrected. session.updated says whether the session is corrected: its correct is false when no LLM can correct it, and no .corrected events follow. Correction's LLM tokens are billed with the session.

Errors

6
4401Unauthorized

The upgrade request had no API key, or an invalid one.

Send a valid X-API-Key header with the upgrade request.

4402Payment Required

The account cannot be billed for transcription, or the API key has spent its credit limit.

Add credits or a payment method, or raise the key's credit limit, then reconnect.

4403Forbidden

The key lacks the transcribe:use scope, language names a language that is part of the Aethex enterprise platform, or model names one your account may not use. The error event's code says which.

Use a key with the transcribe:use scope, standard english or french, and a model your account may use, or leave model out.

4404Not Enabled

Live transcription is turned off in this environment.

Use the file transcription endpoints, or contact support.

4429Too Many Sessions

The key is over its rate limit, the account has too many open sessions, or every stream the model allows is in use (error.code is capacity_full).

Close sessions you no longer need, or retry with backoff.

4503Service Unavailable

The service is restarting or briefly unavailable, or the model is not offered in this environment (error.code is model_not_available).

Reconnect after a few seconds, or choose another model.

DELETE/transcribe/:job_id

Cancel a queued transcription job, or a long recording mid-way.

Cancel Transcription Job

Cancels a job that has not started, or a long recording while it is transcribed: transcription stops before the next piece, and the pieces already transcribed stay in segments and text, and are the only ones billed. Returns status: cancelled. A completed job, or a short job already processing, returns 409.

Path & Query

1
  • job_idstringrequired

    UUID of the transcription job to cancel.

Errors

5
401Unauthorized

Missing or invalid API key.

Include a valid X-API-Key header.

403Forbidden

Your API key does not have the transcribe:use scope.

Use a key with the transcribe:use scope.

404Job Not Found

No job with this ID exists.

Confirm the id from POST /transcribe/async.

409Conflict

The job is completed or cancelled, or it is a short job already processing.

Cancel a job while it is pending, or a long recording while it is processing.

422Invalid Job ID

job_id is not a valid UUID.

Pass the UUID returned by POST /transcribe/async.