Gemini API
An API service platform provided by Google for the Gemini family of models. Developers can call successive generations of Gemini models through their model identifiers, accessing the capabilities of each version via a unified interface.
Timeline (last 90 days)
The Gemini API implements a 1 million unified input-output token limit.
Under the continuation protocol, the stream may be interrupted before the text reaches the safe zone, and a segment may be entirely thinking process, so empty text does not mean completion.
In the continuation loop, the model provides checkpoints, and the loop logic decides what counts as committed, so a loop bug is different from a model bug.
Under the continuation protocol, requests must remain completely identical, and each resend must include the content, system instructions and tools, because the token carries the hash of the original prompt.
The reason the non-streaming request output cap is lower is that it needs to assemble and return the entire response at once, imposing stricter buffering constraints; streaming allows sending while generating, with lower memory pressure.
Streaming (SSE / streamGenerateContent) and non-streaming (generateContent) differ in the single-request output cap: the former is 65,536, the latter 32,768.
Under the continuation protocol, each continuation resends the prompt plus the already-decoded content, so the cumulative input token count grows far faster than the context.
When using the continuation_token to resume generation, the prompt must be byte-for-byte identical, otherwise the hash check fails and returns HTTP 400.
The continuation_token is a self-contained encrypted payload that internally encodes the original prompt hash and the generated position pos, rather than a server-side session ID.
When a Gemini API single request's output exceeds the limit, the API returns finish_reason=CONTINUATION along with a continuation_token.
26 more timeline events
All Facts (20)
演示中模拟器Agent崩溃的根因是Event Compaction配置不当导致超出Gemini API的100万Token上下文限制
85%UnverifiedGoogle通过Gemini API向开发者开放了图像生成端点,开发者只需获取API Key即可调用,无需自行部署GPU服务器
60%UnverifiedUnder the continuation protocol, the stream may be interrupted before the text reaches the safe zone, and a segment may be entirely thinking process, so empty text does not mean completion.
50%UnverifiedThe Gemini API implements a 1 million unified input-output token limit.
50%UnverifiedIn the Gemini API's continuation protocol, a single streaming request is capped at 65,536 tokens, while a non-streaming direct HTTP request is 32,768.
50%UnverifiedWhen a Gemini API single request's output exceeds the limit, the API returns finish_reason=CONTINUATION along with a continuation_token.
50%UnverifiedThe continuation_token is a self-contained encrypted payload that internally encodes the original prompt hash and the generated position pos, rather than a server-side session ID.
50%UnverifiedWhen using the continuation_token to resume generation, the prompt must be byte-for-byte identical, otherwise the hash check fails and returns HTTP 400.
50%UnverifiedUnder the continuation protocol, each continuation resends the prompt plus the already-decoded content, so the cumulative input token count grows far faster than the context.
50%UnverifiedStreaming (SSE / streamGenerateContent) and non-streaming (generateContent) differ in the single-request output cap: the former is 65,536, the latter 32,768.
50%UnverifiedThe reason the non-streaming request output cap is lower is that it needs to assemble and return the entire response at once, imposing stricter buffering constraints; streaming allows sending while generating, with lower memory pressure.
50%UnverifiedUnder the continuation protocol, requests must remain completely identical, and each resend must include the content, system instructions and tools, because the token carries the hash of the original prompt.
50%UnverifiedIn the continuation loop, the model provides checkpoints, and the loop logic decides what counts as committed, so a loop bug is different from a model bug.
50%UnverifiedImplicit caching is a cost optimization mechanism of the Gemini API: when the input prefixes of consecutive requests are highly repetitive, the system automatically identifies and reuses the already-computed KV cache, billing only the new portion at the standard rate and settling the reused portion at a discounted price.
50%UnverifiedGemini 4 Argon is not offered in the API free tier, and production-grade calls require binding a paid account.
50%UnverifiedGemini 4 Argon achieves 1 million token output through the Gemini API's new Long Decode Continuation feature, which pauses long responses and resumes them in subsequent calls to avoid timeouts.
50%UnverifiedOnce a Gemini API key is leaked, others can use the account quota to call the model, generating costs and even abuse risks; in real projects, the key should not be hardcoded into front-end code but should be stored on the server side or in environment variables.
50%UnverifiedGoogle Gemini uses a field called finishReason, with values including STOP, MAX_TOKENS, and SAFETY.
50%UnverifiedGoogle's costs are estimated by multiplying the token counts returned by the Gemini API by the list price, while OpenAI's costs are the actual usage.cost values charged by OpenRouter.
50%UnverifiedWhen editing images with the Gemini API, reference images are placed at the front of the parts array, sharing the generateContent endpoint with generation, with no distinction between generation and editing.
50%