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 Whisper-shaped SDK at this gateway and pay per call with USDC, no account and no API key. Same model and same four-minute cap as /api/transcribe, which takes a URL instead of an upload; /v1/pro/audio/transcriptions takes it to ten minutes.
Input
| Field | Type | Description |
|---|---|---|
file * | string | The audio file, as a multipart part named `file` |
language | string | Optional ISO-639-1 hint |
Example output
{
"text": "Example transcript.",
"duration": 3.2,
"model": "gpt-transcribe"
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/v1/audio/transcriptions \
-H "Content-Type: application/json" \
-d '{"file":"<audio bytes, multipart part named file>","language":"en"}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
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";
import { metaTitle, metaDescription } from "./seo-meta.js";
const client = new x402Client();
client.setSpendControls?.(false); // @x402/core 2.23+ refuses anything over $1 or off the pegged-asset list by default; keep your own ceiling in code instead
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/v1/audio/transcriptions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"file": "<audio bytes, multipart part named file>",
"language": "en"
}),
});
Related tools
LLM inference
POST /api/llmLLM inference proxy - send an OpenAI-format chat/completions request and get a response from GPT-4o-mini. Supports visio…
try in playground →LLM inference (Pro)
POST /api/llm-proLLM inference proxy (Pro tier) - GPT-4o or GPT-4.1. Supports vision (up to 2 image URLs) and structured output (response…
try in playground →LLM inference (Premium)
POST /api/llm-premiumLLM inference proxy (Premium tier) - o3 or o3-mini reasoning models. Supports vision (up to 2 image URLs) and structured…
try in playground →