OpenAI
GPT-5.2 Chat Latest
OpenAI 2025 最新对话模型,在推理、代码、创意写作等方面表现卓越,支持缓存加速
上下文长度256K tokens
模型类型大语言模型 (LLM)
多模态支持文本、图像、音频输入
定价与规格
💰 定价
输入$1.75 / M tokens
输出$14 / M tokens
⚙️ 规格
上下文长度256K tokens
模型类型大语言模型 (LLM)
多模态支持文本、图像、音频输入
缓存支持支持 Prompt Caching 加速
训练截止日期2025年12月
API 调用示例
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.xairouter.com/v1",
api_key="your-api-key"
)
response = client.chat.completions.create(
model="gpt-5.2-chat-latest",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)cURL
curl https://api.xairouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-5.2-chat-latest",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'