Migrate from OpenAI to Brainiall in 60 Seconds
Brainiall is fully OpenAI SDK compatible — drop-in replacement. This guide shows the exact migration steps. Total time: 60 seconds. Code changes: 1 line.
The 4-step migration
Step 1 — Sign up (15 seconds)
Go to chat.brainiall.com/auth/login. Sign up with Google OAuth or email. No credit card required. Free tier available.
Step 2 — Get your API key (10 seconds)
Dashboard → API Keys → Create new key. Copy the brnl_* token.
Step 3 — Change base_url (30 seconds)
Replace OpenAI's default base_url with Brainiall's. That's the only code change.
Python
# Before from openai import OpenAI client = OpenAI(api_key="sk-...") # After from openai import OpenAI client = OpenAI( api_key="brnl_...", base_url="https://api.brainiall.com/v1" )
Node.js
import OpenAI from "openai"; const client = new OpenAI({ apiKey: "brnl_...", baseURL: "https://api.brainiall.com/v1" });
cURL
# Before curl https://api.openai.com/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -d '{...}' # After curl https://api.brainiall.com/v1/chat/completions \ -H "Authorization: Bearer brnl_..." \ -d '{...}'
Step 4 — Optionally switch model (5 seconds)
Brainiall's 104 models work with the same API shape. Switch model with one parameter:
# Use OpenAI GPT-5 (default) client.chat.completions.create(model="openai/gpt-5", messages=[...]) # Or Claude 4.6 Sonnet client.chat.completions.create(model="anthropic/claude-sonnet-4-6", messages=[...]) # Or Gemini 3 Pro client.chat.completions.create(model="google/gemini-3-pro", messages=[...]) # Or DeepSeek V3.5 client.chat.completions.create(model="deepseek/deepseek-v3.5", messages=[...])
What changes
- 1 line of code:
base_urlchange only - API shape: 100% identical (chat completions, streaming, tools, vision, structured outputs)
- Pricing: per-token ($8-400/mo) → flat $5.99/mo
- Models: GPT family only → 104 (GPT-5 + Claude + Gemini + DeepSeek + Llama + more)
- Region: US-only → EU (Frankfurt + Madrid)
Common questions
Does my existing OpenAI streaming code work?
Yes. Brainiall supports streaming, tools/function calling, vision, structured outputs — same API shape.
Can I keep using OpenAI's Python/Node SDK?
Yes. The openai package itself is unchanged. Only the connection params (api_key + base_url) change.
What about embeddings, image, voice?
Embeddings: Same API (/v1/embeddings). Image: Brainiall ships Seedance + GPT-5-image (instead of DALL-E). Voice: ElevenLabs included. Video: Lyria 3 (OpenAI doesn't offer video).
Can I migrate gradually?
Yes. Use environment variable for base_url. Switch traffic gradually:
BASE_URL = os.environ.get("LLM_BASE_URL", "https://api.openai.com/v1") client = OpenAI(api_key=KEY, base_url=BASE_URL) # Set LLM_BASE_URL=https://api.brainiall.com/v1 to use Brainiall
Migrate now — $5.99/mo flat
60-second migration. Free tier available. No credit card.
Get free API key →