Count Tokens
Google-compatible countTokens endpoint for pre-flight context-window sizing. The request body matches :generateContent. NOTE: Opper has no in-process Gemini tokenizer and returns a chars/4 heuristic (±~20% on English prose) — sufficient for “does my prompt fit?” checks but not for exact cost projection.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Function name for tracing and project-level guardrail function-scope filtering.
Parent span ID for distributed tracing context.
Path Parameters
Model id — a bare Gemini name (e.g. gemini-2.5-flash, resolved against the Gemini-direct provider) or an Opper-canonical id (e.g. vertexai/gemini-2.5-flash).
Body
Any value
Any value