MaxAPI documentation
MaxAPI exposes hosted image and video generation through OpenAI-compatible endpoints. Authentication is a bearer token in the Authorization header. 1 credit = 1 USD; failed requests are not charged. Each public model exposes one or more route_mode tiers that change pricing per request.
Endpoint families
- OpenAI-compatible: POST /v1/images/generations, POST /v1/images/edits, POST /v1/videos/generations, GET /v1/images/generations/{task_id}, GET /v1/videos/generations/{task_id}.
- Gemini-native (image only): POST /v1beta/models/{model}:generateContent, GET /v1beta/operations/{task_id}.
- OpenAI text/embeddings: /v1/chat/completions, /v1/responses, /v1/embeddings (relayed; no public model seeds by default).
Authentication
Send Authorization: Bearer $MAXAPI_KEY on every request. Gemini-native endpoints additionally accept x-goog-api-key and ?key=.
Common request knobs
route_mode: official, official-cheap, or mix. Pass in the JSON body or as X-MaxAPI-Route-Mode on Gemini-native.asset_delivery: default or mirror. Mirror rewrites returned URLs to the alias CDN domain.async: true queues the request and returns a task id; poll the returned poll_url for completion.