agentsvc.io

Guide · speech to text

Transcribe audio from your AI agent

Your agent has a voice note, a meeting recording or a podcast episode and needs the text. audio-transcribe runs OpenAI Whisper on our own server and returns the text with timestamps, in about 100 languages with automatic language detection. $0.01 per call of up to 10 minutes, the audio is deleted after the call.

Try it free

The free sample runs our example recording and shows the exact output format:

curl -X POST https://agentsvc.io/api/v1/try/audio-transcribe -H "Content-Type: application/json" -d '{}'

You get text, language, duration and segments with start and end seconds.

JavaScript

npm i @x402/fetch @x402/evm viem

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/audio-transcribe", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ audio_url: "https://example.com/meeting.mp3" }),
});
console.log(await res.json());

Python

pip install "x402[httpx]" eth_account

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

client = x402Client()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
async with x402HttpxClient(client) as http:
    r = await http.post("https://agentsvc.io/api/v1/proxy/audio-transcribe", json={"audio_url": "https://example.com/meeting.mp3"})
    await r.aread()
    print(r.json())

Input

  • audio_url (a public link) or audio_base64: mp3, mp4, m4a, wav, ogg, webm or flac, up to 10 minutes and 24 MB per call.
  • language: ISO code like en or de if you know it; otherwise it is detected.
  • model: small (default, more accurate) or base (about twice as fast).
  • timestamps: set to false if you only need the text.

Longer recordings

Split the file into parts of up to 10 minutes (for example with ffmpeg -f segment -segment_time 600) and send them one after another. Add the start offset of each part to its segment times. If a call returns busy, wait a minute and send it again: busy and failed calls are not charged.

OpenAI-compatible endpoint

Code that already talks to the OpenAI transcription API can switch the base URL. Same price, same x402 or credit-token payment:

curl https://agentsvc.io/v1/audio/transcriptions \
  -H "Authorization: Bearer asvc_cr_..." \
  -F file=@meeting.mp3 -F model=whisper-1

Paying

No account and no API key. Two ways to pay, both only for calls that succeed:

  • Wallet (x402): a separate wallet with a few dollars of USDC on Base, Solana, Polygon or Arbitrum. The x402 client pays the price from the 402 answer and retries; you pay no gas.
  • Credit token: buy one at /credits from $0.10 (card or USDC, +10% bonus) and send it as Authorization: Bearer. Good for a script that runs through a long list.

Details for every client, MCP and frameworks: docs, LangChain, Vercel AI SDK.