Any OpenAI-compatible API
Point a profile at any API that serves chat completions, with one endpoint table and a key from an environment variable. You need that provider's API key.
Do this for me on this machine: add an OpenAI-compatible provider endpoint with its API key to my config.toml, map a profile role to one of its models, and check it with sc profiles. This is superclaude's own guide. Read all of it as raw Markdown first, without summarizing it: curl -fsSL "https://superclaude.io/docs/provider-openai-compatible.md" Then: 1. Tell me in a few lines what you are going to change. 2. Do every step yourself: run the commands, edit the files, check each result. 3. Stop only for what needs me: a browser sign-in, a choice between options, a secret to paste. 4. Finish by showing it works, and tell me the one command I will use from now on. Other superclaude pages, if you need them: https://superclaude.io/llms.txt
An openai-compat endpoint is a base URL and a key. The gateway translates Claude Code’s Anthropic-format requests into chat completions and streams the answer back in Anthropic format. The steps use DeepSeek; swap in any provider from the table below.
-
Export your key
export DEEPSEEK_API_KEY="<your-deepseek-key>"Export it before the daemon starts. A key exported later needs
sc daemon stopand a new launch (why). -
Add the endpoint and a profile to
~/.superclaude/config.toml[endpoints.deepseek] url = "https://api.deepseek.com" format = "openai-compat" key_csv = "${DEEPSEEK_API_KEY}" [profiles.deepseek] opus = { slug = "deepseek/<model-id>" }urlis everything before/v1/chat/completions, because the gateway appends that path.authdefaults tobearerfor this format. -
Check the routing
sc profiles deepseekIt prints a row for each of opus, sonnet and haiku with the model that role goes to; a role the profile does not set is marked
↑as inherited (^on a terminal without Unicode). -
Launch with the profile
sc -u deepseek <project> <agent>
This profile maps only opus, so sonnet and haiku inherit it and every request goes to DeepSeek. To split the roles, see Profiles.
| Provider | url |
|---|---|
| OpenAI | https://api.openai.com |
| DeepSeek | https://api.deepseek.com |
| Groq | https://api.groq.com/openai |
| Together | https://api.together.xyz |
| Fireworks | https://api.fireworks.ai/inference |
OpenCode, OpenRouter, Grok and local servers use this format too and have their own pages.
What the provider must support
- Streaming
POST <url>/v1/chat/completions. A provider whose path uses another version segment, such as/v4/chat/completions, cannot be reached, because the gateway always appends/v1/chat/completions. - Tool calls, because Claude Code sends its tools as function definitions.
A /v1/models route is optional; the launch check passes a provider without one.
The gateway translates the system prompt, messages, tools, tool results and images. A model that streams its reasoning as reasoning_content, or as reasoning, shows it in Claude Code as a thinking block, and the gateway sends that reasoning back on later turns.
Providers share no reasoning parameter, so the gateway picks one from the model id: DeepSeek, GLM, Kimi, Qwen, MiniMax and MiMo ids each get their own field, and any other id gets none (the table).
Rotate several OpenAI keys
The config.toml that sc writes on first run already has an [endpoints.openai] table with type = "pool" that reads ${OPENAI_KEYS}. Set that variable to a comma-separated list of keys to use it; the gateway rotates them (key pools).
The OpenAI Responses API
[endpoints.openai-responses]
url = "https://api.openai.com"
format = "openai-responses"
key_csv = "${OPENAI_API_KEY}"
[profiles.gpt]
opus = { slug = "openai-responses/<model-id>", reasoning = { effort = "high" } }This format posts to <url>/v1/responses. The gateway sends the effort as reasoning.effort (low, medium or high; max becomes high) and asks for a reasoning summary, which Claude Code shows as a thinking block. OpenAI’s reasoning models reject a custom temperature or top_p, so leave sampling off rows that use them. Codex speaks the same API on a ChatGPT subscription.
Per-model wire overrides
A provider can serve some models over chat completions and others over the Anthropic wire behind one URL. Set format and auth on the row that differs. The research profile in the config sc writes on first run does this for OpenCode’s qwen3.7-max:
[profiles.research]
opus = { slug = "opencode/qwen3.7-max", format = "anthropic-messages", auth = "x-api-key", reasoning = { effort = "high" } }
sonnet = { slug = "opencode/deepseek-v4-pro", temperature = 0.7, params = { top_k = 40, repetition_penalty = 1.05 } }
haiku = { slug = "opencode/deepseek-v4-flash" }A row’s format beats the endpoint’s, and the endpoint’s beats the default, openai-compat. auth resolves the same way, falling back to the format’s default: x-api-key for anthropic-messages, bearer for the two OpenAI formats.
Next: Grok (xAI subscription)