Text Generation
Gemini Native Format
The native Gemini endpoint, kept for existing Gemini clients; supports text and streaming
POST
The path and request body follow Google’s native Gemini format, using
contents and generationConfig, and authenticate with x-goog-api-key. This endpoint exposes nothing beyond what Chat offers, so new integrations should use the General Chat API.
Authorizations
string
Your WaveAPI key. Use one of this header, Create a key in the console; see Authentication for details.
Authorization or the key query parameter.string
Your WaveAPI key. Use one of this header,
x-goog-api-key or the key query parameter.string
Your WaveAPI key. Use one of this parameter,
x-goog-api-key or Authorization.Body
string
required
Model ID, used as a URL path parameter. Eight models can be called here:
gemini-3.8-flashgemini-3.7-flashgemini-3.6-flashgemini-3.5-flashgemini-3.1-pro-previewgemini-3-flash-previewgemini-2.5-progemini-2.5-flash-lite
gemini-3.5-flash-lite is not available on this endpoint and returns 400 here. How each model is billed and what it supports are in the Text Models Overview · Google Gemini.array
required
Conversation contents array.
object
Generation configuration.
Response
Examples
Streaming
Usage and billing
Native responses report usage inusageMetadata and carry no usage.cost field; check the console
usage record for the actual charge. promptTokenCount already includes cachedContentTokenCount, and billed
output is candidatesTokenCount + thoughtsTokenCount. candidatesTokenCount is not the equivalent of Chat’s
completion_tokens, which already includes reasoning tokens.
For streaming, the final cumulative usage is authoritative and per-frame values are not summed; the last frame can carry
usage only, with candidates as an empty array, so read usageMetadata before checking for candidate content.
Rates and the shared rules are in the Text Models Overview · Billing rules.
Not supported
The following return400 and are not billed:
- Explicit context caching —
cachedContent/cached_contentare rejected across the whole Gemini line; only automatic caching is open.cache_controlis ignored and does not return400. See Caching. - Built-in tools — grounding, hosted search and other vendor built-ins. Client-executed function tools are not in this group.
service_tierset to anything other thanstandard/default.- Function calling and structured output — use the General Chat API when you need either.