Skip to main content

Image editing using Google GenAI SDK

Input

Image

Response

Candidates 0 Content Parts 0 Inline Data Data (2)

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 request structure. Gemini expects prompt text and the image input inside the nested contents.parts object using snake_case keys.