The gateway is OpenAI-compatible. Point any OpenAI SDK at https://api.allais.com/v1 with an All AIs API key.
Create a key under API keys. All AIs Desktop uses your sign-in token instead of a key — both work anywhere a Bearer token is accepted.
Authorization: Bearer aai-…
The model field selects where the request goes:
qwen3-14b) or its catalog id — runs on your private GPU. Included in the hourly price.openai/gpt-4o, anthropic/claude-sonnet-4-5) — passes through with your own key; the provider bills you directly.curl https://api.allais.com/v1/chat/completions \
-H "Authorization: Bearer $ALLAIS_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "qwen3-14b", "messages": [{"role": "user", "content": "Hello"}], "stream": true}'from openai import OpenAI
client = OpenAI(base_url="https://api.allais.com/v1", api_key="aai-...")
r = client.chat.completions.create(model="anthropic/claude-sonnet-4-5", messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)Also proxied: /v1/completions, /v1/embeddings and any other OpenAI-style POST your engine supports. GET /v1/models lists what your key can reach right now.
| Prefix | Provider | Example models |
|---|---|---|
| openai/ | OpenAI | gpt-5, gpt-5-mini, gpt-4.1 |
| anthropic/ | Anthropic | claude-sonnet-4-5, claude-opus-4-1, claude-sonnet-4 |
| google/ | Google Gemini | gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash |
| xai/ | xAI (Grok) | grok-4, grok-3, grok-3-mini |
| deepseek/ | DeepSeek | deepseek-chat, deepseek-reasoner |
| mistral/ | Mistral | mistral-large-latest, mistral-medium-latest, codestral-latest |
| groq/ | Groq | llama-3.3-70b-versatile, openai/gpt-oss-120b, qwen/qwen3-32b |
| openrouter/ | OpenRouter | anthropic/claude-sonnet-4.5, openai/gpt-5, google/gemini-2.5-pro |
# list
curl https://api.allais.com/api/deployments -H "Authorization: Bearer $ALLAIS_API_KEY"
# create — the platform sources the cheapest capable GPU for the shape you ask for
curl https://api.allais.com/api/deployments -X POST -H "Authorization: Bearer $ALLAIS_API_KEY" -H "Content-Type: application/json" \
-d '{"catalogId":"qwen3-14b","engine":"llamacpp","gpu":"L4-24G","gpuCount":1,"name":"qwen3-14b"}'
# any Hugging Face repo, bigger GPU, vLLM engine
-d '{"customRepo":"Qwen/Qwen2.5-32B-Instruct","engine":"vllm","gpu":"A100-40G","gpuCount":2}'
# your own hardware (connector), $0/hr
-d '{"catalogId":"qwen3-8b","engine":"llamacpp","placement":"byoc","gpu":"L4-24G","name":"office-box"}'
# stop / start / delete
curl https://api.allais.com/api/deployments/DEP_ID -X PATCH -H "Authorization: Bearer $ALLAIS_API_KEY" -H "Content-Type: application/json" -d '{"action":"stop"}'
curl https://api.allais.com/api/deployments/DEP_ID -X DELETE -H "Authorization: Bearer $ALLAIS_API_KEY"Get the cost first with POST /api/quote {"gpu","gpuCount","engine"}. A deployment starts only if your balance covers its first hour and is stopped automatically when the balance falls below five minutes of runtime. Billing runs per second from the moment compute is requested (providers bill us from that moment too) until it is destroyed.
curl https://api.allais.com/v1/agents/AGENT_SLUG/run -X POST -H "Authorization: Bearer $ALLAIS_API_KEY" -H "Content-Type: application/json" \
-d '{"input": "Summarise this quarter's numbers…", "model": "openai/gpt-4o"}'Agents run on the caller's compute: your deployment or your provider key. If the author set a fee, it is charged to your credits per successful run.
curl https://api.allais.com/api/me -H "Authorization: Bearer $ALLAIS_API_KEY" # balance, burn rate, deployments curl https://api.allais.com/api/billing -H "Authorization: Bearer $ALLAIS_API_KEY" # ledger + usage