GRGlobalRouter Docs
Console

Audio / POST

Create transcription

Transcribe Base64 audio into text.

POST /api/v1/audio/transcriptions

Use Qwen3 ASR Flash FileTrans. GlobalRouter securely stages the audio, then returns normalized transcription JSON.

Back to Audio endpoint list

Request parameters

FieldTypeRequiredDescription
modelstringYesAlways qwen3-asr-flash-filetrans.
input_audio.datastringYesRaw Base64 audio content; omit the data: URI prefix.
input_audio.formatstringYesInput format, such as mp3, wav, m4a, ogg, opus, or webm; supported formats are determined by endpoint validation.
languagestringNoAudio language, such as zh, en, or ja; detected upstream when omitted.
response_formatstringNoResponse format: json or verbose_json; defaults to json.
temperaturenumberNoSampling temperature, from 0 to 1.
timestamp_granularitiesstring[]NoWith verbose_json, segment and word timestamps may be requested.
provider.provider_idstringNoOnly ali is supported; omitted values also route to ali.
provider.options.ali.enable_itnbooleanNoWhether to enable inverse text normalization; defaults to false.
provider.options.ali.channel_idinteger[]NoCurrently only [0] is supported; defaults to [0].

Request examples

Create transcription request examples
curl -X POST "https://api.globalrouter.com/api/v1/audio/transcriptions" \
  -H "Authorization: Bearer $GR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-asr-flash-filetrans",
    "input_audio": {
      "data": "<BASE64_AUDIO>",
      "format": "wav"
    },
    "language": "zh",
    "response_format": "verbose_json",
    "timestamp_granularities": ["segment", "word"],
    "provider": {
      "provider_id": "ali",
      "options": {
        "ali": {
          "enable_itn": false,
          "channel_id": [0]
        }
      }
    }
  }'

Response fields

FieldTypeRequiredDescription
textstringYesComplete transcription text.
usage.secondsnumberYesBillable audio duration in seconds.
usage.costnumberYesCost of this transcription.
taskstringNoTask type, set to transcribe.
languagestringNoDetected language.
durationnumberNoAudio duration in seconds.
segmentsobject[]NoSegment text and time ranges returned with verbose_json when segment is requested.
wordsobject[]NoWord-level time ranges returned with verbose_json when word is requested.
X-Generation-IdheaderYesGlobalRouter generation record ID for troubleshooting.

Response example

Response example
{
  "text": "你好,欢迎使用 GlobalRouter。",
  "usage": {
    "seconds": 2.4,
    "cost": 0.000528
  },
  "task": "transcribe",
  "language": "zh",
  "duration": 2.4,
  "segments": [
    { "id": 0, "start": 0, "end": 2.4, "text": "你好,欢迎使用 GlobalRouter。" }
  ],
  "words": [
    { "word": "你好", "start": 0, "end": 0.6 }
  ]
}

Errors

HTTPCodeDescription
400ROUTER_AUDIO_MODEL_UNSUPPORTEDmodel is not a currently supported ASR model.
400ROUTER_AUDIO_PROVIDER_UNSUPPORTEDprovider_id is not ali.
422validation_errorBase64, audio format, or provider options violate request constraints.

Notes

  • The endpoint requires an API key with tasks scope and permission to use the requested model.
  • timestamp_granularities applies only when response_format is verbose_json.