generateContent calling styles. All requests are forwarded by GregAPI — no self-signing required, just pass the GregAPI API Key in the header.
Supported Models
Resolution Tiers
Thesize or imageConfig.imageSize field accepts the following tiers:
Supported tiers per model:
gemini-2.5-flash-image:1Konly; higher tiers auto-downgrade to1Kgemini-3-pro-image-preview:1K/2K/4Kgemini-3.1-flash-image:512/1K/2K/4K
Aspect Ratios
All three models support:gemini-3.1-flash-image additionally supports:
Calling Style Comparison
Billing
- Text input: billed by prompt tokens.
- Image output: prioritizes upstream
usageMetadataimage tokens; if unavailable, estimated per tier:gemini-2.5-flash-image/gemini-3-pro-image-preview: 1120 tokens per 1K/2K image, 2000 tokens per 4K image.gemini-3.1-flash-image: 747 tokens (512), 1120 tokens (1K), 1680 tokens (2K), 2520 tokens (4K).
- no-image responses that were already billed return usage: top-level
usagefor OpenAI-style,usageMetadatafor native API, and top-levelusagefor async task queries.