{"instances":[{"prompt":"A futuristic laboratory with a transparent holographic display showing complex molecular structures. A scientist in a white lab coat is interacting with the hologram. Cold blue ambient lighting, cinematic composition, hyper-realistic, 8k resolution."}],"parameters":{"sampleCount":2,"aspectRatio":"16:9","imageFormat":"image/png","addWatermark":true,"negativePrompt":"blurry, distorted hands, low quality, cartoonish","safetySetting":"block_most"}}
请求示例代码
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://gemini.api365.cloud/v1beta/models/imagen-4.0-generate-001:predict' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"instances": [
{
"prompt": "A futuristic laboratory with a transparent holographic display showing complex molecular structures. A scientist in a white lab coat is interacting with the hologram. Cold blue ambient lighting, cinematic composition, hyper-realistic, 8k resolution."
}
],
"parameters": {
"sampleCount": 2,
"aspectRatio": "16:9",
"imageFormat": "image/png",
"addWatermark": true,
"negativePrompt": "blurry, distorted hands, low quality, cartoonish",
"safetySetting": "block_most"
}
}'