Authorization: Bearer ********************{
"contents": [
{
"role": "user",
"parts": [
{
"text": "生成一张雨夜霓虹灯下的橘猫插画,电影感,细节丰富"
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}curl --location 'https://api.naoshengyun.com/v1beta/models/gemini-3.1-flash-image:generateContent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "生成一张雨夜霓虹灯下的橘猫插画,电影感,细节丰富"
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
}
}
}'{
"candidates": [{
"content": {
"role": "model",
"parts": [
{"text": "已生成图片。"},
{"inlineData": {"mimeType": "image/png", "data": "iVBORw0KGgoAAAANSUhEUgAA..."}}
]
},
"finishReason": "STOP",
"index": 0
}],
"usageMetadata": {"promptTokenCount": 24, "candidatesTokenCount": 258, "totalTokenCount": 282},
"modelVersion": "gemini-3.1-flash-image"
}