Authorization: Bearer ********************{
"contents": [
{
"role": "user",
"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": [
"IMAGE"
]
}
}curl --location -g --request POST 'http://prod-cn.your-api-server.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent?key={{YOUR_API_KEY}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role": "user",
"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": [
"IMAGE"
]
}
}'{}
如有疑问请加客服微信
在这里,您将获得 AI 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

客服微信