gpt-4o-all文生图
开发中
POST
{{BASE_URL}}/v1/chat/completions
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
string
必需
stream
boolean
必需
messages
array [object {2}]
必需
role
string
可选
content
array [object {3}]
可选
示例
{
"model": "gpt-4o-all",
"stream": false,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "生成一个格斗猫"
},
{
"type": "image_url",
"image_url": {
"url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
}
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/v1/chat/completions' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o-all",
"stream": false,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "生成一个格斗猫"
},
{
"type": "image_url",
"image_url": {
"url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
}
}
]
}
]
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-03-30 14:41:00