Skip to main content
KiosAPI lets you call Gemini models using the standard OpenAI request format — pass files including PDFs, images, audio, and video directly in the content array of your messages. You can use the same OpenAI SDK and endpoint you use for other models; no additional configuration is required to switch to Gemini.

Supported File Types

Request

POST https://kiosapi.com/v1/chat/completions

Headers

Request Body

string
required
Gemini model name (e.g. gemini-2.5-pro).
array
required
Array of message objects forming the conversation.
number
Maximum number of tokens to generate in the response.
number
Sampling temperature.
boolean
Set to true to stream the response using server-sent events.
array
Function calling tools, or the special googleSearch tool for web search.
string
Thinking level for reasoning models. One of high, medium, or low.
object
Advanced configuration, including thinking_config for fine-grained control over the thinking budget.
object
Structured output configuration.

Content Types for File Analysis

When passing content as an array, each element uses one of the following types:
For files over 20 MB, use the URL method rather than base64 to avoid hitting request size limits.

Dynamic Thinking Models

When a model name ends with thinking-* (e.g. gemini-2.5-flash-thinking-2000), it supports dynamic thinking token limits. The number after thinking- sets the maximum number of tokens the model may use for internal reasoning. You can enable web search in two ways:
  1. Add the -search suffix to the model name (e.g. gemini-2.5-flash-search).
  2. Include the googleSearch tool in your request body:

Examples

Response