Create audio through AiSpace
Two families:
| Kind | Lifecycle | Paid step |
|---|---|---|
| Music / SFX | quote → queue → retrieve → complete | POST /api/v1/audio/queue |
| Speech (TTS) | one request | POST /api/v1/audio/speech |
| Voice Changer | quote → queue → retrieve → complete | POST /api/v1/audio/voice-changer/queue |
quote / retrieve / complete are free. Origin: https://x402.aispace.bot. Pay this marketplace, not Venice.
Music and sound effects
POST /api/v1/audio/quote → { quote } agent charge (free)
POST /api/v1/audio/queue → { queue_id, model, status? } (paid)
POST /api/v1/audio/retrieve → PROCESSING json OR binary audio (free)
POST /api/v1/audio/complete → cleanup (free)- Catalog —
GET /api/v1/models?type=music(short-clip ids first). 60s-floor models such asace-step-15only appear with?floor=all. Copyduration_secondsfrom that row (min_duration/max_duration). ACE-Step lengths are the fixed set60|90|120|150|180|210. - Quote (free) —
model+duration_seconds(orcharacter_countwhen the model is priced that way). Do not sendprompt— Venice rejects it; this gateway strips it.{ quote }is the agent charge. - Queue (paid) — required
model,prompt. Optionalduration_seconds,lyrics_prompt(aliaslyricsis remapped). Unpaid → 402. Savequeue_id.
Reference clips (reference_audio_urls) are optional and only for models whose catalog row has supports_reference_audios=true (live catalog: Seed Audio 1.0, max_reference_audios 3). Send base64 audio data URLs (data:audio/mpeg;base64,... or WAV). http(s) links are rejected. Each clip is audio without video, at most 30 seconds and 10 MB; all clips together at most about 22 MB. Mention them in the prompt in order as @Audio1, @Audio2. Do not send a preset voice with clips — omit voice, or set it to Describe in prompt.
loop: true is optional and only when that row has supports_loop=true (live catalog: ElevenLabs Sound Effects). Other models are refused before payment.
Neither field is on /audio/quote. The quote stays model + duration_seconds (or character_count). This gateway strips clips, loop, prompt, and voice from the quote so the number you budget is the number queue charges. A quote 200 is still not proof the queue body will run.
4. Retrieve (free) — { model, queue_id }. Processing: JSON timings; poll ~2–5s. Done: binary audio, or JSON with download_url (download that URL, then complete). Optional delete_media_on_completion: true.
5. Complete (free) — { model, queue_id }. After a successful binary retrieve this gateway may return { success: true, alreadyCompleted: true }.
A quote 200 is not proof the queue body will run.
Speech (sync)
POST /api/v1/audio/speech — required model, input, voice. Catalog: GET /api/v1/models?type=tts (example: tts-kokoro). voice must be one that model lists (a wrong voice is 400). response_format must be in model_spec.supported_formats (mp3 / opus / aac / flac / wav / pcm).
200 is binary audio/*. Paid per request (cheap calls often hit the min-charge floor — budget from the live 402).
To clone a voice first: POST /api/v1/audio/voices (multipart: exact catalog model + sample file). 200 JSON is { id, model } — not voice_id. Pass that id as voice on /audio/speech with the same model.
Voice Changer
Same free/paid split: POST /api/v1/audio/voice-changer/quote, /audio/voice-changer/queue, /audio/voice-changer/retrieve, /audio/voice-changer/complete.
- Quote (free):
model+duration_seconds(source length). Catalog rows withmodel_spec.voice_changer=true(example:elevenlabs-voice-changer). Do not send the recording here. - Queue (paid): same
duration_secondsplusaudio_urlXOR multipartfile. - Retrieve / complete: same as music.
Cost
Music and Voice Changer charge at queue (server re-quotes Venice). Speech is a sync list-rate call. Quote async jobs before paying.