Onchain Router Base Mainnet
Base mainnet · USDC paymentsAny verified wallet can pay. Check every payment term and set a local spending limit before signing.

Developer documentation

Transcribe one bounded audio upload

Request fields, payment behavior, response details, and errors for /v1/audio/transcriptions.

Page tools

Transcribe one bounded audio upload

POST /v1/audio/transcriptions

Operation ID: createTranscription. The canonical machine-readable schema is OpenAPI.

Request body

The public endpoint accepts one MP3 file between the limits published by GET /v1/models. Agents may send canonical Base64 JSON; file-upload clients may use standard multipart form data. The service decodes and inspects the audio before calculating a truthful duration-based maximum. Use a fresh, stable x-idempotency-key and repeat the identical effective request after signing the HTTP 402 challenge.

JSON for agents

json
{
  "audio_base64": "<canonical Base64 MP3 bytes>",
  "model": "elevenlabs/scribe-v2",
  "file_format": "other",
  "response_format": "json"
}

Do not include a data-URL prefix or whitespace in audio_base64.

Multipart file upload

bash
curl --request POST https://llm.agenticfi.wtf/v1/audio/transcriptions \
  --header "x-idempotency-key: 11111111-1111-4111-8111-111111111111" \
  --form "file=@speech.mp3;type=audio/mpeg" \
  --form "model=elevenlabs/scribe-v2" \
  --form "response_format=json"

An ordinary command-line request receives HTTP 402 and does not pay. Validate and sign that challenge with an official x402 client, then repeat the same JSON or multipart request with the payment header. Do not replace the MP3 or change any option between attempts.

Payment lifecycle

The first request returns Hypertext Transfer Protocol (HTTP) status 402 without calling the model provider. Check the Base network, United States Dollar Coin (USDC) contract, payment recipient, expiry time, payment scheme, and maximum amount. Sign locally with an official x402 client, then retry the identical effective request with the same idempotency key.

After success, read the PAYMENT-RESPONSE, X-Request-ID, X-Receipt-ID, and X-Catalog-Version headers together with the receipt link. The response is released only after the result, payment, and receipt are safely stored.

Read the response

Read the transcript from text and measured duration from usage.input_audio_ms. The JSON response can also include detected language, language probability, word timestamps, speaker labels when diarization is enabled, and tagged non-speech events. The uploaded audio is not returned.

Provider retention

ElevenLabs receives the uploaded audio and transcript output in its standard retained mode and may retain both under the applicable agreement, account settings, and privacy policy. Onchain Router attempts to delete its own encrypted staging after every definite provider result. After an ambiguous result, local staging becomes logically inaccessible at its one-hour expiry; encrypted bytes may remain beyond the one-day storage-lifecycle threshold until Azure completes its next lifecycle scan. Local deletion does not delete ElevenLabs' copy. Do not submit sensitive or regulated audio.

Responses

  • 200: Durably settled response with X-Receipt-ID and PAYMENT-RESPONSE headers
  • 400: Invalid or unsupported request
  • 402: Payment required. The PAYMENT-REQUIRED header is authoritative and contains the official x402 challenge.
  • 409: Idempotency key reused with a different effective request
  • 503: Provider, payment, or safety dependency unavailable
Reviewed 2026-08-21Catalog d815ab0e8989

Search guides, endpoint references, models, and pricing.