Skip to main content
Gemini 4 Argon exposes text reasoning, multimodal understanding, structured output, function calling, and built-in tools through one generateContent endpoint. Select a capability to view its request and response shape.

Generate content

POST /v1beta/models/gemini-4-argon:generateContent
cURL

Authentication and headers

string
required
AnyFast API key.
string
default:"application/json"
required
Request media type.

Request body

object[]
required
Conversation history and the current user request. The final item must be a non-empty user turn.
string
default:"user"
Conversation role: user or model. Do not end the request with a model turn.
object[]
required
Content parts for the turn.
string
required
Text prompt or conversation content.
string
default:"medium"
Thinking level: low, medium, or high.
integer
Maximum generated tokens for a synchronous request, from 1 through 32,768.

Successful response

200
object[]
Generated candidates.
object
Model response turn.
string
Generated text.
string
Why generation stopped, such as STOP, MAX_TOKENS, or SAFETY.
object[]
Safety assessments returned when the candidate is evaluated.
object
Input, output, reasoning, tool, cache, and total token counts.
string
Model version that produced the response.
string
Response identifier.

Common optional request fields

object
Text-only system instruction with a parts array.
string[]
Up to five strings that stop generation when encountered.
object[]
Safety thresholds applied by harm category.
string
Supported category, such as HARM_CATEGORY_HATE_SPEECH or HARM_CATEGORY_DANGEROUS_CONTENT.
string
Blocking threshold, such as BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, or BLOCK_NONE.

Error responses

integer
HTTP-compatible error code.
string
Human-readable error description.
string
Canonical error status.
A 400 response commonly indicates an invalid final conversation turn, an unsupported thinking level or tool, or an incomplete function response. A 401 response indicates an invalid API key; 429 indicates rate limiting.