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":"black-forest-labs/flux-3","prompt":"a lime fork on black","size":"1024x1024"}'
Images come back as links in data[].url that work for 24 hours. Set n (up to 4) for several images. Other models include FLUX 3 Klein, Nano Banana 2.1, Seedream 5.0, Qwen Image 3, Krea 3, Ideogram 4.5, Recraft V4.1, Grok Imagine, Luma Uni-1 and more (ids on the models page).
Editing (models tagged edit, e.g. black-forest-labs/flux-3-edit, google/nano-banana-2.1-edit): send the instruction as prompt plus image_url, or image_urls for several reference images (https URLs or data:image/... URIs), to the same endpoint.
Video
Videos take 1–5 minutes, so they run as jobs. Credit is reserved when the job starts and charged only when the video is ready; failed videos are free. Set seconds (allowed values are on each model's page) and size (e.g. 1280x720 or 720x1280). Image-to-video models (ids ending in -i2v) also need image_url: an https URL or a data:image/... URI of the start frame.
curl https://solorouter.ai/api/v1/videos -H "Authorization: Bearer $SOLO_KEY" \ -H "Content-Type: application/json" -d '{"model":"kuaishou/kling-4","prompt":"a paper boat on a rainy street","size":"1280x720","seconds":5}' # -> {"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.