LLM Gateways
Route Ablatic through a gateway like Bifrost
A gateway sits between your app and api.ablatic.ai and gives you routing, failover and usage tracking across providers. Ablatic speaks the OpenAI API, so any gateway that supports a custom OpenAI-compatible provider works.
Bifrost
Two settings decide whether the integration works:
- Base URL without
/v1. Setbase_urltohttps://api.ablatic.ai. Bifrost appends/v1/chat/completionsitself. If you paste the URL you use with curl or the OpenAI SDK (https://api.ablatic.ai/v1), Bifrost calls/v1/v1/chat/completionsand gets a 404. This is the most common failure: curl works, the gateway does not. - Attach the model to the key. Bifrost only routes to keys whose
modelslist contains the requested model. Leave the list empty and Bifrost answersno keys found that support model: talos-previewwithout ever calling Ablatic.
Configuration
{
"providers": {
"ablatic": {
"keys": [
{
"value": "sk-ablatic-...",
"models": ["talos-preview", "talos"],
"weight": 1.0
}
],
"custom_provider_config": { "base_provider_type": "openai" },
"network_config": { "base_url": "https://api.ablatic.ai" }
}
}
}The same two rules apply in the Bifrost web UI: enter the base URL without /v1, and assign the model to the key.
Requests
Prefix the model with your provider name. Bifrost strips the prefix and forwards talos-preview to Ablatic.
curl -X POST http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ablatic/talos-preview",
"messages": [{"role": "user", "content": "Hello"}]
}'Streaming works unchanged: set "stream": true and read the Server-Sent Events, the same as calling Ablatic directly.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
404 Not Found from the provider | /v1 in the base URL, so the gateway calls /v1/v1/... | Set base_url to https://api.ablatic.ai |
no keys found that support model: ... | The key's models list is empty | Add talos-preview (and any alias you use) to the key |
401 with code invalid_api_key | The key is wrong or truncated | Check the key in the console; it starts with sk-ablatic- |
LiteLLM
LiteLLM uses the opposite base-URL convention from Bifrost: api_base includes the /v1.
import litellm
resp = litellm.completion(
model="openai/talos-preview",
api_base="https://api.ablatic.ai/v1",
api_key="sk-ablatic-...",
messages=[{"role": "user", "content": "Hello"}],
)The openai/ prefix tells LiteLLM to speak the OpenAI protocol; it forwards talos-preview to Ablatic. The same values work in a LiteLLM proxy config.yaml under litellm_params. Cost tracking works out of the box: every response and the final stream chunk carry usage.
Other gateways
The same pattern applies to most gateways with a custom OpenAI-compatible provider: check whether the gateway appends /v1/... to the base URL itself (Bifrost) or expects it in the base URL (LiteLLM), and make sure the model is registered with the provider. Errors on /v1/chat/completions use the standard OpenAI error object, so gateways surface Ablatic error messages directly (see Errors).