ShenwenAI
OPENAI_COMPATIBLE

OpenAI-compatible Setup

Any client that supports OpenAI-compatible APIs can use the Base URL and API key below to connect to ShenwenAI.

Use gpt-5.6-sol as the default. You can also select Terra, Luna, or an existing model. Billing follows the actual model and context tier.

For Grok Heavy, create a Grok Heavy channel key and use grok-4.5 or grok-4.6.

Supported model IDs

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

API_KEY_REQUIRED

Prepare your API key first

1. Go to your account page

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 page

2. Create an API key and choose a channel

Select Create API Key, enter a recognizable name, then choose the channel that fits your use case:

Stable · 0.22x (Pro pool)
Prioritizes stability for OpenAI (Codex), OpenAI-compatible clients, and Claude Code. Recommended for long-running or important text workloads.
Economy · 0.09x (Plus pool)
Prioritizes price for OpenAI (Codex) and OpenAI-compatible clients. Recommended for everyday development, learning, testing, and cost-sensitive text workloads.

For images, create a separate OpenAI image key or Grok image key. Text and image purposes cannot be mixed in one key.

3. Confirm the Base URL

OpenAI-compatible clients usually need the /v1 Base URL.

https://api.shenwenai.com/v1

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

Choose your system first

The commands below will switch based on your selected system.

Health check

macOS / Linux
bash
curl https://api.shenwenai.com/health

Chat Completions streaming example

macOS / Linux
bash
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-sol","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.