Transcribe audio¶
Upload an audio file and use an available Genesis speech-recognition model to return its transcript. This endpoint returns a complete synchronous response.
POST https://token.moi.matrixorigin.cn/v1/audio/transcriptions
Before you begin¶
Select a speech-recognition model in the model marketplace and confirm that your credential can call it through List models. Preserve its public model ID.
Prepare an audio file. Synchronous Qwen3-ASR Flash transcription is intended for short recordings of about five minutes or less, subject to the size limits below.
Public model IDs depend on the deployment. An upstream provider’s native model name is not a substitute.
Request parameters¶
Use a local WAV file and the selected public model ID:
export ASR_MODEL_ID='<公开语音识别模型 ID>'
curl --fail-with-body "$GENESIS_BASE_URL/audio/transcriptions" -H "Authorization: Bearer $GENESIS_ACCESS_TOKEN" -F "model=$ASR_MODEL_ID" -F 'language=zh' -F 'file=@sample.wav;type=audio/wav'
When using -F, let cURL generate Content-Type with its boundary. Upload one audio file per request. Do not replace the file part with JSON, a file URL, or a Base64 string.
Field |
Location |
Required |
Description |
|---|---|---|---|
|
Multipart file |
Yes |
A nonempty audio file with a correct MIME type or recognized extension. |
|
Multipart form |
Yes |
ID, name, or alias of an enabled public ASR model available to the credential. |
|
Multipart form |
No |
Language code, such as |
Each field may appear only once. This API is nonstreaming. Unlisted form fields are not supported options; do not add stream, response_format, or timestamp parameters.
Format |
File extension |
Recommended MIME type |
|---|---|---|
WAV |
|
|
MP3 |
|
|
M4A |
|
|
WebM |
|
|
OGG |
|
|
FLAC |
|
|
Base64-encoded audio must not exceed 10 MiB, corresponding to about 7.5 MiB of raw audio. The deployment’s request-size limit can be smaller. Shorten or split oversized recordings rather than renaming their extensions.
Successful response¶
{
"text": "你好,这是一段语音转写示例。",
"model": "<公开语音识别模型 ID>",
"request_id": "<上游请求 ID>",
"usage": {"seconds": 48}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Complete transcript. An upstream success without valid text is treated as an error. |
|
string |
Requested public model identifier. |
|
string |
Optional; returned when supplied by the provider. Preserve it for troubleshooting. |
|
object |
Optional provider-reported usage. Duration in |
Error response¶
Errors use the Genesis OpenAI-compatible error structure. Preserve the HTTP status, message, and available request ID.
HTTP status |
What to check |
|---|---|
|
Multipart encoding, nonempty file and model, duplicate fields, and language syntax. |
|
Credential validity and a single authentication header. |
|
Public model existence, enabled state, and access. |
|
Encoded audio size and deployment request-size limit; shorten the input. |
|
Rate-limit feedback before retrying. |
|
Missing provider ASR endpoint; contact the deployment administrator. |
|
Invalid upstream response or empty transcript. |
|
No available provider route for the model. |
A timeout does not establish that processing never ran. Inspect request records before retrying to avoid duplicate calls and charges.