Documentation · quickstart · updated 2026-11-15

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 URLhttps://api.effrenus.com/v1
AuthenticationAuthorization: Bearer sk-ef-…
FormatJSON; SSE streaming on demand
CompatibilityOpenAI 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 (also x-ef-model and x-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 headerValue
x-effrenus-routed-modelModel that actually ran (e.g. qwen3.6-35b-a3b-abliterated)
x-ef-routelight or heavy based on detected complexity
x-ef-route-reasonReadable 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

MethodPathPurpose
POST/v1/chat/completionsChat, streaming or not, tool calling
POST/v1/completionsText completion
POST/v1/embeddingsEmbeddings
GET/v1/modelsModels in the served catalogue
GET/v1/meBalance, 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

CodeHTTPMeaningAction
invalid_api_key401Missing or unknown keyCheck the Authorization header
insufficient_credits402Balance exhaustedTop up before retrying
key_disabled403Key revokedCreate a new key
model_not_found404Model not in the served catalogueList models via /v1/models
rate_limit_exceeded429RPM/TPM limit reachedWait for Retry-After
upstream_unavailable503Backend starting or unavailableRetry 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

Ready to call the API?

Create a key, top up credits and send your first request in minutes.

Create API key