System Framework v4.7.0 // BRUCEAI API Gateway
+ 01
+ 02

BRUCEAI

OPENAI_COMPATIBLE

OpenAI-compatible setup

Any client that supports an OpenAI-compatible API can connect to BRUCEAI with the Base URL and API key below.

For a balanced starting point, use gpt-5.6-terra. You can also select Sol, Luna, or an existing model. Billing follows the actual model and context tier.

Supported model IDs

Copy these model IDs into config files, API request bodies, or any OpenAI-compatible client that asks for a model name.

STEP 01 / API_KEY_REQUIRED

Prepare your API key

1. Go to the API key page

After signing in, open the API key page to create or copy an API key. It looks like sk-or-v1-xxxxxxxxxxxx. Treat it like a password.

Create API key
2. Confirm Base URL
https://api.bruceai.net/v1

OpenAI-compatible clients usually require a Base URL that includes /v1.

Do not share your API key with anyone, and do not commit it to GitHub, GitLab, or any public repository.

Choose your system first

The commands below will switch to the system you choose.

STEP 02

Health check

macOS / Linux
bash
curl https://api.bruceai.net/health
STEP 03

Chat Completions streaming example

macOS / Linux
bash
curl -N https://api.bruceai.net/v1/chat/completions \
  -H "Authorization: Bearer sk-or-v1-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-terra","messages":[{"role":"user","content":"hi"}],"stream":true}'
STEP 04

Common issues

401 / invalid token: make sure the key is complete, has no extra spaces, and starts with sk-or-v1-.

400 / conversation too large: compact the conversation in Claude Code with /compact, or start a new conversation.

Claude Code still uses your own account: type /status and check the Base URL. Usually ANTHROPIC_API_KEY is still present in a project .env, ~/.zshrc, or ~/.bashrc.

Codex shows 403 / requires openai: contact the administrator to confirm account permissions.