{"model":"gemini-3-pro-image-preview","stream":true,"messages":[{"role":"user","content":"Generate an infographic of the current weather in Tokyo."}],"extra_body":{"google":{"image_config":{"aspect_ratio":"16:9","image_size":"2K"}}}}
请求示例代码
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://api2.aigcbest.top/v1/chat/completions' \
--header'Accept: application/json' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "gemini-3-pro-image-preview",
"stream": true,
"messages": [
{
"role": "user",
"content": "Generate an infographic of the current weather in Tokyo."
}
],
"extra_body": {
"google": {
"image_config": {
"aspect_ratio": "16:9",
"image_size": "2K"
}
}
}
}'
返回响应
🟢200OK
application/json
Body
示例
{"id":"chatcmpl-123","object":"chat.completion","created":1677652288,"choices":[{"index":0,"message":{"role":"assistant","content":"\n\nHello there, how may I assist you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":12,"total_tokens":21}}