Transcribe audio

by Z.ai

zai/glm-asr-2512

Turn a short recording into text.

Billed per
second
Price
Price: $0.00004
Provider
Z.ai
Timeout
5 min

Overview

Takes a short audio recording and returns what was said as text. The audio is sent as base64 and the gateway builds the upload for you, so no multipart handling is needed on the caller's side. Recordings must be brief and modest in size; longer material should be split and submitted in pieces. Billing counts the seconds of audio, measured from the recording itself when it carries a readable header and from the duration you declare otherwise.

The transcript, with the request id and the model that produced it.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
audio_base64base64YesThe recording, base64-encoded.
filenamestringNoA name for the uploaded file, which sets its extension.
content_typestringNoMedia type of the recording.
duration_secondsnumberNoLength of the recording, used for billing when the audio carries no readable header.
languagestringNoA language hint, forwarded with the upload.

Requests up to 35 MB, audio up to 25 MB.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"zai","endpoint":"glm-asr-2512","input":{"audio_base64":"UklGRiQAAABXQVZFZm10IBAAAAABAAEA...","filename":"meeting.wav","content_type":"audio/wav"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

$0.00004 per second using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions