OpenAI-compatible Setup
Any client that supports OpenAI-compatible APIs can use the Base URL and API key below to connect to ShenwenAI.
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.
Copy these model IDs into config files, API request bodies, or any OpenAI-compatible client that asks for a model name.
Prepare your API key first
After logging in, create or copy an API key from your account page. It looks like sk-or-v1-xxxxxxxxxxxx. Treat it like a password.
Go to account pageOpenAI-compatible clients usually need the /v1 Base URL.
Do not share your API key with others or commit it to GitHub, GitLab, or any public repository.
The commands below will switch based on your selected system.
Health check
curl https://api.shenwenai.com/healthChat Completions streaming example
curl -N https://api.shenwenai.com/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}'FAQ
401 / invalid token: make sure the key is complete, has no extra whitespace, and starts with sk-or-v1-.
400 / conversation too large: the conversation is too long. Use /compact in Claude Code or start a new conversation.
Claude Code still uses your own account: run /status. Usually a project .env, ~/.zshrc, or ~/.bashrc still contains ANTHROPIC_API_KEY.
Codex shows 403 / requires openai: contact the admin to confirm account permissions.