responseModalities
: ["TEXT", "IMAGE"],以便使用 gemini-2.0-flash-exp-image-generation
生成文本和图片输出。不允许仅包含图片。curl --location --request POST 'https://llm-api.mmchat.xyz/gemini/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent?key=METACHAT_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [{
"parts": [
{"text": "Hi, can you create a 3d rendered image of a pig with wings and a top hat flying over a happy futuristic scifi city with lots of greenery?"}
]
}],
"generationConfig":{"responseModalities":["TEXT","IMAGE"]}
}'
{}