聊天接口(图片分析)
POST
https://api.chatgptsb.com/v1/chat/completions
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Authorization
string
可选
示例值:
Bearer sk-xxxx
Body 参数application/json
model
string
模型名称
messages
array [object {2}]
必需
role
string
角色
content
array [object]
必需
temperature
integer
温度
top_p
但不是两者同时使用。top_p
integer
可选
temperature
但不是两者同时使用。max_tokens
number
最大回复
stream
boolean
流式输出
n
number
可选
presence_penalty
integer
可选
frequency_penalty
integer
可选
logit_bias
null
可选
user
string
可选
示例
{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "这是什么?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCACgAKADASIAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAgMFBgEEBwAI/8QAOBAAAgEDAgMGBAUDAwUAAAAAAQIDAAQRBSEGEjETIkFRYXEHgZGhFDJSscEWI0IVYtEXJDOC4f/EABkBAAMBAQEAAAAAAAAAAAAAAAABAwIEBf/EACQRAAIDAAMAAgICAwAAAAAAAAABAgMREiExIkEycQRhEyNR/9oADAMBAAIRAxEAPwDqwWmKtZC0YG1VPMBxWQKMCsgUhg8vpWeWjxXsUgA5aximYr2M0DFYrxWnGNgoblPKTjONqEikArFex7Uwj0ocUhgEVgimYrGKBoWRQkU0ihIoASRQEU4igIpgIYUpl9q2WFKZaAJICiArIG1ZArRM8BWcUQFFigYAFZxR4rIXOw60gCtoGnmSNerHFb/+h3fakcqBP1Fq34kgs7dZlG5AOc7q3THzrZu75oVYhlOAPkaDpjUs7HWVmsdktvcKjqPoaGPSLJA69lz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4NSlvJsN6jOJzm3gbylH8ilPwIekev5MUiaEN1FMjbNNxmtZotIltPBbmTun0o47aZPAH1FSaqM09FFCgg5s0UEmMNkj1FbXD1zNYa/aG3jMhlbsjGDjIbb98VsFRim8OSwWvFNndXaSPb27K8ixjLEcw6D6VO6OQZSqXyEnhW40SVrqVo2S/5pYgoI5U52GD9KJIWzuM1e+Nr/T7+30tNM7XsrWIwMJUKkNknx3PUVWI0Gaf8eP+tCul82JgtpGwMkCpW00+PYvlj60ENSMJ2FWzCWmzFEiKAqge1OVMnYUuPpW3CuaywKtx5Hy6JMcfm2qkaW2BH7Cr78QxjRlX9UgH2Nc+sGwqH0H7VFv5lo/gWWKTKjetmPfFRdtJsKkYX6dKoYZ//9k="
}
}
]
}
],
"max_tokens": 300
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chatgptsb.com/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "这是什么?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCACgAKADASIAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAgMFBgEEBwAI/8QAOBAAAgEDAgMGBAUDAwUAAAAAAQIDAAQRBSEGEjETIkFRYXEHgZGhFDJSscEWI0IVYtEXJDOC4f/EABkBAAMBAQEAAAAAAAAAAAAAAAABAwIEBf/EACQRAAIDAAM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A5f0Xxq6RsIwFQcqgYAHgKKKFNbIL7VHqJf+KeJP6h1qW9vFEiglYUfcImdgB0FR0mrOV5VOAPAbYquQdpIdvrUlAtvD3p25z15RXoRiksRwuTfo9PxF6+EDH1o3e200ZOJrjwHgD/NKe9uLheytU5E6YXYfOm2emFW55e8/wBhW0ZKVxJcXM9ybm4JzE68o8lOxqX0K5IYKT02rPGNmEsbpwP8PvmojR5SHUjO4BqLWT/ZX2Ba5nzIw86TnmhKnqNxQs/MVasKcN71QmyItps43qSgfNVu0m6bipi1m6bikmNomIQDUPxKMfhfLtP4NSlvJsN6jOJzm3gbylH8ilPwIekev5MUiaEN1FMjbNNxmtZotIltPBbmTun0o47aZPAH1FSaqM09FFCgg5s0UEmMNkj1FbXD1zNYa/aG3jMhlbsjGDjIbb98VsFRim8OSwWvFNndXaSPb27K8ixjLEcw6D6VO6OQZSqXyEnhW40SVrqVo2S/5pYgoI5U52GD9KJIWzuM1e+Nr/T7+30tNM7XsrWIwMJUKkNknx3PUVWI0Gaf8eP+tCul82JgtpGwMkCpW00+PYvlj60ENSMJ2FWzCWmzFEiKAqge1OVMnYUuPpW3CuaywKtx5Hy6JMcfm2qkaW2BH7Cr78QxjRlX9UgH2Nc+sGwqH0H7VFv5lo/gWWKTKjetmPfFRdtJsKkYX6dKoYZ//9k="
}
}
]
}
],
"max_tokens": 300
}'
返回响应
🟢200成功
application/json
Body
id
string
必需
object
string
必需
created
integer
必需
model
string
必需
choices
array [object {4}]
必需
index
integer
可选
message
object
可选
logprobs
null
可选
finish_reason
string
可选
usage
object
必需
prompt_tokens
integer
必需
completion_tokens
integer
必需
total_tokens
integer
必需
system_fingerprint
string
必需
示例
{
"id": "chatcmpl-A7ETdn5hnbTjpw9dtRifjMFZYcdFW",
"object": "chat.completion",
"created": 1726287309,
"model": "gpt-4o-2024-05-13",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "这是一张卡通风格的老人头像图像。这个角色有着白色的头发和胡须,脸上带着灿烂的笑容,穿着蓝色的衣服。",
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 265,
"completion_tokens": 46,
"total_tokens": 311,
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"system_fingerprint": "fp_992d1ea92d"
}
修改于 2024-11-24 09:59:54