Migration guide · updated 2026-11-15

Migrate from OpenAI: base_url and SDK

Keep your code, change two values. The API is OpenAI-compatible: same routes, same streaming format, same error envelope. Here is the migration path, including what does not carry over.

1. Change the base URL and key

from openai import OpenAI

client = OpenAI(
    base_url="https://api.effrenus.com/v1",
    api_key="sk-ef-...",
)
const client = new OpenAI({
  baseURL: "https://api.effrenus.com/v1",
  apiKey: process.env.EF_KEY,
});
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"}]
  }'

2. Map model ids

Model ids differ from OpenAI names. List the served catalogue with GET /v1/models, then pick a model from the catalogue page. Model names are stable per deployment; an id not present in the served catalogue returns 404 model_not_found.

3. Streaming and tool calling

4. Error mapping

OpenAI code you may handleEffrenus equivalent
invalid_api_key (401)missing_api_key / invalid_api_key (401)
insufficient_quota (429)insufficient_credits (402) — top up
model_not_found (404)model_not_found (404)
rate_limit_exceeded (429)rate_limit_exceeded (429) with Retry-After
server_error (5xx)upstream_unavailable (503), bad_upstream_response (502)

Full error table and retry strategy →

5. Migration checklist

  1. Create an Effrenus key and top up credits.
  2. Switch base_url and api_key in a staging environment.
  3. Replace model ids with catalogue ids.
  4. Run 20–50 real prompts and compare quality.
  5. Check streaming, tool calling and error handling paths.
  6. Estimate cost on your token ratio: pricing.

FAQ

Do I need to change my SDK?

No. The official OpenAI SDKs work by changing base_url and api_key; unsupported OpenAI-only features are the only exception.

Is streaming identical?

Yes: same SSE events, same [DONE] terminator, same stream_options.include_usage; the token counters arrive in the last chunk.

Going further

Ready to switch?

Create a key, top up €5 and run your first request.

Create API key