---
title: "Generate Gemini content"
method: POST
path: "/models/{model}:generateContent"
---

# Generate Gemini content

`POST /models/{model}:generateContent`

## Request

- Base URL: `https://reapi.ai/api/v1beta`
- URL: `https://reapi.ai/api/v1beta/models/{model}:generateContent`
- Auth: one of:
  - API key in header `x-goog-api-key`
  - API key in query parameter `key`
  - HTTP bearer

Native Google GenerateContent format. The model is selected in the URL. Request fields, unknown extensions, signed parts and continuation tokens are preserved. No automatic retries, tool execution or continuation requests. HTTP 200 alone does not establish that an optional parameter took effect.

## Path parameters

- `model` 'gemini-4-argon', required

## Request body

- object
  - `contents` object[], required: Conversation contents with user/model roles and native parts. Preserve complete model parts, thought signatures and function calls across turns. Media inputs require public HTTP(S) fileData.fileUri URLs.
  - `tools` object[]: Native tool declarations and supported built-in tools. Your application executes client functions and supplies functionResponse parts.
  - `toolConfig` object: Native tool configuration, forwarded without rewriting.
  - `safetySettings` object[]: Per-category safety settings; omitted categories retain model defaults.
  - `continuationToken` string: Opaque token from a previous candidate. Continue with the original contents unchanged. reAPI never starts another request automatically.
  - `labels` object: String-valued request labels, forwarded unchanged.
  - `systemInstruction` object: Top-level system instructions as a native Content object.
  - `generationConfig` object: Native generation options, including maxOutputTokens, thinkingConfig, stopSequences and output schemas. Unknown nested fields pass through unchanged.
    - `maxOutputTokens` integer: Thinking plus output budget. REST defaults/per-request caps: 32,768 for generateContent; 65,536 for streamGenerateContent. Larger budgets can require explicit continuation within the shared 1,048,576-token input/thinking/output window.
    - `thinkingConfig` object: thinkingLevel: low, medium (default), high. includeThoughts requests available thought summaries. thinkingBudget is deprecated on Argon; combining it with thinkingLevel is rejected by Google.
    - `stopSequences` string[]: Up to five stop sequences in the Google reference; matched text is excluded from output.
    - `responseMimeType` string: Requested text MIME type; text/plain is the default. Use application/json with a JSON output schema.
    - `responseJsonSchema` unknown
    - `responseSchema` object: Legacy schema format; deprecated in the current Google reference. Do not combine it with responseJsonSchema.
    - `_responseJsonSchema` unknown
    - `responseFormat` object: Per-modality response format configuration from the current Google reference; model support varies.
    - `responseModalities` string[]: Requested output modalities. Argon produces text; an omitted or empty list requests text.
    - `candidateCount` integer: Number of response candidates; Google reference default is 1. Model-specific behavior is determined upstream.
    - `temperature` number: The current Google reference says this setting is ignored on Gemini 3.6 Flash and newer models. Passed through unchanged.
    - `topP` number: The current Google reference says this setting is ignored on Gemini 3.6 Flash and newer models. Passed through unchanged.
    - `topK` integer: The current Google reference says this setting is ignored on Gemini 3.6 Flash and newer models. Passed through unchanged.
    - `seed` integer: Optional decoding seed; omission leaves seed selection to the model service.
    - `presencePenalty` number: Native presence penalty; availability and behavior are model-dependent.
    - `frequencyPenalty` number: Native frequency penalty; availability and behavior are model-dependent.
    - `responseLogprobs` boolean: Requests candidate log probabilities when supported.
    - `logprobs` integer: Number of log-probability alternatives; Google reference range 0–20, with responseLogprobs enabled.
    - `mediaResolution` string: MEDIA_RESOLUTION_UNSPECIFIED, MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM or MEDIA_RESOLUTION_HIGH. Support depends on input type and model.
    - `enableEnhancedCivicAnswers` boolean: Generic Google API option; availability is model-dependent.
    - `speechConfig` object: Generic speech output configuration. Argon is a text-output model; this is not a claim of audio generation support.
    - `imageConfig` object: Generic image output configuration. Argon is a text-output model; this is not a claim of image generation support.
    - `enableAffectiveDialog` boolean: Generic Google API option; availability is model-dependent.
    - `translationConfig` object: Generic Google API translation configuration; availability is model-dependent.
    - `audioTranscriptionConfig` object: Generic Google API speech recognition configuration; availability is model-dependent.
  - `cachedContent` string: Explicit cached-content resource. Google documents explicit caching as unsupported on Gemini 4 Argon; the field is still forwarded for the model to handle.
  - `serviceTier` string: Google service tier: unspecified (standard by default), standard, flex or priority. Availability is determined by the model service.
  - `store` boolean: Optional request logging control in the Google API. No default is imposed by reAPI.

## Response `200`

Native GenerateContent response

- object
  - `candidates` object[]
    - `content` object
    - `finishReason` string
    - `continuationToken` string
    - `groundingMetadata` object
    - `citationMetadata` object
  - `usageMetadata` object
  - `promptFeedback` object
  - `modelVersion` string
  - `responseId` string

## Other responses

- `400`: Google-style error envelope; see the model API documentation for status meanings.
- `401`: Google-style error envelope; see the model API documentation for status meanings.
- `402`: Google-style error envelope; see the model API documentation for status meanings.
- `403`: Google-style error envelope; see the model API documentation for status meanings.
- `404`: Google-style error envelope; see the model API documentation for status meanings.
- `413`: Google-style error envelope; see the model API documentation for status meanings.
- `429`: Google-style error envelope; see the model API documentation for status meanings.
- `502`: Google-style error envelope; see the model API documentation for status meanings.
- `503`: Google-style error envelope; see the model API documentation for status meanings.
- `504`: Google-style error envelope; see the model API documentation for status meanings.

---

[API](https://skmtc.dev/reapi/apis/reapi-http-api.md) - [All operations](https://skmtc.dev/reapi/apis/reapi-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reapi/apis/reapi-http-api/revisions/1d2713a6058a?raw)
