快速开始
1. 创建密钥
Section titled “1. 创建密钥”登录后进入 控制台 › 密钥管理,新建一个密钥。
创建时请选择正确的分组——分组决定这把密钥能调用哪些模型,详见分组与密钥。
2. 发出第一个请求
Section titled “2. 发出第一个请求”把 $ENCORE_API_KEY 换成你的密钥,直接粘进终端:
curl https://api.encorezome.com/v1/chat/completions \ -H "Authorization: Bearer $ENCORE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.5", "messages": [{"role": "user", "content": "你好"}] }'3. 换到你的代码里
Section titled “3. 换到你的代码里”官方 OpenAI SDK 直接可用,只改两个值:
from openai import OpenAI
client = OpenAI( api_key="你的密钥", base_url="https://api.encorezome.com/v1", # 只改这两行)
resp = client.chat.completions.create( model="gpt-5.5", messages=[{"role": "user", "content": "你好"}],)print(resp.choices[0].message.content)