Skip to main content
POST

Authorizations

x-goog-api-key
string
header
required

Tikway API Key. Passed through the x-goog-api-key request header according to the Gemini native protocol.

Path Parameters

model
string
required

Model name, in the format models/{model}.

Body

application/json
contents
object[]
required

Current conversation content. A single-round request usually has only one Content; multi-round conversations include historical and latest requests in order.

Minimum array length: 1
systemInstruction
object

System commands set by developers should currently use the plain text part.

tools
object[]

A list of tools that the model can use, such as function calls or code execution.

toolConfig
object

Tool call configuration.

safetySettings
object[]

Security filtering rules; the same category can be configured at most once, overriding the default threshold for that category.

generationConfig
object

Generate and output configurations.

cachedContent
string

The cached content name to use as context, in the format cachedContents/{cachedContent}.

serviceTier
enum<string>

Request service level.

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

Whether to log this request; if set, it will override the project-level log configuration.

labels
object

Request tags; keys such as safety_identifier can be used.

Response

200 - application/json

Gemini API: models.generateContent normal response. Fully inline and suitable for importing into Apifox.

candidates
object[]

A list of candidate responses generated by the model.

promptFeedback
object

Feedback when prompt words are blocked or filtered.

usageMetadata
object

Word usage statistics.

modelVersion
string

The actual model version used.

responseId
string

Response unique ID.