Skip to main content
POST
Generate Gemini content
Request and response fields follow the official Gemini API structure. See the Google API reference for the complete specification.
Use contents for text or multimodal conversation turns. The endpoint also supports system instructions, tools, safety settings, cached content, structured output, thinking configuration, and model-specific generation options.

Authorizations

TT-API-KEY
string
header
required

You can obtain your API key from the TTAPI Dashboard.

Path Parameters

model
string
required

Gemini model ID.

Example:

"gemini-3.5-flash"

Body

application/json

Request body for the Gemini generateContent REST format.

contents
object[]
required

Current conversation content. Include the full history for multi-turn requests.

Minimum array length: 1
tools
object[]

Tools the model may use, such as function declarations, code execution, or supported built-in tools.

toolConfig
object

Configuration shared by the tools in this request.

safetySettings
object[]

Per-category safety blocking settings.

systemInstruction
object
generationConfig
object

Generation and output configuration. Availability varies by model.

cachedContent
string

Cached content resource to use as context. Format: cachedContents/{cachedContent}.

Example:

"cachedContents/abc123"

serviceTier
enum<string>

Service tier for this request.

Available options:
unspecified,
standard,
flex,
priority
store
boolean

Overrides the project-level request logging configuration.

Response

Successful Gemini GenerateContentResponse.

candidates
object[]
promptFeedback
object
usageMetadata
object
modelVersion
string
responseId
string
modelStatus
object
Last modified on July 15, 2026