API documentation
An OpenAI-compatible API: one base URL, one bearer key, the same routes and the same error format. Reference: /openapi.json · Swagger.
Getting started
| Base URL | https://api.effrenus.com/v1 |
| Authentication | Authorization: Bearer sk-ef-… |
| Format | JSON; SSE streaming on demand |
| Compatibility | OpenAI SDKs (Python, Node, others) and raw HTTP clients |
Effrenus Auto: one line, zero routing
A virtual model that picks the right target for every prompt.
Use model: "effrenus-auto" instead of a specific model ID. The engine inspects the prompt first — length, code, complex tasks, requested output — and selects the most relevant open-weight model for cost and capability. No configuration, no orchestrator, no routing rules to maintain.
- Works with the OpenAI SDK, LangChain, LlamaIndex and
curl. - New catalogue models are picked up without changing your code.
- The model that actually ran is exposed in
x-effrenus-routed-model(alsox-ef-modelandx-ef-route).
The published price for effrenus-auto is the highest model in the routing range; the real cost is computed on the model actually served.
curl https://api.effrenus.com/v1/chat/completions -H "Authorization: Bearer $EF_KEY" -H "Content-Type: application/json" -d '{"model":"effrenus-auto","messages":[{"role":"user","content":"Analyse this vulnerability report."}]}'| Response header | Value |
|---|---|
| x-effrenus-routed-model | Model that actually ran (e.g. qwen3.6-35b-a3b-abliterated) |
| x-ef-route | light or heavy based on detected complexity |
| x-ef-route-reason | Readable routing reason (long prompt, code, complex task…) |
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.EFFRENUS_API_KEY,
baseURL: "https://api.effrenus.com/v1",
});
const res = await client.chat.completions.create({
model: "effrenus-auto",
messages: [{ role: "user", content: "Analyse this vulnerability report." }],
});
console.log(res.choices[0].message.content);Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/chat/completions | Chat, streaming or not, tool calling |
| POST | /v1/completions | Text completion |
| POST | /v1/embeddings | Embeddings |
| GET | /v1/models | Models in the served catalogue |
| GET | /v1/me | Balance, 30-day usage, recent requests |
First request
curl https://api.effrenus.com/v1/chat/completions \
-H "Authorization: Bearer $EF_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"dolphin-3.0-llama3.1-8b","messages":[{"role":"user","content":"Hello"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://api.effrenus.com/v1", api_key="sk-ef-...")
res = client.chat.completions.create(
model="dolphin-3.0-llama3.1-8b",
messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)
Streaming
Add "stream": true to receive server-sent events. Each
data: line carries a chunk; the stream ends with
data: [DONE]. Add
"stream_options": {"include_usage": true} to get the final
token counters. A stream is billed at the end, on the tokens actually
produced.
Errors
| Code | HTTP | Meaning | Action |
|---|---|---|---|
| invalid_api_key | 401 | Missing or unknown key | Check the Authorization header |
| insufficient_credits | 402 | Balance exhausted | Top up before retrying |
| key_disabled | 403 | Key revoked | Create a new key |
| model_not_found | 404 | Model not in the served catalogue | List models via /v1/models |
| rate_limit_exceeded | 429 | RPM/TPM limit reached | Wait for Retry-After |
| upstream_unavailable | 503 | Backend starting or unavailable | Retry with backoff |
Error format:
{"error": {"message", "type", "code"}}. Include the
x-ef-request-id header value when contacting support.
Questions
Is the API really OpenAI-compatible?
Yes: same routes, field names, streaming format and error envelope. Point the OpenAI SDK at https://api.effrenus.com/v1 and set your key.
How do I get my first key?
POST /v1/signup creates a key immediately, or use the customer portal. Top up credits before sending inference requests.
Going further
- Model catalogue — context, licences, prices.
- Pricing and credit packs.
- Streaming SSE — events, usage, interruption.
- Error codes — retry strategy and headers.
- Tool calling — full loop and compatible models.
- Glossary — definitions of the domain.
- Migrate from OpenAI — detailed guide (French).
- Service status.
Ready to call the API?
Create a key, top up credits and send your first request in minutes.