curl --location -g --request POST 'http://dev-cn.your-api-server.com/v1beta/models/gemini-3-pro-image-preview-4k:generateContent?key={{YOUR_API_KEY}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "超写实未来城市夜景,蓝色霓虹灯,4K 横版"
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "4K"
}
}
}'{
"candidates": [
{
"content": {
"parts": [
{
"text": "\n\n"
}
]
}
}
]
}