Authorization: Bearer ********************
{
"model": "gemini-2.0-flash-exp-image-generation", // 枚举值 gpt-4o-image gemini-2.0-flash-exp-image-generation, chat-seededit
"messages": [
{
"role": "user",
"content": "https://oss.ffire.cc/files/kling_watermark.png 让这个女人带上眼镜" // 也支持 {"type": "image_url", "image_url": {"url": ""}}
}
]
}
curl --location -g --request POST '{{YOUR_BASE_URL}}/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gemini-2.0-flash-exp-image-generation", // 枚举值 gpt-4o-image gemini-2.0-flash-exp-image-generation, chat-seededit
"messages": [
{
"role": "user",
"content": "https://oss.ffire.cc/files/kling_watermark.png 让这个女人带上眼镜" // 也支持 {"type": "image_url", "image_url": {"url": ""}}
}
]
}'
{
"id": "oCrTEp6GtuWhyVqajzVDEs",
"choices": [
{
"finish_reason": null,
"index": 0,
"logprobs": null,
"message": {
"content": "",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null,
"reasoning_content": ""
}
}
],
"created": 1744596467,
"model": "gemini-2.0-flash-exp-image-generation",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": null,
"usage": {
"completion_tokens": 34,
"prompt_tokens": 44,
"total_tokens": 78,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}