Skip to main content

Request

Response

Candidates 0 Content Parts 0 Inline Data Data

Image generation using Gemini model with additional parameters and tool calling

Request

Response

Candidates 0 Content Parts 0 Inline Data Data (1)

Parameters

header
An optional header used for spend logging metadata, containing JSON properties like user_id, project_id, and env.
array
required
The conversation history or input prompts as an array of content objects.
object
Instructions to the model that dictate how it should behave.
array
A list of tools the model may call. Supports google_search for search grounding.
object
Tool configuration for any Tool specified in the request.
object
Configuration options for the generation.
array
A list of unique safety settings for blocking unsafe content.

Params to Avoid

Ensure you do not mix OpenAI or Azure-specific parameters (such as prompt, size, quality, or n) with Gemini’s request structure. Gemini expects prompt text inside the nested contents.parts object.