Seedance 2.5 is live — 30-second cinematic video with native audio & real-person references
rreAPI Docs

gemini-3-6-flash

Gemini 3.6 Flash — Google's Stable Gemini 3 model. OpenAI-compatible /v1/chat/completions on api.reapi.ai. 1,048,576-token input window, 65,536-token max output, text/image/video/audio/PDF input, thinking, tool calling and Search grounding.

Google's Gemini 3.6 Flash, exposed through api.reapi.ai as a drop-in OpenAI-compatible Chat Completions endpoint. A 1,048,576-token input window, 65,536-token max output, inputs across text, image, video, audio and PDF with text output, plus thinking, function calling, code execution, structured outputs, context caching, file search, URL context and Search / Maps grounding. The wire model id is gemini-3.6-flash. Current rates live on the model page and on api.reapi.ai/pricing.

Quick example

curl https://api.reapi.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.6-flash",
    "messages": [
      { "role": "user", "content": "Summarise the attached contract in five bullets." }
    ],
    "stream": true,
    "max_tokens": 8192
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.reapi.ai/v1",
)

stream = client.chat.completions.create(
    model="gemini-3.6-flash",
    messages=[{"role": "user", "content": "Summarise the attached contract in five bullets."}],
    max_tokens=8192,
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://api.reapi.ai/v1",
});

const stream = await client.chat.completions.create({
  model: "gemini-3.6-flash",
  messages: [
    { role: "user", content: "Summarise the attached contract in five bullets." },
  ],
  max_tokens: 8192,
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
package main

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

func main() {
    body, _ := json.Marshal(map[string]any{
        "model": "gemini-3.6-flash",
        "messages": []map[string]string{
            {"role": "user", "content": "Summarise the attached contract in five bullets."},
        },
        "max_tokens": 8192,
    })
    req, _ := http.NewRequest("POST",
        "https://api.reapi.ai/v1/chat/completions", bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}

Authentication

Chat models are served from the api.reapi.ai gateway, which has its own console and its own key. Create the key there, then send it as a bearer token:

Authorization: Bearer YOUR_API_KEY

The gateway key is not the same credential as a media-generation key used against reapi.ai/api/v1. Sign in at api.reapi.ai to create one.


Endpoint

POST /v1/chat/completions

Base URL https://api.reapi.ai. The wire format is OpenAI-compatible, so the same SDKs (openai-python, openai-node, openai-go, …) work once you swap the base URL, the key and the model string. The gateway also lists a native Gemini endpoint type for this model if you prefer Google's own request format.


Request body

model — string, required

Must be gemini-3.6-flash exactly. The dotted form is the wire id; the /models/gemini-3-6-flash landing page uses a hyphenated slug for the URL.

messages — array, required

Conversation history, each entry an object with role and content. Roles are system, user and assistant. Multimodal parts are supported — see Multimodal input.

max_tokens — integer

Upper bound on output tokens for this response, thinking tokens included. Google documents a 65,536-token output ceiling for this model, so higher values are clamped to it.

stream — boolean, default false

When true, tokens arrive as server-sent events terminated by data: [DONE]. Recommended for anything a person watches.

temperature — number, default 1

Sampling temperature. Lower is more deterministic.

top_p — number, default 0.95

Nucleus sampling cutoff. Tune either temperature or top_p, not both.

tools / tool_choice — optional

Function declarations for tool calling, and the strategy for picking among them. See Tools and grounding.

group — string, default "default"

Token group on the gateway. Leave it at default unless your account has been given another group to route through.


Multimodal input

Google documents the following supported inputs for this model:

ModalitySupported
Text
Image
Video
Audio
PDF

Output is text only. Audio generation, image generation and the Live API are not supported on this model — use a dedicated model for those.

PDF being a first-class input matters for document workloads: a contract set or a research bundle goes in whole, without a chunking layer of your own.


Thinking

Thinking is a supported capability. The reasoning pass is what carries a multi-step plan across tool calls instead of restarting on each turn.

Thinking tokens are billed as output tokens and count toward max_tokens. A long reasoning pass therefore competes with the visible answer for the same budget — raise max_tokens when you ask for both deep reasoning and long output.


Tools and grounding

CapabilityStatus
Function callingSupported
Code executionSupported
File searchSupported
Structured outputsSupported
Context cachingSupported
URL contextSupported
Search groundingSupported
Grounding with Google MapsSupported
Computer useSupported (preview)

Google meters grounded search queries separately from tokens, and a single request may fan out into more than one search query.


Pricing dimensions

Billing is per token, in USD, against your api.reapi.ai balance, with separate input and output rates. Three things to keep in mind:

  • Thinking tokens bill as output. They are the usual reason a bill exceeds an estimate built from visible response length alone.
  • Output dominates. For most generative workloads the output rate, not the input rate, decides the invoice.
  • Grounded search is metered by Google separately from tokens.

Both token rates sit 20% below Google's published Standard rate. Current numbers are on the model page and api.reapi.ai/pricing — those tables are the canonical source, not this page.

Chat models bill in USD on the gateway balance. They do not draw down the integer credits used by the media-generation endpoints on reapi.ai/api/v1.


Response shape

Non-streaming (stream: false)

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1785000000,
  "model": "gemini-3.6-flash",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "..." },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 812,
    "completion_tokens": 240,
    "total_tokens": 1052
  }
}

usage.completion_tokens includes thinking tokens, so it is the number to reconcile a bill against.

Streaming (stream: true)

Server-sent events, each data: line carrying a chat.completion.chunk with the incremental text in choices[0].delta.content, terminated by data: [DONE].


Errors

Failures use the gateway's standard envelope. See the errors catalog for the full code list. Common cases:

TriggerWhat to do
Missing or invalid bearer tokenCreate a key in the api.reapi.ai console
Unknown model valueSend gemini-3.6-flash exactly, dots included
max_tokens above the model ceilingLower it; the documented ceiling is 65,536
Insufficient balanceTop up on the gateway
Upstream rate limitRetry with backoff, or route through another model

Tips

  • Stream anything interactive. Time-to-first-token is what users perceive; a non-streamed long answer reads as a hang.
  • Budget for thinking. If responses truncate mid-sentence on hard prompts, the reasoning pass consumed the max_tokens allowance — raise it.
  • Put the whole document in. With a 1,048,576-token window, a retrieval layer whose only purpose was working around a small context is usually worth deleting.
  • Use structured outputs for tool arguments. Schema-constrained output removes a whole class of parse-and-retry logic.
  • Reach for grounding rather than a stale answer. Search grounding and URL context exist precisely for facts newer than the training data.
  • Pin the Stable string. gemini-3.6-flash is Google's Stable channel id; latest-style aliases can be hot-swapped underneath you.

Table of Contents