Console

Create Transcription

POST/v1/audio/transcriptions

Audio transcription endpoint. Supports multipart file, file_id, url, and audio_url; audio_data is not supported.

Choose transcription mode

ScenariomodelResponse format
Standard audio transcriptionmoss-transcribe-1.0JSON / text
Multi-speaker transcriptionmoss-transcribe-diarize-proJSON with segments; pass stream=true to return SSE

Request parameters

FieldTypeRequiredDescription
model: stringRequired

Model ID. Use moss-transcribe-1.0 for standard transcription; use moss-transcribe-diarize-pro for multi-speaker transcription, keyterms, and SSE streaming output.

file: multipart fileChoose one of four

Upload a local audio or video file directly via multipart/form-data, without first calling the file upload endpoint. Without async=true, the transcription result is returned synchronously. Maximum 512 MB per file.

file_id: stringChoose one of four

Reference the file ID returned by POST /v1/files.

url: stringChoose one of four

Public audio URL accessible to the server; it must not point to localhost, a loopback address, or a private network address.

audio_url: stringChoose one of four

Compatibility field for url with the same access restrictions; use url for new calls.

diarize: booleanOptional

When set to true, returns speaker diarization results. Only moss-transcribe-diarize-pro supports this field; omit it or pass false to return only the complete text.

keyterms: string[]Optional

List of keyterms used to improve recognition accuracy for proper nouns, personal names, brand names, and business terminology. Only moss-transcribe-diarize-pro supports this field; up to 20 keyterms, with a maximum of 30 characters each; omit it or pass [] to disable it. With multipart/form-data, pass a JSON-encoded string array such as ["MOSS","SGLang"].

stream: booleanOptional

Only moss-transcribe-diarize-pro supports true, which returns transcription events over SSE; it cannot be combined with async=true.

response_format: stringOptional

Transcription result format. Non-streaming requests default to json; streaming always returns SSE events, so explicitly use verbose_json.

async: booleanOptional

When set to true, creates an asynchronous task and immediately returns a task object; cannot be combined with stream=true.

webhook_url: stringOptional

The HTTPS URL called back after the asynchronous task completes.

Supported formats and upload limits

ItemDescription
File sizeMaximum 512 MB; direct uploads use the same limit as /v1/files.
Supported formatsAAC, AMR, FLAC, M4A, ALAC, MOV, MP3, MP4, MPG, OGG, OPUS, WAV, WebM, WMA
Audio/video containersMOV, MP4, MPG, and WebM can be transcribed.

Return value

Standard JSON: object

Returns the complete transcription text when response_format=json and diarize is not enabled.

Speaker diarization: object

Returns the complete text and speaker segments when diarize is enabled or response_format=diarized_json is used.

Text: string

Returns plain text directly when response_format=text.

SSE: event stream

When stream=true, server-sent events are returned continuously until completion or failure; the example uses the streaming-only verbose_json format.

Asynchronous task: object

When async=true, immediately returns a task object; retrieve the result from the task query endpoint.

Error codes

HTTPerror.codeTrigger and suggested action
400: 4 error codes

An invalid input source, stream / async combination, or keyterms.

Error details

The following cases return a parameter error:

  • keyterms is not an array of strings.
  • keyterms contains non-string elements.
  • The standard moss-transcribe-1.0 model is used with non-empty keyterms.