Connect
OpenAI-compatible API
Every CoreCode model is available in the OpenAI API format: the natural fit for GPT, Gemini and Grok, and it works for Claude too. The OpenAI SDK, curl, and any OpenAI-compatible client that lets you enter a base URL and a key can connect to CoreCode directly.
https://corecode.live/v1/v1/chat/completions) and Responses (/v1/responses), for every modelAuthorization: Bearer sk-your-key, in the model's group or in autoCreate a key
On the API Keys page, click "Create API key" and choose the group for the models you want:
| Models | Group |
|---|---|
| GPT | GPT |
| Gemini | |
| Grok | Grok |
| Several of them | auto, which picks the group from the model name |
Try it with curl
curl https://corecode.live/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model": "grok-4.7", "messages": [{"role": "user", "content": "reply ok"}]}'
If choices[0].message.content is ok, you are connected. Change model to gpt-6.1-sol or gemini-3.8-flash-high to try another group; the key's group has to match.
OpenAI SDK
from openai import OpenAI
client = OpenAI(base_url="https://corecode.live/v1", api_key="sk-your-key")
resp = client.chat.completions.create(
model="gemini-3.8-flash-high",
messages=[{"role": "user", "content": "reply ok"}],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://corecode.live/v1", apiKey: "sk-your-key" });
const resp = await client.chat.completions.create({
model: "gemini-3.8-flash-high",
messages: [{ role: "user", content: "reply ok" }],
});
console.log(resp.choices[0].message.content);
The Responses API works too, for every model: client.responses.create(model="gpt-6.1-sol", input="reply ok").
In a client app
Chat apps, editor plugins and agent tools name things differently. Find a provider of type "OpenAI" or "OpenAI-compatible" and fill in three fields:
| Field | Value |
|---|---|
| API address / Base URL | https://corecode.live/v1. Some clients append /v1 themselves and want https://corecode.live; if requests return 404, try the other form |
| API key | Your key, starting with sk- |
| Model | Type the model name, for example gpt-6.1-sol, gemini-3.8-flash-high, grok-4.7 |
Tool-specific setups are in OpenCode, OpenClaw and Codex; with Magpie installed, picking models there is simpler.
GPT group
A Codex pool. Models: gpt-6.1-sol, gpt-6.1-terra, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, codex-auto-review.
Gemini group
An Antigravity pool. Models: gemini-3.8-flash-high.
Grok group
A Grok pool. Models: grok-4.7, grok-4.6.
FAQ
401
The key is missing or wrong. The header is Authorization: Bearer sk-your-key, with one space after Bearer.
Model not found or no available channel
The key's group does not serve that model. A Grok key calling gpt-6.1-sol, for example, gets this error; use a key in the right group, or one in auto.
Can I call Claude through this API?
Yes, with a key in 「Claude 满血(可外接)」 or auto; 仅限CC admits Claude Code only. Claude's prompt caching and thinking are most complete on the native Anthropic API, though, so from an SDK prefer the Anthropic SDK at https://corecode.live.