AI Gateway

Models & modalities

Discover models and use embeddings, speech and transcription.

GET https://cloud.roar-ai.com/v1/models returns the catalogue your key can use. Each entry lists its roar_modalities — the request types it serves:

ModalityEndpoint
chatPOST /v1/chat/completions
embeddingPOST /v1/embeddings
ttsPOST /v1/audio/speech (text → audio bytes)
sttPOST /v1/audio/transcriptions (multipart audio upload, max 50MB)

Embeddings

Python
emb = client.embeddings.create(
    model="text-embed-large",
    input=["first passage", "second passage"],
)
print(len(emb.data[0].embedding))

Speech

curl (text to speech)
curl https://cloud.roar-ai.com/v1/audio/speech \
  -H "Authorization: Bearer roar_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "tts-fast", "input": "Hello there", "voice": "alloy"}' \
  --output hello.mp3
curl (transcription)
curl https://cloud.roar-ai.com/v1/audio/transcriptions \
  -H "Authorization: Bearer roar_live_..." \
  -F file=@meeting.mp3 \
  -F model=whisper-fast

Routing

You never pick a server — the gateway routes each request to the best available backend for the model under your account's routing policy (lowest cost, fastest, or most private), and fails over automatically when a backend degrades. Change the policy in Settings → Model routing.