API ReferenceImages
Gemini native format
Gemini compatible image generation endpoint, with a trailing slash in the path.
Path Parameters
model*string
Model ID in the Gemini-compatible interface path.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1beta/models/gemini-2.5-flash:generateContent/" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "Generate an illustration of the Models Hub console." } ] } ] }'{
"candidates": [
{}
],
"promptFeedback": {},
"usageMetadata": {}
}{
"error": {
"code": "string",
"message": "string",
"request_id": "string"
}
}