Endpoints
Generate Content
Stream Generate Content
List Models
Get Model Info
Count Tokens
Authentication
string
required
Bearer token authentication
string
API key as query parameter
Path Parameters
string
required
Model name:
gemini-3-flash- Fast and efficientgemini-3-pro-high- High quality reasoninggemini-3-pro-low- Cost-efficientgemini-3-pro-image- Image generationclaude-sonnet-4-6- Mapped Claude model
Request Headers
string
required
Must be
application/jsonRequest Body
array
required
Conversation content in Gemini format
object
Generation parameters
array
Available tools/functions
object
System-level instruction
string
Project ID (automatically injected by proxy)
Response Format
Non-Streaming Response
array
Generated candidates
object
Token usage statistics
string
Actual model version used
Example: Basic Generation
Example: Streaming
Example: With System Instruction
Example: Function Calling
Example: Google Search Grounding
Example: Multi-Modal (Image)
Example: Extended Thinking
Model Information
Get detailed model specs:maxOutputTokens- Maximum output limitsupportsThinking- Extended thinking supportsupportedGenerationMethods- Available methodsinputTokenLimit- Context window size
Token Counting
Features
- Native Gemini Protocol: Full compatibility with Google AI SDK
- Auto Project Injection: Automatically injects project ID from account pool
- Dynamic Token Limits: Automatically caps
maxOutputTokensto model limits - Thinking Signatures: Validates and preserves thinking signatures across turns
- MCP Fuzzy Matching: Intelligent tool name matching for MCP servers
- Grounding Support: Google Search integration for factual queries
- Context Caching: Automatic caching for repeated contexts
Error Format
400- Invalid request401- Authentication failed429- Quota exceeded (triggers auto-retry)500- Internal error