# MaxAPI > MaxAPI provides authenticated access to public image, video, and language models with documented request formats and route-level pricing. Canonical website: https://www.maxapi.dev API base URL: https://api.maxapi.dev Authentication: Authorization: Bearer $MAXAPI_KEY Billing: 1 credit = 1 USD; failed generation tasks are not charged. Catalogue summaries do not enumerate every conditional price tier or minimum charge. Check current account prices for the applicable conditions, billing units and minimum charges before estimating cost. ## Route selection These are recognized route values, not a promise that every model supports every route. Availability depends on the model, enabled routes and your account. The pro, x and a routes require account permission; requesting one without permission returns 403. Routing precedence: a configured API key route_modes list takes priority over the request. Otherwise, an explicit request route is used; if neither is set, the model default applies. Check the API key settings before comparing route prices. ## Endpoint families - OpenAI model discovery: GET /v1/models - Language: POST /v1beta/models/{model}:generateContent - Images: POST /v1/images/generations and POST /v1/images/edits - Videos: POST /v1/videos/generations, followed by task polling - Gemini media: POST /v1beta/models/{model}:generateContent - Gemini Interactions: POST /v1beta/interactions; GET and DELETE /v1beta/interactions/{id}. Also available under /v1. Native input/steps/usage, SSE and stored continuation; model and route permissions apply. - [Interactions examples and capability limits](https://www.maxapi.dev/guides/gemini-interactions-api): currently verified routes do not support background, cancellation, event replay or managed agents. generateContent support does not imply Interactions support. - Gemini model discovery: GET /v1beta/models and GET /v1beta/models/{model} - MaxAPI structured model catalogue: GET https://www.maxapi.dev/models.json - Account balance (shared by all keys owned by the same account): GET /v1/account/balance - Per-key historical billing (scoped automatically to the Bearer key): GET /v1/account/billing/usage - new-api-compatible API-key quota: GET /api/usage/token - sub2api-compatible API-key balance: GET /v1/usage ## Async image requests and CDN delivery For POST /v1/images/generations and POST /v1/images/edits, https://async.maxapi.dev defaults to asynchronous processing when async is omitted; async: false explicitly requests synchronous processing. On https://api.maxapi.dev, send async: true to request asynchronous processing. This host default does not enable Gemini-native async requests. On api.maxapi.dev, an image request accepted with async: true returns HTTP 202. An accepted image request on async.maxapi.dev returns HTTP 200 with a task id and poll_url, not a completed image. Poll that URL with the same API key until status is succeeded, failed or canceled. On success, read data[].url; on failure, read error. Do not treat HTTP 200 alone as generation success. For supported Gemini-native image requests to /v1beta/models/{model}:generateContent, explicitly send X-MaxAPI-Async: true, even on async.maxapi.dev. Use generationConfig.responseModalities: ["IMAGE"] and set imageConfig.aspectRatio explicitly for edits. Requests using native features that cannot be preserved asynchronously must be sent synchronously; do not combine async with X-MaxAPI-Inline-Data: true. An accepted Gemini-native async request returns HTTP 200 with an Operation and done: false. Poll GET /v1beta/operations/{task_id} with the same API key until done: true. Then check error; on success, read response.candidates[].content.parts[].fileData.fileUri. Async output uses hosted image URLs, not inlineData. For hosted image URLs, default uses https://cdn.maxapi.dev and mirror uses the white-label domain https://cdn.dshsdh.space. On /v1/images/generations and /v1/images/edits, submit "asset_delivery": "mirror" in JSON, or asset_delivery=mirror as a multipart form field. On Gemini-native requests, choose the white-label CDN with the request header X-MaxAPI-Asset-Delivery: mirror, not an asset_delivery field in the JSON body. This selects the domain for hosted fileData URLs; it does not turn inlineData into a URL. For synchronous URL output, also set X-MaxAPI-Inline-Data: false. Async tasks already return image URLs after completion; no extra response_format parameter is needed. Set the CDN delivery option when submitting the task: it is stored with the task and applied to its output URLs. Adding it only when polling does not change that task’s delivery choice. White-label delivery changes the asset URL domain, not the API base URL. It does not make API calls unauthenticated, hide the caller’s identity from MaxAPI, or disable request and billing records. Treat generated image URLs as shareable links, not private storage. ## Public models ### Language models - [Gemini 2.5 Flash](https://www.maxapi.dev/models/google/gemini-2.5-flash): `google/gemini-2.5-flash` — Gemini 2.5 Flash is a fast, low-cost language model for chat and text generation, billed per token on MaxAPI. Pricing: official-cheap: input $0.124/M, output $1.029/M, audio_input $0.412/M, cache_read $0.012/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-2.5-flash.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash). - [Gemini 2.5 Flash-Lite](https://www.maxapi.dev/models/google/gemini-2.5-flash-lite): `google/gemini-2.5-flash-lite` — Gemini 2.5 Flash-Lite focuses on lightweight classification and explicit field extraction, billed per token on MaxAPI. Pricing: official-cheap: input $0.041/M, output $0.165/M, audio_input $0.124/M, cache_read $0.004/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-2.5-flash-lite.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash-lite). - [Gemini 2.5 Pro](https://www.maxapi.dev/models/google/gemini-2.5-pro): `google/gemini-2.5-pro` — Gemini 2.5 Pro focuses on complex technical reasoning and long-document analysis. Context capacity and pricing thresholds are separate; route limits apply. Pricing: official-cheap: input (≤200k) $0.515/M, output (≤200k) $4.118/M, cache_read (≤200k) $0.051/M, input (>200k) $1.029/M, output (>200k) $6.176/M, cache_read (>200k) $0.103/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-2.5-pro.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-pro). - [Gemini 3 Flash Preview](https://www.maxapi.dev/models/google/gemini-3-flash-preview): `google/gemini-3-flash-preview` — Gemini 3 Flash Preview supports interactive reasoning and multimodal understanding with text output. Preview availability and route capabilities should be checked. Pricing: official-cheap: input $0.206/M, output $1.235/M, audio_input $0.412/M, cache_read $0.021/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3-flash-preview.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview). - [Gemini 3.1 Flash-Lite](https://www.maxapi.dev/models/google/gemini-3.1-flash-lite): `google/gemini-3.1-flash-lite` — Gemini 3.1 Flash-Lite focuses on high-frequency translation, extraction and lightweight text workflows, billed per token on MaxAPI. Pricing: official-cheap: input $0.103/M, output $0.618/M, audio_input $0.206/M, cache_read $0.01/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.1-flash-lite.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite). - [Gemini 3.1 Pro Preview](https://www.maxapi.dev/models/google/gemini-3.1-pro-preview): `google/gemini-3.1-pro-preview` — Gemini 3.1 Pro Preview focuses on complex engineering, reasoning and multi-step planning. MaxAPI route capabilities and input limits apply. Pricing: official-cheap: input (≤200k) $0.824/M, output (≤200k) $4.941/M, cache_read (≤200k) $0.082/M, input (>200k) $1.647/M, output (>200k) $7.412/M, cache_read (>200k) $0.165/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.1-pro-preview.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview). - [Gemini 3.5 Flash](https://www.maxapi.dev/models/google/gemini-3.5-flash): `google/gemini-3.5-flash` — Gemini 3.5 Flash is a stable text-model entry for iterative engineering and multi-step workflows. Applications manage execution and validation. Pricing: official-cheap: input $0.618/M, output $3.706/M, cache_read $0.062/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.5-flash.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.5-flash). ### Image models - [GPT Image 2](https://www.maxapi.dev/models/openai/gpt-image-2): `openai/gpt-image-2` — GPT Image 2 supports image generation and editing with token-based image billing on MaxAPI. Pricing: official: text_input $5/M, image_input $8/M, image_output $30/M; official-cheap: text_input $3/M, image_input $4.8/M, image_output $18/M; mix: $0.019 per output image; a: $0.009 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/openai--gpt-image-2.json). [Provider source](https://developers.openai.com/api/docs/models/gpt-image-2). - [GPT Image 2.5 Sunburst](https://www.maxapi.dev/models/openai/gpt-image-2.5-sunburst): `openai/gpt-image-2.5-sunburst` — Image generation and editing. Official and Official Cheap: actual token-based billing. Mix and Pro: 0.018, X: 0.012, A: 0.009 credits per successful request. Account multipliers apply; Pro, A and X require access. Pricing: mix: $0.018 per call; pro: $0.018 per call; x: $0.012 per call; a: $0.009 per call; official: Uncached text input $4.5/M, Cached text input $1.125/M, Uncached image input $7.2/M, Cached image input $1.8/M, Image output $27/M; official-cheap: Uncached text input $3.308823/M, Cached text input $0.827205/M, Uncached image input $5.294117/M, Cached image input $1.323529/M, Image output $19.852941/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/openai--gpt-image-2.5-sunburst.json). [Provider source](https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst). - [GPT Image 2.5 Flare](https://www.maxapi.dev/models/openai/gpt-image-2.5-flare): `openai/gpt-image-2.5-flare` — Image generation and editing. Official and Official Cheap: actual token-based billing. Mix and Pro: 0.018, X: 0.012, A: 0.009 credits per successful request. Account multipliers apply; Pro, A and X require access. Pricing: mix: $0.018 per call; pro: $0.018 per call; x: $0.012 per call; a: $0.009 per call; official: Uncached text input $4.5/M, Cached text input $1.125/M, Uncached image input $7.2/M, Cached image input $1.8/M, Image output $27/M; official-cheap: Uncached text input $3.308823/M, Cached text input $0.827205/M, Uncached image input $5.294117/M, Cached image input $1.323529/M, Image output $19.852941/M. [Integration facts](https://www.maxapi.dev/model-guides/facts/openai--gpt-image-2.5-flare.json). [Provider source](https://developers.openai.com/api/docs/models/gpt-image-2.5-flare). - [Gemini 2.5 Flash Image](https://www.maxapi.dev/models/google/gemini-2.5-flash-image): `google/gemini-2.5-flash-image` — Gemini 2.5 Flash Image supports fast fixed-price image generation and reference-based editing on MaxAPI. Pricing: mix: $0.005 per call; official: $0.04 per call; official-cheap: $0.024 per call; pro: $0.006 per call. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-2.5-flash-image.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash-image). - [Gemini 3.1 Flash Lite Image](https://www.maxapi.dev/models/google/gemini-3.1-flash-lite-image): `google/gemini-3.1-flash-lite-image` — Nano Banana 2 Lite focuses on lightweight 1K generation and localized image edits. Check this MaxAPI entry's reference limits and route pricing before use. Pricing: mix: $0.015 per call. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.1-flash-lite-image.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite-image). - [Nanobanana Pro](https://www.maxapi.dev/models/google/gemini-3-pro-image-preview): `google/gemini-3-pro-image-preview` — Nanobanana Pro supports high quality image generation and reference-based editing on MaxAPI. Also known as Gemini 3 Pro Image Preview and Gemini 3 Pro Image; the canonical request ID is `google/gemini-3-pro-image-preview`. Pricing: official: input $2/M, output $120/M; official-cheap: input $0.824/M, output $49.412/M; mix: $0.065 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3-pro-image-preview.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image). - [Gemini 3.1 Flash Image Preview](https://www.maxapi.dev/models/google/gemini-3.1-flash-image-preview): `google/gemini-3.1-flash-image-preview` — Gemini 3.1 Flash Image Preview supports fast high-resolution image generation and reference-based editing on MaxAPI. Pricing: official: input $0.5/M, output $60/M; official-cheap: input $0.206/M, output $24.706/M; mix: $0.045 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.1-flash-image-preview.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image). - [Nano Banana 2.1](https://www.maxapi.dev/models/google/gemini-nano-banana-2.1): `google/gemini-nano-banana-2.1` — Nano Banana 2.1 generates and edits 1K, 2K, and 4K images with up to 14 references. The Gemini native API supports thinking levels, system instructions, and Google Search grounding. Pricing: official: input $0.5/M, output $60/M; official-cheap: input $0.206/M, output $24.706/M; mix: $0.045 per output image; pro: $0.015 per output image; x: $0.012 per output image; a: $0.0075 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-nano-banana-2.1.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1). - [Gemini 3 Pro Image Preview Beta](https://www.maxapi.dev/models/google/gemini-3-pro-image-preview-beta): `google/gemini-3-pro-image-preview-beta` — Gemini 3 Pro Image Preview Beta supports 4K image generation and reference-based editing on MaxAPI. Pricing: official-cheap: $0.085 per output image; mix: $0.065 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3-pro-image-preview-beta.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image). - [Gemini 3.1 Flash Image Preview Beta](https://www.maxapi.dev/models/google/gemini-3.1-flash-image-preview-beta): `google/gemini-3.1-flash-image-preview-beta` — Gemini 3.1 Flash Image Preview Beta supports high-resolution image generation and reference-based editing on MaxAPI. Pricing: official-cheap: $0.07 per output image; mix: $0.045 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/google--gemini-3.1-flash-image-preview-beta.json). [Provider source](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image). - [GPT Image 2 Beta](https://www.maxapi.dev/models/openai/gpt-image-2-beta): `openai/gpt-image-2-beta` — GPT Image 2 Beta supports image generation and editing with mix and official-cheap routes. Pricing: official-cheap: text_input $0.35/M, image_input $0.35/M, image_output $0.7/M; mix: $0.019 per output image. [Integration facts](https://www.maxapi.dev/model-guides/facts/openai--gpt-image-2-beta.json). [Provider source](https://developers.openai.com/api/docs/models/gpt-image-2). ### Video models - [Seedance 2.0 Fast](https://www.maxapi.dev/models/model/seedance-2.0-fast): `model/seedance-2.0-fast` — Seedance 2.0 Fast generates video, billed per output token by resolution and reference mode. Pricing: official: 480p / 720p · no ref $4.76/M, 480p / 720p · multi-ref $2.805/M; official-cheap: 480p $0.104478/s, 720p $0.104478/s; mix: 480p $0.089552/s, 720p $0.089552/s. [Integration facts](https://www.maxapi.dev/model-guides/facts/model--seedance-2.0-fast.json). [Provider source](https://docs.byteplus.com/en/docs/byteplus_las/video_gen_enhanced). - [Seedance 2.0](https://www.maxapi.dev/models/model/seedance-2.0): `model/seedance-2.0` — Seedance 2.0 supports up to 1080p, billed per output token by resolution and reference mode. Pricing: official: 480p / 720p · no ref $5.95/M, 480p / 720p · multi-ref $3.655/M, 1080p · no ref $6.545/M, 1080p · multi-ref $3.995/M; official-cheap: 480p $0.126866/s, 720p $0.126866/s, 1080p $0.126866/s; mix: 480p $0.11194/s, 720p $0.11194/s, 1080p $0.11194/s. [Integration facts](https://www.maxapi.dev/model-guides/facts/model--seedance-2.0.json). [Provider source](https://seed.bytedance.com/en/seedance2_0). - [Seedance 2.5](https://www.maxapi.dev/models/model/seedance-2.5): `model/seedance-2.5` — Seedance 2.5 multimodal video generation at 720p. Supports 4 to 30 second clips, up to 30 reference images, 10 reference videos, and 10 reference audio files. Pricing: mix: 720p $0.09/s. [Integration facts](https://www.maxapi.dev/model-guides/facts/model--seedance-2.5.json). [Provider source](https://seed.bytedance.com/en/seedance2_5). ## Featured browser trial - [Nano Banana Pro Free](https://www.maxapi.dev/models/google/nano-banana-pro-free): Try Nano Banana Pro image generation in the browser with a Google sign-in. Text-to-image and image-to-image are available for eligible new users; trial eligibility, anti-abuse checks and final output settings are documented on the trial page. Production API calls use a separate MaxAPI API key. ## Developer guides Examples are MaxAPI-specific, local-fixture tested, not live model benchmarks. Real API calls can incur charges. - [Generate an image with Python](https://www.maxapi.dev/guides/image-api-python): Use the Python standard library to submit one MaxAPI image task, poll its status and recover without blindly generating a second image. - [Generate an image with Node.js](https://www.maxapi.dev/guides/image-api-nodejs): A dependency-free Node.js example with native fetch, bounded polling, explicit failures and no automatic POST retries. - [Async image tasks: submit once, poll safely](https://www.maxapi.dev/guides/async-image-tasks): Understand HTTP 202 on api.maxapi.dev versus HTTP 200 on async.maxapi.dev, task states, and recovery without duplicate submissions. - [Send reference images without avoidable input errors](https://www.maxapi.dev/guides/reference-image-editing): Choose the image edit endpoint, preserve reference order, validate real image files and check model-specific limits before scaling to many inputs. - [Image resolution, aspect ratio and quality are different controls](https://www.maxapi.dev/guides/image-resolution-and-quality): Avoid copying 4K or high-quality settings between incompatible models. Match output parameters to the chosen MaxAPI model and endpoint. - [Handle 429 and retries without a request storm](https://www.maxapi.dev/guides/rate-limits-and-retries): Distinguish request rate from concurrency, avoid unbounded retries and keep task polling separate from new generation submissions. - [Diagnose image API errors before resubmitting](https://www.maxapi.dev/guides/image-api-errors): Separate connectivity, authentication, input, credit, policy and upstream errors; HTTP success alone does not establish task success. - [Understand routes, prices and available balance](https://www.maxapi.dev/guides/route-pricing-and-balance): Read public prices as a catalogue, confirm account-specific access, and separate a temporary reservation from a settled charge. - [Nano Banana comparison: five models, real images and prices](https://www.maxapi.dev/guides/choose-an-image-model): Compare original Nano Banana, Pro, 2, 2 Lite and 2.1 using the same prompts and reference image. Inspect original outputs, Chinese typography, actual dimensions and settled Mix costs. - [Connect MaxAPI images to n8n without duplicate submissions](https://www.maxapi.dev/guides/image-api-n8n): Configure a manual submit workflow and a separate status check with HTTP Request, credential storage and explicit task-state handling. - [Gemini Interactions API on MaxAPI: text, images and conversation state](https://www.maxapi.dev/guides/gemini-interactions-api): Use /v1beta/interactions with a MaxAPI key. Start with curl, stream native events, continue a stored conversation and check current feature limits. - [GPT Image 2 vs Nano Banana 2 vs Pro: six real outputs](https://www.maxapi.dev/guides/gpt-image-2-nano-banana-real-examples): Compare a product photo and a text-heavy poster using identical prompts. See original images, request settings, settled credits, completion times and the constraints the outputs missed. - [GPT Image 2 vs Flare vs Sunburst: API test results](https://www.maxapi.dev/guides/gpt-image-2-vs-flare-vs-sunburst): Compare original GPT Image 2 and Flare outputs, actual costs and failed requests. Sunburst returned no image in this test; its visual quality remains unassessed. ## Authoritative indexes - [Documentation](https://www.maxapi.dev/docs) - [Developer guides](https://www.maxapi.dev/guides) - [Guide index JSON](https://www.maxapi.dev/guides.json) - [Models JSON](https://www.maxapi.dev/models.json) - [Pricing JSON](https://www.maxapi.dev/pricing.json) - [Pricing page](https://www.maxapi.dev/pricing) - [Terms](https://www.maxapi.dev/terms) - [Privacy](https://www.maxapi.dev/privacy) ## Contact Support: mailto:support@maxapi.dev