Your first request in three lines
One base URL, one bearer key, and your OpenAI client keeps working. This page takes you from account creation to a streamed answer.
1. Create an API key
Open the customer portal and create a key, or use
POST /v1/signup to get one immediately. Top up credits before
sending inference requests: a key with a zero balance receives
402 insufficient_credits.
2. Point your client at Effrenus
| Base URL | https://api.effrenus.com/v1 |
| Authentication | Authorization: Bearer sk-ef-… |
| Model id | Any model from the catalogue |
3. Send a 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)
const res = await fetch("https://api.effrenus.com/v1/chat/completions", {
method: "POST",
headers: {
"content-type": "application/json",
authorization: `Bearer ${process.env.EF_KEY}`,
},
body: JSON.stringify({
model: "dolphin-3.0-llama3.1-8b",
messages: [{ role: "user", content: "Hello" }],
}),
});
const data = await res.json();
console.log(data.choices[0].message.content);
4. Stream the answer
Add "stream": true to receive tokens as server-sent events.
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 produced.
5. Handle errors
401— missing or invalid key.402— balance exhausted; top up.404— model not in the served catalogue.429— rate limit; wait forRetry-After.503— backend starting or unavailable; retry with backoff.
Going further
Ready?
Create a key, top up €5 and send your first request.