Skip to main content
Non-realtime

DashScope synchronous

Sync audio recognition

POST
/api/v1/services/aigc/multimodal-generation/generation
cURL
curl -X POST "https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "qwen3-asr-flash",
  "input": {
    "messages": [
      {
        "content": [
          {
            "text": ""
          }
        ],
        "role": "system"
      },
      {
        "content": [
          {
            "audio": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
          }
        ],
        "role": "user"
      }
    ]
  },
  "parameters": {
    "asr_options": {
      "enable_itn": false
    }
  }
}'
{
  "request_id": "568e2bf0-d6f2-97f8-9f15-a57b11dc6977",
  "output": {
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "annotations": [
            {
              "language": "zh",
              "type": "audio_info",
              "emotion": "neutral"
            }
          ],
          "content": [
            {
              "text": "Welcome to Qwen Cloud."
            }
          ],
          "role": "assistant"
        }
      }
    ]
  },
  "usage": {
    "input_tokens_details": {
      "text_tokens": 0
    },
    "output_tokens_details": {
      "text_tokens": 6
    },
    "seconds": 1
  }
}

Supported audio formats

You can pass audio as a Base64-encoded file, a local file path, or a public URL. For HTTP calls, nest the messages field inside the input object.

Authorizations

string
header
required

DashScope API key. Get your API key from Qwen Cloud console.

Body

application/json
string
required

The model name. Only applicable to Qwen3-ASR-Flash.

object
required

The input object.

object

Additional parameters.

Response

200-application/json
string

The unique identifier for this call. The Java SDK returns this as requestId.

568e2bf0-d6f2-97f8-9f15-a57b11dc6977
object

The call result.

object

Token consumption information.