Audio
Minimum-discount routing: Prefix either path with a min{N} segment (e.g. /min30/v1/audio/speech or /min30/v1/audio/transcriptions) to require marketplace seller offers to meet a minimum estimated buyer discount before routing. Buyer-owned providers are not covered. See Minimum-Discount Routing.
OpenAI-compatible text-to-speech (POST /v1/audio/speech) and speech-to-text transcriptions (POST /v1/audio/transcriptions) routed through the marketplace. See Media Capabilities and Contracts for canonical input ceilings, host capability coverage, response headers, and the full error taxonomy.
Text-to-Speech
Auth: API key (Authorization: Bearer inf_***), or pay-per-request via x402 (PAYMENT-SIGNATURE). With no auth, the endpoint returns 402 advertising x402. See Buyer endpoints.
modelstringrequiredTTS model ID, e.g.venice-kokoro-tts,venice-tts-1,venice-elevenlabs-tts-turbo-v2-5,tts-xai-v1. QueryGET /v1/models?type=ttsfor the live cataloginputstringrequiredText to synthesize (default ceiling: 4,096 characters)voicestringModel-native voice ID or one of the 9 canonical OpenAI voices (alloy,nova,echo,fable,onyx,shimmer,ash,coral,sage), automatically mapped to the selected model's voice setresponse_formatstringOutput audio format:mp3,opus,aac,flac,wav, orpcm. When a seller host does not natively emit the requested format, the marketplace transcodes pre-settlement where enabled or returns400 unsupported_response_formatspeednumberPlayback speed (0.25to4.0)providerstring | string[]Optional provider pin (see Routing Controls)providers_blockedstring | string[]Providers excluded from routing
Response: raw binary audio bytes with the matching Content-Type (for example audio/mpeg for mp3 or audio/wav for wav), plus unconditional X-Request-Id and X-SI-Model-Alias (when an alias resolves), sync-only X-SI-Adapted-Params (when params are adapted or stripped), and mutually exclusive rollout-gated headers X-SI-Resolved-Params (MEDIA_STANDARDIZATION_MODE=enforce only) or X-SI-Deprecation (MEDIA_STANDARDIZATION_MODE=shadow only for unknown/unhonored params).
Pricing: character-metered ($/1K characters × winning seller discount), settled in USDC microdollars before bytes are streamed back.
curl $SURPLUS_BASE_URL/audio/speech \ -H "Authorization: Bearer inf_***" \ -H "Content-Type: application/json" \ -d '{ "model": "venice-kokoro-tts", "input": "Hello from Surplus Intelligence.", "voice": "nova", "response_format": "mp3" }' \ --output speech.mp3
import OpenAI from 'openai'; const client = new OpenAI({ baseURL: '$SURPLUS_BASE_URL', apiKey: process.env.SURPLUS_API_KEY, }); const response = await client.audio.speech.create({ model: 'venice-kokoro-tts', voice: 'nova', input: 'Hello from Surplus Intelligence.', response_format: 'mp3', }); const audioBuffer = Buffer.from(await response.arrayBuffer());
Speech-to-Text (Transcriptions)
Auth: API key (Authorization: Bearer inf_***) or session cookie. Multipart multipart/form-data request.
filefilerequiredAudio file upload (max 25 MB). Allowed formats:wav,mp3,mp4,m4a,mpeg,mpga,ogg,webm,flacmodelstringrequiredSTT model ID, e.g.venice-whisper-large-v3,venice-whisper-1,venice-parakeet-asr,elevenlabs-scribe-v2. QueryGET /v1/models?type=sttfor the live cataloglanguagestringOptional ISO-639-1 language hint (e.g.en)promptstringOptional conditioning prompt (default ceiling: 2,000 characters)response_formatstringjson(default),text,srt,vtt, orverbose_jsontemperaturenumberSampling temperature (0to1)
Pricing: duration-metered ($/minute × winning seller discount), derived from the uploaded audio clip duration and settled in USDC microdollars.
curl $SURPLUS_BASE_URL/audio/transcriptions \ -H "Authorization: Bearer inf_***" \ -F file="@meeting.mp3" \ -F model="venice-whisper-large-v3" \ -F response_format="json"
{
"text": "Hello from Surplus Intelligence."
}Errors
| Status | Code | When |
|---|---|---|
400 | invalid_request | Malformed parameters or input/prompt exceeding the character ceiling |
400 | invalid_request_error | Missing file, unsupported audio MIME/extension, or upload exceeding 25 MB on /v1/audio/transcriptions |
400 | file_too_large | Multipart upload exceeds the hard file-size limit |
400 | unsupported_parameter | Unknown parameter key sent for the audio modality |
400 | unsupported_voice | Requested TTS voice is neither natively supported nor mappable from a canonical OpenAI voice |
400 | unsupported_response_format | Requested audio or transcript response_format is unsupported or transcoding failed pre-settlement |
402 | insufficient_credit / insufficient_balance / insufficient_allowance | Account balance cannot cover the request |
404 | model_not_found | Model ID is not in the media catalog |
404 | no_sellers_for_model | No listed seller serves this model on this endpoint |
404 | minimum_discount_not_met | No eligible healthy seller meets the /min{N} discount threshold |
502 | provider_error | Upstream provider failed after healthy failover candidates were exhausted |
503 | sellers_unavailable / no_healthy_sellers | No candidate seller is currently healthy or available (retryable) |
400Code · invalid_requestWhen · Malformed parameters or input/prompt exceeding the character ceiling400Code · invalid_request_errorWhen · Missing file, unsupported audio MIME/extension, or upload exceeding 25 MB on /v1/audio/transcriptions400Code · file_too_largeWhen · Multipart upload exceeds the hard file-size limit400Code · unsupported_parameterWhen · Unknown parameter key sent for the audio modality400Code · unsupported_voiceWhen · Requested TTS voice is neither natively supported nor mappable from a canonical OpenAI voice400Code · unsupported_response_formatWhen · Requested audio or transcript response_format is unsupported or transcoding failed pre-settlement402Code · insufficient_credit / insufficient_balance / insufficient_allowanceWhen · Account balance cannot cover the request404Code · model_not_foundWhen · Model ID is not in the media catalog404Code · no_sellers_for_modelWhen · No listed seller serves this model on this endpoint404Code · minimum_discount_not_metWhen · No eligible healthy seller meets the /min{N} discount threshold502Code · provider_errorWhen · Upstream provider failed after healthy failover candidates were exhausted503Code · sellers_unavailable / no_healthy_sellersWhen · No candidate seller is currently healthy or available (retryable)