Documentation

Synthesis & voice cloning

Soniqo Vox turns text into natural speech. Use a built-in preset voice, or clone your own from a short clip and reuse it on every call. The endpoints are OpenAI- and ElevenLabs-compatible, so existing client code works by changing the base URL.

1. Synthesize speech

The OpenAI-compatible endpoint is the simplest path — point the OpenAI SDK at the Soniqo base URL and call it as usual.

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(base_url="https://api.soniqo.audio/v1", api_key="sk_...")

client.audio.speech.create(
    model="tts-1",
    voice="nova",            # a preset, or a cloned voice_id
    input="Hello from Soniqo.",
).stream_to_file("hello.wav")

Node (OpenAI SDK)

import OpenAI from "openai";
import fs from "fs";

const client = new OpenAI({ baseURL: "https://api.soniqo.audio/v1", apiKey: "sk_..." });

const res = await client.audio.speech.create({
  model: "tts-1",
  voice: "nova",
  input: "Hello from Soniqo.",
});
fs.writeFileSync("hello.wav", Buffer.from(await res.arrayBuffer()));

cURL

curl -X POST https://api.soniqo.audio/v1/audio/speech \
  -H "Authorization: Bearer $SONIQO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tts-1","input":"Hello from Soniqo.","voice":"nova"}' \
  --output hello.wav

2. Low-latency streaming

Set response_format="pcm" to stream raw audio as it is generated — 24 kHz signed 16-bit little-endian mono, the format live voice runtimes expect. The X-Sample-Rate and X-Format response headers describe the stream. (For a full agent setup, see the voice-agents guide.)

curl -X POST https://api.soniqo.audio/v1/audio/speech \
  -H "Authorization: Bearer $SONIQO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"Streamed in real time.","voice":"nova","response_format":"pcm"}' \
  --output out.pcm   # 24 kHz s16le mono

3. Pick a voice

Pass any voice in the voice field. OpenAI voice names (nova, alloy, …) map to a default voice; preset and custom (cloned) voices are addressed by id. List what is available:

# Built-in preset catalog
curl https://api.soniqo.audio/v1/models/synthesize \
  -H "Authorization: Bearer $SONIQO_API_KEY"

# Your own cloned voices
curl https://api.soniqo.audio/v1/voices \
  -H "Authorization: Bearer $SONIQO_API_KEY"

4. Clone a voice

Upload a short reference clip (3–30 s) to register a voice. The clip must be a WAV file, mono, 16 kHz, PCM int16. You get back a voice_id you can use on any synthesis call — cloned voices cost the same per minute as presets, with no extra fee.

# Register (ElevenLabs POST /v1/voices/add-compatible)
curl -X POST https://api.soniqo.audio/v1/voices \
  -H "Authorization: Bearer $SONIQO_API_KEY" \
  -F "name=My narrator" \
  -F "[email protected]" \
  -F "description=Warm documentary read"
# -> { "voice_id": "vox_..." }

Then synthesize with it:

curl -X POST https://api.soniqo.audio/v1/audio/speech \
  -H "Authorization: Bearer $SONIQO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"Now in my own voice.","voice":"vox_..."}' \
  --output cloned.wav

Remove a voice with DELETE /v1/voices/{voice_id}; it stops working immediately.

5. Native endpoint

Prefer a non-OpenAI shape? POST /v1/synthesize takes JSON and returns a complete WAV (mono 48 kHz). Pass voice_id to use a cloned voice.

curl -X POST https://api.soniqo.audio/v1/synthesize \
  -H "Authorization: Bearer $SONIQO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Native synthesis.","voice_id":"vox_..."}' \
  --output out.wav

Pricing

Synthesis is $0.22 per minute of generated audio, billed per second. Cloning is included — there is no per-clone or per-voice fee; you pay only for the audio you generate. See pricing.