Quickstart
Connect in three steps — register, create an API Key, and make your first request.
GoodPut AI provides a unified gateway compatible with both OpenAI and Anthropic. For any SDK, framework, or tool that supports either protocol, change the base URL to access all platform models.
Create an API Key
Register and sign in to the console, then create a key on the API Keys page.
The complete key is displayed only once, when it is created. Store it securely.
Make your first request
curl https://api.goodputai.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GOODPUT_API_KEY" \
-d '{
"model": "deepseek/deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.goodputai.cn/v1",
api_key="YOUR_GOODPUT_API_KEY",
)
resp = client.chat.completions.create(
model="deepseek/deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.goodputai.cn/v1",
apiKey: process.env.GOODPUT_API_KEY,
});
const resp = await client.chat.completions.create({
model: "deepseek/deepseek-v4-pro",
messages: [{role: "user", content: "Hello"}],
});
console.log(resp.choices[0].message.content);import anthropic
client = anthropic.Anthropic(
base_url="https://api.goodputai.cn",
api_key="YOUR_GOODPUT_API_KEY",
)
resp = client.messages.create(
model="z-ai/glm-5.2",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.content)Switch to another model
Replace model with any model ID in the catalog, such as z-ai/glm-5.2 or deepseek/deepseek-v4-flash. No other changes are needed. Actual usage is charged against your balance.
You can also call GET /v1/models to list models available to the current key:
curl https://api.goodputai.cn/v1/models \
-H "Authorization: Bearer $GOODPUT_API_KEY"Models served by our own infrastructure, such as the GLM series, run on platform-operated Chinese accelerator clusters, without peak-time queues or data leaving mainland China.