Aller au contenu principal
Velqa

Text-to-Speech with Velqa.dev

Velqa offers text-to-speech via kokoro-tts (hexgrad, via DeepInfra), on the OpenAI-compatible API https://api.velqa.dev/v1/audio/speech. You send text and a voice, and the API returns the audio bytes directly (mp3). Supports 8 languages. Ideal for voice readers, spoken notifications and voice prototypes.

Pricing and access

Like audio transcription and images, text-to-speech is billed per usage (per character), from your Recharge Boost balance (prepaid credit) — it is not included in any Starter/Dev/Pro plan.

  • Indicative price: ~20 MAD / M chars
  • Access: any account with a positive Boost balance
  • The real cost depends on the number of characters in the input text, debited from your Boost balance.

If the Boost balance is insufficient, the request is rejected (HTTP 402) before it ever reaches the model.

Example with curl

curl https://api.velqa.dev/v1/audio/speech \
  -H "Authorization: Bearer $VELQA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"kokoro-tts","input":"Hello, welcome to Velqa.","voice":"af_heart"}' \
  --output output.mp3

Example with Python

from openai import OpenAI

client = OpenAI(base_url="https://api.velqa.dev/v1", api_key="VELQA_API_KEY")
resp = client.audio.speech.create(
    model="kokoro-tts",
    voice="af_heart",
    input="Hello, welcome to Velqa.",
)
resp.stream_to_file("output.mp3")

The response is a stream of audio bytes (mp3) to write to a file — not JSON. The real cost (based on the number of characters in input) is debited from your Boost balance.

See also