Speech-to-text
POST /api/transcribeTranscribe audio to text using OpenAI (gpt-4o-mini-transcribe). Provide a URL to an audio file (mp3, wav, m4a, etc.) and get back the transcript. No API key needed; pay per call via x402. Max 5 minutes of audio, 25 MB file size.
Input
| Field | Type | Description |
|---|---|---|
url * | string | URL of the audio file to transcribe (mp3, wav, m4a, ogg, flac, webm) |
language | string | Optional ISO-639-1 language code (e.g. 'en', 'es', 'fr') for better accuracy |
Example output
{
"model": "gpt-4o-mini-transcribe",
"provider": "openai",
"text": "Hello, this is a sample transcription.",
"language": "en",
"duration": 3.5
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/transcribe \
-H "Content-Type: application/json" \
-d '{"url":"https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg"}'
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";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/transcribe", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg"
}),
});
Part of these workflows
This tool is one step in a curated multi-tool workflow - agents can fetch the whole sequence as an MCP prompt or call https://agent402.tools/api/skill-packs/{slug}/prompt.
- Subtitle pipeline - Audio URL → finished subtitles in one call: transcribe the audio, emit the transcript as SRT/WebVTT/JSON cues, and report the text statistics - length, reading time, word count.
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…
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…
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…