GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
rreAPI Docs

gemini-4-argon

Use Gemini 4 Argon with native Google GenerateContent requests, streaming, thinking controls, JSON schemas, tool calls, and explicit continuation on reAPI.

Use gemini-4-argon with reAPI's native Google GenerateContent endpoints; see the model page for current availability and pricing.

Quick example

These examples make one non-streaming request without automatic retries or continuation. Your reAPI key belongs in x-goog-api-key; a Google account key is not required. Python uses the standard library. The JavaScript example uses @google/genai 2.29.1 with explicit retry and continuation controls.

curl https://reapi.ai/api/v1beta/models/gemini-4-argon:generateContent \
  -H "x-goog-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role":"user","parts":[{"text":"Review this design and suggest a minimal verification plan."}]}],
    "generationConfig": {
      "maxOutputTokens": 4096,
      "thinkingConfig": {"thinkingLevel":"medium"}
    }
  }'
import json
from urllib.request import Request, urlopen

body = {
    "contents": [{"role": "user", "parts": [{"text": "Review this design and suggest a minimal verification plan."}]}],
    "generationConfig": {
        "maxOutputTokens": 4096,
        "thinkingConfig": {"thinkingLevel": "medium"},
    },
}
request = Request(
    "https://reapi.ai/api/v1beta/models/gemini-4-argon:generateContent",
    data=json.dumps(body).encode("utf-8"),
    headers={"x-goog-api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    method="POST",
)
with urlopen(request, timeout=120) as response:
    result = json.load(response)
print(json.dumps(result, indent=2))
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: "YOUR_API_KEY",
  httpOptions: {
    baseUrl: "https://reapi.ai/api",
    apiVersion: "v1beta",
    retryOptions: { attempts: 1 },
  },
});
const response = await ai.models.generateContent({
  model: "gemini-4-argon",
  contents: "Review this design and suggest a minimal verification plan.",
  config: {
    maxOutputTokens: 4096,
    thinkingConfig: { thinkingLevel: "medium" },
    automaticContinuation: false,
  },
});
console.log(response.text);
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body := []byte(`{
      "contents":[{"role":"user","parts":[{"text":"Review this design and suggest a minimal verification plan."}]}],
      "generationConfig":{"maxOutputTokens":4096,"thinkingConfig":{"thinkingLevel":"medium"}}
    }`)
    req, err := http.NewRequest("POST",
        "https://reapi.ai/api/v1beta/models/gemini-4-argon:generateContent",
        bytes.NewReader(body))
    if err != nil { panic(err) }
    req.Header.Set("x-goog-api-key", "YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")
    resp, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()
    out, err := io.ReadAll(resp.Body)
    if err != nil { panic(err) }
    fmt.Println(resp.Status, string(out))
}

Endpoints and authentication

MethodURLResponse
POSThttps://reapi.ai/api/v1beta/models/gemini-4-argon:generateContentNative JSON
POSThttps://reapi.ai/api/v1beta/models/gemini-4-argon:streamGenerateContent?alt=sseNative SSE

Send Content-Type: application/json and x-goog-api-key: YOUR_API_KEY. Authorization: Bearer YOUR_API_KEY and the Google-compatible ?key=YOUR_API_KEY parameter are also accepted. Prefer the header examples. An explicitly supplied Google key takes precedence over bearer or browser-session credentials. Create your key in API Keys.

The JavaScript Google SDK base URL is https://reapi.ai/api, with apiVersion: "v1beta". The SDK adds /v1beta/models/gemini-4-argon:generateContent, or its streaming equivalent. Do not put /v1beta in both the base URL and API version. Direct HTTP clients use the complete endpoint shown above.

Choose streaming by endpoint, not a stream body field. generateContent returns JSON; streamGenerateContent?alt=sse returns text/event-stream. There is no asynchronous task ID or task polling. This integration exposes these generation methods, not Google's Files, cache-management, Interactions, or token-counting APIs.

Request parameters

The native JSON body is forwarded unchanged, including unknown fields and nested schemas. This inventory describes Google's request format; it is not a field allowlist. The model service determines parameter acceptance and behavior. Authentication, billing admission, request size, and the platform media policy remain separate checks.

The model is selected in the URL. Do not replace contents with OpenAI messages or put reasoning_effort in a native request.

FieldTypeRequired / defaultMeaning
contentsContent arrayRequiredConversation history plus the current input; each content has role (user or model) and parts
toolsTool arrayOptional; omittedNative function declarations and supported built-in tools
toolConfigobjectOptional; omittedNative function-calling and other tool configuration
safetySettingsarrayOptional; model defaultsPer-category thresholds; Google permits at most one setting per category
continuationTokenstringOptional; omittedOpaque checkpoint token returned by a candidate; reuse the original contents when continuing
labelsstring-valued objectOptional; omittedRequest metadata; Google specifies lowercase letters, digits, underscores and dashes, at most 63 characters per key/value, with keys beginning with a letter
systemInstructionContent objectOptional; omittedTop-level text instructions, such as {"parts":[{"text":"Be concise."}]}
generationConfigobjectOptional; model defaultsOutput budget, thinking, stop sequences, schemas and other generation settings
cachedContentstringOptional; omittedExplicit cache resource; Google documents explicit caching as unsupported on Argon. The field still passes through
serviceTierstring enumOptional; standardunspecified, standard, flex, priority; availability depends on the model service
storebooleanOptional; omittedGoogle request-logging control; reAPI does not add a default

For media, use native fileData parts with a public HTTP(S) fileUri and the correct mimeType. inlineData, base64 media and data: media URIs are not accepted. Opaque thought signatures and continuation tokens are protocol state, not media inputs; preserve them exactly. Google documents image, audio, video and PDF inputs for Argon and text output. A format's presence in the generic API does not establish model-specific availability.

generationConfig

All fields below are optional. Unless stated, omission leaves the model default in effect; reAPI does not fill in a sampling setting or rewrite a schema.

FieldTypeDocumented behavior
maxOutputTokensintegerThinking plus output budget; REST defaults/per-request caps are 32,768 for JSON and 65,536 for SSE. Larger budgets can require continuation. Input, thinking and output share 1,048,576 tokens
thinkingConfigobjectthinkingLevel: low, medium (Argon default), high; includeThoughts requests available thought summaries. thinkingBudget is deprecated; Google rejects combining budget and level
stopSequencesstring arrayUp to five sequences; the matched sequence is excluded from output
responseMimeTypestringtext/plain by default; application/json and text/x.enum are documented alternatives
responseJsonSchemaJSON valueJSON Schema output constraint; forward the complete schema, with support determined by Google
responseSchemaobjectLegacy output schema, deprecated in the current reference; do not combine with responseJsonSchema
_responseJsonSchemaJSON valueDeprecated compatibility field; prefer the documented public output-format fields
responseFormatobjectCurrent Google reference's per-modality format configuration; model support varies
responseModalitiesstring arrayOmitted/empty requests text; Argon is a text-output model
candidateCountintegerGeneric reference default 1; model-specific behavior is determined upstream
temperature, topP, topKnumber, number, integerThe current Google reference says these are ignored on Gemini 3.6 Flash and newer models; they still pass through
seedintegerOptional decoding seed; omission leaves selection to the service
presencePenalty, frequencyPenaltynumberNative repetition settings; model behavior varies
responseLogprobsbooleanRequests candidate log probabilities where supported
logprobsinteger0–20 alternatives in the generic reference; requires responseLogprobs
mediaResolutionstring enumMEDIA_RESOLUTION_UNSPECIFIED, MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM, MEDIA_RESOLUTION_HIGH; support depends on media and model
enableEnhancedCivicAnswers, enableAffectiveDialogbooleanGeneric Google options; model availability varies
speechConfig, imageConfigobjectGeneric output configurations; their presence does not mean Argon generates audio or images
translationConfig, audioTranscriptionConfigobjectGeneric task configurations; model availability varies

The Google GenerateContent reference defines nested content, tool, safety and configuration objects. All nested and additional fields remain accessible through the request JSON.

Structured output

This native configuration requests an object matching a JSON Schema:

{
  "generationConfig": {
    "responseMimeType": "application/json",
    "responseJsonSchema": {
      "type": "object",
      "properties": {"answer": {"type": "string"}},
      "required": ["answer"],
      "additionalProperties": false
    }
  }
}

OpenAI-compatible requests

Existing OpenAI clients can use POST https://reapi.ai/api/v1/chat/completions, an OpenAI SDK base URL of https://reapi.ai/api/v1, and bearer authentication. That body uses model, messages, stream and the OpenAI parameter names. Keep it separate from the native body above.

Google documents the compatibility mapping reasoning_effort: minimal → low, low → low, medium → medium, and high → high. Prefer the native generationConfig.thinkingConfig format when working directly with Gemini-specific settings and signed parts. A parameter being accepted does not prove its effect. Google OpenAI compatibility.

OpenAI compatibility is partial on reAPI for this model. The current reasoning_effort compatibility requests can fail; use the native Gemini endpoints and thinkingConfig for the verified integration.

Pricing dimensions

SaaS calculates the charge from the response's usageMetadata and the configured token rates frozen when the request starts. JSON and SSE use the same billing path. Rates and current availability are shown on the model page. Explicit caching is not supported on Argon; do not assume that a repeated prompt produced an implicit cache hit unless usage reports it.

Each continuation is a separate HTTP request with its own usage and charge. reAPI performs one generation attempt per request, with no automatic retries or continuation loop. Your application's SDK can otherwise issue additional requests, which is why the examples disable both behaviors.

Bill formula

Input usage is promptTokenCount + toolUsePromptTokenCount; output usage is candidatesTokenCount + thoughtsTokenCount. Cached input is already included in the prompt count. With rates expressed per token, billed_usd = (input_tokens − cached_tokens) × input_rate + cached_tokens × cache_read_rate + output_tokens × output_rate. Use the applicable reAPI rates, including the configured price group. If no separate cache-read rate is configured, cached input uses the normal input rate. A configured long-context tier applies when its input threshold condition is met. This token calculation adds no separate flat tool fee.

For SSE, the final cumulative usage is settled once after complete delivery; usage counts from successive chunks are not added together. Thinking tokens are included once, even when thought summaries are hidden. A separate fee field or fee event is not required.

The final billed USD amount is rounded upward to micro-units: micro_units = ceil(billed_usd × 1,000,000), then credits = micro_units / 1,000. One credit equals $0.001; token requests are not rounded up to a whole credit individually. Failed delivery, cancellation, incomplete streams, or missing trusted usage follow the no-charge settlement path.

Responses, tools and continuation

FieldMeaning
candidates[]Native response candidates; inspect each candidate's content, finishReason and optional continuationToken
content.parts[]Text, thought summaries, signed parts, function calls and other native output parts
usageMetadataPrompt, candidate, thinking, cached-content and applicable tool-use token counters
promptFeedbackPrompt blocking/safety feedback when returned
groundingMetadata, citationMetadataCandidate-level grounding or citation data when returned
modelVersion, responseIdModel and response identifiers when supplied

Text comes from candidate parts with text; parts marked thought: true are thought summaries. Preserve the complete model content for later turns, including thoughtSignature, part ordering and functionCall objects. Do not reconstruct a signed turn from the displayed text alone.

Your application executes client functions and sends functionResponse parts in a subsequent user content. reAPI does not execute those functions. When supplying Python callables to the Google SDK, set automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True) if your application must control each tool round trip explicitly.

For streaming, change the curl URL to :streamGenerateContent?alt=sse and add --no-buffer. Each SSE data: frame contains a native JSON response fragment. The stream ends at EOF, with no OpenAI [DONE] sentinel. Read in-stream error frames and finishReason; do not interpret any received text as proof that the stream completed.

CONTINUATION means the per-request cap was reached before generation finished. The candidate supplies an opaque continuationToken; it can have no visible text if the hop was spent thinking. To continue, make another request with the original contents unchanged and that token. If resuming after MAX_TOKENS, raise maxOutputTokens. Keep the token intact; do not generate or decode it yourself. Google's Argon and long-output guidance.

Errors

Native errors use Google's shape, with an HTTP status code and status name:

{
  "error": {
    "code": 400,
    "message": "Request body must be a JSON object.",
    "status": "INVALID_ARGUMENT"
  }
}

The response includes a request-id header for support. Native model error details are preserved where returned. OpenAI-compatible errors retain that endpoint's separate format.

HTTP statusNative statusMeaning
400INVALID_ARGUMENTInvalid JSON/request or a model-rejected parameter combination
401UNAUTHENTICATEDMissing or invalid reAPI key
402FAILED_PRECONDITIONInsufficient balance for admission
403PERMISSION_DENIEDAccess denied
404NOT_FOUNDUnknown model or method
413INVALID_ARGUMENTRequest body exceeds 32 MB
429RESOURCE_EXHAUSTEDRate or concurrency limit
502INTERNALInvalid response or incomplete delivery
503UNAVAILABLEService or pricing unavailable
504DEADLINE_EXCEEDEDRequest deadline exceeded

An error can arrive inside an already-open SSE stream. Handle it before treating the result as complete. See the platform error catalog for the other reAPI surfaces.

Tips

  • Start with medium thinking and an explicit output budget appropriate to the task. Thinking consumes that budget even when summaries are not requested.
  • Keep original signed parts for tool turns and keep the original request separately for continuation.
  • Use native JSON for Gemini-specific tools and generation settings. Do not paste OpenAI field names into a native request.
  • Use public media URLs and their actual MIME types; this API does not upload files to Google for you.
  • Inspect usage and finish reasons. HTTP 200 alone does not verify grounding, caching, schema adherence, or a particular parameter's effect.

Official references reviewed 2026-10-14: GenerateContent, Argon model, thinking, JavaScript HTTP options, JavaScript retry options, JavaScript continuation, Python SDK types.

Table of Contents