Skip to main content
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, Authorization or the key query parameter.
Create a key in the console; see Authentication for details.
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-flash
  • gemini-3.7-flash
  • gemini-3.6-flash
  • gemini-3.5-flash
  • gemini-3.1-pro-preview
  • gemini-3-flash-preview
  • gemini-2.5-pro
  • gemini-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 in usageMetadata 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 return 400 and are not billed:
  • Explicit context caching — cachedContent / cached_content are rejected across the whole Gemini line; only automatic caching is open. cache_control is ignored and does not return 400. See Caching.
  • Built-in tools — grounding, hosted search and other vendor built-ins. Client-executed function tools are not in this group.
  • service_tier set to anything other than standard / default.
  • Function calling and structured output — use the General Chat API when you need either.