Build on Webel.
One OpenAI-compatible endpoint, your own API key, and the same engine Webel runs on: model routing, durable memory, and per-key spend.
Five lines to your first completion.
Create a key, then point any HTTP client at the endpoint. Full docs at webel.ai/docs.
1. Create a key
Self-serve in the app: name it, set an optional dollar cap, copy it once. No sales call, no waiting.
2. Make one call
Any HTTP client. OpenAI-compatible wire format, so your existing SDK works. Just change the base URL.
3. Read the receipt
Tokens, exact cost, and the conversation id to continue the thread, on every response.
curl https://api.webel.ai/v1/chat/completions \
-H "Authorization: Bearer $WEBEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{ "role": "user", "content": "What is model routing?" }]
}'Watch the router work.
Every call is itemized: which model ran, how many tokens, exactly what it cost. model: "auto" is not a black box; it's a line item. This is the by-model breakdown from a live workspace.
Pin a model, or let Webel route.
Static and dynamic, both through the same endpoint. You decide per request.
Static: pin a model
Set model to a specific model id and that exact model runs.
{
"model": "claude-sonnet-5",
"messages": [{ "role": "user", "content": "..." }]
}Dynamic: auto-select
Set model to auto and Webel routes to the best fit. The response tells you which model ran.
{
"model": "auto",
"messages": [{ "role": "user", "content": "..." }]
}The response's usage.model_selected_by is "pinned" or "auto", so you always know who chose the model.
Everything you need, in one round trip.
Tokens, cost, and the conversation id to continue it later.
{
"id": "chatcmpl-…",
"object": "chat.completion",
"model": "claude-sonnet-5",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "…" },
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 120,
"completion_tokens": 80,
"total_tokens": 200,
"cost_microusd": 1250000,
"model_selected_by": "auto"
},
"webel": {
"conversation": "…",
"turn": "…",
"flavor": "api"
}
}Or from your language of choice.
Plain HTTP, so it works anywhere. Continue a conversation by passing its conversation id back in.
import requests
resp = requests.post(
"https://api.webel.ai/v1/chat/completions",
headers={"Authorization": f"Bearer {key}"},
json={
"model": "auto", # or "claude-sonnet-5" to pin
"messages": [{"role": "user", "content": "Summarize this."}],
"stream": False,
},
)
data = resp.json()
print(data["choices"][0]["message"]["content"])
print(data["usage"]["model_selected_by"]) # "auto" or "pinned"
print(data["usage"]["cost_microusd"]) # what this call cost
print(data["webel"]["conversation"]) # id to continue this threadServer-sent events, standard shape.
Set stream: true and read deltas as they arrive, ending with data: [DONE].
curl https://api.webel.ai/v1/chat/completions \
-H "Authorization: Bearer $WEBEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "auto", "stream": true,
"messages": [{ "role": "user", "content": "Write a haiku about shipping." }] }'Things you don't get from a raw model API.
Durable conversations
Not stateless. Pass a conversation id back and the thread keeps its full history, on the graph.
Per-key spend
Every response carries cost_microusd. Accumulate it per key. OpenAI and Anthropic don't give you this.
Model routing
Pin a model or route dynamically. One call, every model, frontier and open source.