Skip to main content

Request

Input

Contents 0 Parts 1 Inline Data Data

Response


Image from base64 data

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 use to generate the next response. Supported tools are function declarations, code execution, and Google Search.
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/Vertex AI request structure. Vertex AI expects prompt text and the image input inside the nested contents.parts object using camelCase keys.