GPT-5-2 API 是新一代多模态模型,具备卓越的推理能力,支持文本和图像输入,提供联网搜索增强功能并支持调节推理力度。
| 特性 | 描述 |
|---|---|
| 多模态 | 支持文本和图像输入 |
| 实时搜索 | 启用联网搜索增强 |
| 推理力度 | 可调节推理力度级别 |
| 灵活角色 | 支持多种消息角色 |
messages 参数的 content 数组中,目前仅支持图像。所有图像文件使用相同的格式结构:type 字段始终为 "image_url"image_url 字段名称保持不变url 值,它指向相应的图像地址{ type: 'image_url', image_url: { url: '...' } } 结构。tools 参数是一个可选数组,允许您启用联网搜索增强。{
"type": "function",
"function": {
"name": "web_search"
}
}{
"id": "chatcmpl-example-123",
"object": "chat.completion",
"created": 1741569952,
"model": "gpt-5-2",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好,有什么可以帮你的吗?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 50,
"total_tokens": 60
}
}curl --location --request POST 'https://api.kie.ai/gpt-5-2/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1759055072437dqlsclj2.png"
}
}
]
}
],
"tools": [
{
"type": "function",
"function": {
"name": "web_search"
}
}
],
"reasoning_effort": "high"
}'{
"id": "chatcmpl-example-123",
"object": "chat.completion",
"created": 1677652288,
"model": "gpt-5-2",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "string"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 50,
"total_tokens": 60
}
}