Speech-to-text, long audio (OpenAI transcription wire)
POST /v1/pro/audio/transcriptionsOpenAI's transcription wire on the ten-minute tier: POST multipart/form-data with a `file` part. Send POST /v1/pro/audio/transcriptions with the required field file and pay $0.100 per call over x402 or MPP (there is no free tier). It returns a JSON object with text, duration and model.
Same model as /v1/audio/transcriptions with a longer cap, for a recording a four-minute route refuses.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | string | yes | The audio file, as a multipart part named `file` |
language | string | no | Optional ISO-639-1 hint |
diarize | string | no | "true" for speaker labels and word timestamps (ElevenLabs Scribe v2) |
Example request
curl -i -X POST https://agent402.tools/v1/pro/audio/transcriptions \
-H "Content-Type: application/json" \
-d '{"file":"<audio bytes, multipart part named file>"}'
Without payment this returns HTTP 402 Payment Required with the exact price for v1-audio-transcriptions-pro; any x402 v2 or MPP client pays it and retries.
Example response
{
"text": "Example transcript.",
"duration": 420.5,
"model": "gpt-transcribe"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
text | string | yes | Example transcript. |
duration | number | yes | 420.5 |
model | string | yes | gpt-transcribe |
From an MCP client
catalog.call {
"slug": "v1-audio-transcriptions-pro",
"params": {
"file": "<audio bytes, multipart part named file>"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for v1-audio-transcriptions-pro; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
fileis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool runs a model, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - Model-backed: the answer is generated by a model, so the same input can produce different wording.
- A
GETorHEADto /v1/pro/audio/transcriptions returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB and a streamed response are not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/v1/pro/audio/transcriptions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"file": "<audio bytes, multipart part named file>"
}),
});
Related tools
Speech-to-text
POST /api/transcribeTranscribe audio to text using OpenAI (gpt-transcribe). Provide a URL to an audio file (mp3, wav, m4a, etc.) and get bac…
Speech-to-text (Pro)
POST /api/transcribe-proTranscribe audio to text using OpenAI (gpt-transcribe) - the same model as /api/transcribe with a longer cap. Provide a …
Speech-to-text (OpenAI transcription wire)
POST /v1/audio/transcriptionsOpenAI's own transcription wire: POST multipart/form-data with a `file` part and get the transcript back. Point any Whis…
Decisions (OpenAI wire)
POST /v1/decisionsOpenAI's Decisions API on its own wire: point an OpenAI SDK's base URL here and client.decisions.create works unchanged,…
Text embeddings
POST /api/embedGenerate a text embedding vector using OpenAI text-embedding-3-small (1536 dimensions). Ideal for semantic search, RAG, …
Text embeddings (Large)
POST /api/embed-largeGenerate a text embedding vector using OpenAI text-embedding-3-large (3072 dimensions). Higher accuracy than the small m…