Quickstart
Solo Router uses the standard chat-completions request format that most AI tools and libraries already support. Send requests to our base URL with your Solo Router key, and choose any model by its ID.
1. Base URL and key
Base URL: https://solorouter.ai/api/v1 Header: Authorization: Bearer sr-v1-...
Create keys on the Keys page. Keys are shown once, so store them safely.
2. Chat completions
curl https://solorouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $SOLO_KEY" -H "Content-Type: application/json" \ -d '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'
Python
import requests r = requests.post("https://solorouter.ai/api/v1/chat/completions", headers={"Authorization": "Bearer sr-v1-..."}, json={"model": "z-ai/glm-5.3", "messages": [{"role": "user", "content": "Hello"}]}) print(r.json()["choices"][0]["message"]["content"])
JavaScript
const r = await fetch("https://solorouter.ai/api/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.SOLO_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ model: "moonshotai/kimi-k3", messages: [{ role: "user", content: "Hello" }] }), }); console.log((await r.json()).choices[0].message.content);
Using an existing AI tool or library
Tools like LangChain, Cline, Continue, LibreChat or Open WebUI have a "base URL" or "custom provider" setting. Set it to https://solorouter.ai/api/v1, paste your Solo Router key, and type a model ID from the Models page.
Streaming
Set "stream": true. You get standard server-sent events, and the last chunk carries usage with the request's cost.
Images
curl https://solorouter.ai/api/v1/images/generations \ -H "Authorization: Bearer $SOLO_KEY" -H "Content-Type: application/json" \ -d '{"model":"stabilityai/stable-diffusion-3.5-large","prompt":"a lime fork on black","size":"1024x1024"}'
Images come back as base64 PNG in data[0].b64_json.
Also available: black-forest-labs/flux-schnell (fast, per megapixel) and stabilityai/fast-sdxl. These return image URLs in data[].url.
Video
Videos take 1–3 minutes, so they run as jobs. You're charged only when the video is ready.
curl https://solorouter.ai/api/v1/videos -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" -d '{"model":"alibaba/wan-2.2-t2v","prompt":"a paper boat on a rainy street","size":"1280x720"}' # -> {"id":"vid_...","status":"queued"}. Poll until "completed": curl https://solorouter.ai/api/v1/videos/vid_... -H "Authorization: Bearer $SOLO_KEY" curl -o video.mp4 https://solorouter.ai/api/v1/videos/vid_.../content -H "Authorization: Bearer $SOLO_KEY"
Text to speech
curl https://solorouter.ai/api/v1/audio/speech -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen/qwen3-tts","input":"Hello!","instructions":"A warm, calm voice"}' -o hello.mp3
Models: qwen/qwen3-tts (describe the voice in instructions) and elevenlabs/multilingual-v2. Billed per character; the cost is in the X-Solo-Cost-USD response header.
Music and sound
curl https://solorouter.ai/api/v1/audio/generations -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" -d '{"model":"stabilityai/stable-audio-2.5","prompt":"upbeat synth jingle","seconds":10}'
Reranking
curl https://solorouter.ai/api/v1/rerank -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" -d '{"model":"baai/bge-reranker-v2-m3","query":"cat food","documents":["dry cat food","car parts"]}'
Embeddings
curl https://solorouter.ai/api/v1/embeddings -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" -d '{"model":"baai/bge-m3","input":"hello"}'
Other endpoints
GET /api/v1/models: every model with its per-token priceGET /api/v1/credits: your remaining balance
Errors
401: missing or invalid key402: out of credits, or the key reached its spending limit400: unknown model or bad request5xx: the model provider had a problem. Safe to retry.
Model IDs
Use the full ID (z-ai/glm-5.3) or the short form (glm-5.3). The full list is on the Models page.