CodeBair Quick Start in 30 Seconds
This page is for first-time CodeBair users.
1. Shared Parameters
- Base URL:
https://api.codebair.com/v1 - API Key: your CodeBair key (
sk-...) - Model: any model you are allowed to use from
/v1/models
Security tip: never paste your API key into public repos, chat groups, or screenshots.
2. Fastest Path
- Get your CodeBair API key
- Find
OpenAI API Key,Custom API, orOpenAI-compatiblesettings in your client - Fill in the Base URL, API key, and model
- Run one minimal request to verify it works
3. Minimal Test Request
PowerShell
curl.exe https://api.codebair.com/v1/chat/completions `
-H "Content-Type: application/json" `
-H "Authorization: Bearer YOUR_CODEBAIR_API_KEY" `
-d '{"model":"YOUR_AVAILABLE_MODEL","messages":[{"role":"user","content":"ping"}]}'
macOS / Linux
curl https://api.codebair.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_CODEBAIR_API_KEY" \
-d '{"model":"YOUR_AVAILABLE_MODEL","messages":[{"role":"user","content":"ping"}]}'
4. Pick Your Client
| Tool | Go to |
|---|---|
| Claude Code | Claude Code |
| CC Switch | CC Switch |
| Codex | Codex |
| Cursor | Cursor |
| Cherry Studio | Cherry Studio |
| Kilo | Kilo |
| OpenCode | OpenCode |
| OpenClaw | OpenClaw |
| Chatbox | Chatbox |
| WorkBuddy | WorkBuddy |
| Gemini CLI | Gemini CLI |
5. Most Common Errors
401: wrong key, extra spaces, or not a CodeBair key403: insufficient permission, no balance, or account restriction404: wrong Base URL, often missing/v1Model not found: invalid model name, use a model from/v1/models
6. What Success Looks Like
- HTTP status is
200 - JSON response contains
choices choices[0].message.contentcontains model output