Skip to main content

Gemini (Native Format) - File Analysis

Gemini’s native request format uses the Google API structure. The platform supports both snake_case and camelCase parameter names, but camelCase is recommended for consistency.
Use camelCase for all parameters (e.g. toolConfig ✅, tool_config ❌). Some parameters may not be recognized with snake_case.

Request

Path Parameters

Headers

You can authenticate with either x-goog-api-key header or Authorization: Bearer header.

Request Body

Example Request - Non-streaming

Example Request - Streaming

Python Example

Response

For full parameter details and usage examples, see the Gemini official documentation.