Skip to main content
POST
Generate content

Query Parameters

key
string
required

AnyFast API key.

Body

application/json
contents
object[]
required

Conversation turns. Do not end the request with a non-empty model turn.

Minimum array length: 1
systemInstruction
object
generationConfig
object

Do not include temperature, topP, topK, candidateCount, or thinkingBudget.

tools
object[]

Function declarations or supported built-in Gemini tools such as Google Search and code execution.

toolConfig
object

Tool execution and function-calling configuration.

safetySettings
object[]

Per-category content safety thresholds.

Response

Content generated successfully

candidates
object[]
usageMetadata
object
modelVersion
string
Example:

"gemini-3.6-flash"

responseId
string
quota
integer

AnyFast quota usage reported for the request.