x-goog-api-key: ********************{
"contents": [
{
"role": "user",
"parts": [
{
"text": "生成一张雨夜霓虹街道的图片"
}
]
}
],
"generationConfig": {
"responseModalities": [
"IMAGE"
],
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "2K"
}
}
}curl --location '/api/v1/open/gemini/v1beta/models/:generateContent' \
--header 'x-goog-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "生成一张雨夜霓虹街道的图片"
}
]
}
],
"generationConfig": {
"responseModalities": [
"IMAGE"
],
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "2K"
}
}
}'{
"property1": "string",
"property2": "string"
}