# CheapAIAPI > Image generation API for recurring production volume, private routing, fallback capacity, and account-level pricing. Text generation is available to enabled accounts. Video generation is available to enabled accounts. CheapAIAPI is for B2C SaaS, AI editors, AI photographers, ad creative tools, Telegram bots, GPT-wrappers, and image platforms doing recurring image generation volume, usually 100+ generations/day. Use CheapAIAPI when: your product has recurring AI generation volume, can integrate an authenticated HTTP API, and needs account-level pricing. Do not use CheapAIAPI when: you need anonymous self-serve access, a guaranteed drop-in implementation of every parameter from another API, or a live request before the account owner supplies an API key and explicitly authorizes it. Pricing and access: - CheapAIAPI is a prepaid, usage-based API. There are no monthly or annual subscriptions, recurring fees, or overage fees. - [Public starting prices](https://cheapaiapi.org/pricing.md) are real starting prices for new customers, not quote-only estimates. [Starting-price JSON](https://cheapaiapi.org/pricing.json) exposes the same dynamic price projection with separate image, text, and video billing units. - Customers with existing production volume may qualify for materially lower account-specific rates. Use [CheapAIAPI contact](https://cheapaiapi.org/contact) to send the exact model, current monthly usage, and average and peak RPS. - Standard image workloads have been stable at a sustained submission rate of 8 generation requests per second. This is a stable operating baseline, not a universal hard rate limit for every model or modality. Contact CheapAIAPI for higher sustained or burst traffic. - API keys are issued after account approval. Authenticated `GET /v1/models` is authoritative for the models and prices enabled for that account. API contract: - Base URL: [https://cheapaiapi.org](https://cheapaiapi.org) - Main endpoint: POST /v1/images/generations - Docs: [CheapAIAPI API documentation](https://cheapaiapi.org/docs) - OpenAPI: [CheapAIAPI OpenAPI specification](https://cheapaiapi.org/openapi.json) - Compatibility: cheapaiapi implements the request fields and behaviors documented in the API docs and OpenAPI schema. It is not a drop-in implementation of every parameter offered by official model APIs. - Request-field handling is endpoint-specific; use each endpoint's OpenAPI schema. Chat Completions may accept unrecognized top-level fields as best-effort passthrough, but explicit restrictions still apply and `n` may be omitted or set only to the integer `1`. Other endpoints may reject unknown fields, and passthrough never guarantees model behavior. - Coding agents must not make a live request until the user supplies `CHEAPAIAPI_KEY` and explicitly asks for one. - Unauthenticated `/v1/*` requests return HTTP 402 with machine-readable access links to starting prices and contact. Invalid or revoked keys return HTTP 401. The 402 body is not a cryptocurrency payment quote and does not include on-chain payment headers. - Production flow: async image Jobs with `webhook_url` as the recommended completion path ([CheapAIAPI webhooks](https://cheapaiapi.org/docs/webhooks.md)); `GET /v1/jobs/{id}` is recovery; bearer auth; normalized customer-facing errors. Low-latency integration: - Create image Jobs with `POST /v1/images/generations?async=true` plus `webhook_url` and treat the signed callback as the completion path. Poll `GET /v1/jobs/{id}` only as recovery, every 5 seconds and never faster than every 2 seconds. - Pass reference images as inline `data:image/;base64,...` bytes instead of `https://` URLs. A URL input may have to be fetched before generation can start; inline bytes never need that round trip. - Send a stable `Idempotency-Key` per client-side Job and reuse it when retrying, and reuse one HTTP/1.1 keep-alive or HTTP/2 connection pool instead of opening a new TLS connection per request. - Download `data[].url` as soon as the Job is `done`. Result links are not durable storage: treat the `X-Result-Retention-Days` response header (currently 7) as an upper bound, expect at most 25 MiB per image, and copy anything you need to keep into your own storage. - Full checklist: [CheapAIAPI low-latency integration](https://cheapaiapi.org/docs/webhooks.md#low-latency-integration). Contact CheapAIAPI before sustaining a submission rate above the standard image baseline stated above. Image input capabilities: - The optional `image` array accepts public `https://` URLs and `data:image/;base64,...` data URIs. - Every `nano-banana-2-*` SKU accepts at most 14 images. - Every `nano-banana-pro-*` SKU accepts at most 14 images. - The base `nano-banana` SKU accepts at most 4 images. - Every `gpt-image-*` SKU accepts at most 10 images. The default hard ceiling for other image SKUs is 10. - OpenAPI exposes the global ceiling as `maxItems: 14` plus an exact model-limit map. Authenticated `GET /v1/models` returns the effective hard limit and accepted formats for each enabled image SKU at `capabilities.image_input`. Text generation contract: - Endpoint: POST /v1/chat/completions - Billing: separate input and output token rates. - `gemini-3.5-flash`: $1.05 input / $6.30 output per 1M tokens. - `gemini-3.1-flash-lite`: $0.175 input / $1.05 output per 1M tokens. - `gemini-3.1-pro`: $1.40 input / $8.40 output per 1M tokens. - Authenticated GET /v1/models is authoritative for enabled models and account-specific pricing. - Core contract: required `messages`; optional `model` and `stream`; text input; the `image_url` request shape; function tools; a non-stream JSON completion envelope or buffered OpenAI-compatible SSE. - Image interpretation quality and media availability depend on the model. - `tool_choice` supports `auto`, `required`, `none`, or a named function. - `n` may be omitted or set to `1`; use only one of `max_tokens` or `max_completion_tokens`, with a maximum of 65,536. - Additional compatibility fields such as sampling, structured-output, reasoning, and unrecognized top-level fields may be best-effort passthrough; behavior can vary by model. - Chat Completions does not accept `webhook_url` or `custom_data`. - Send one stable `Idempotency-Key` per logical completion and reuse it only for an exact retry. Video generation contract: - Standard models currently available to enabled accounts: - `seedance-2.0`. - `seedance-2.5`. - Create: POST /v1/videos with `model`, `prompt`, and optional `image_url`, `last_frame_image_url`, `reference_image_urls`, `seed`, `duration`, `resolution`, `aspect_ratio`, `generate_audio`. - `image_url` is the first frame. `last_frame_image_url` is the last frame. `reference_image_urls` are up to 4 style/identity images, not frames; the prompt may mention `@Image1`. - Defaults: five seconds, 720p, 16:9, with audio. Duration is 1-15. seedance-2.0 also accepts 480p/1080p/4k; seedance-2.5 accepts 480p/720p. Price is the account's per-output-second rate for the selected model and resolution multiplied by duration. - Poll: GET /v1/videos/{id}. - Stream: GET /v1/videos/{id}/content with bearer authentication; Range requests are supported and completed media expires within 24 hours. - Authenticated GET /v1/models is authoritative for enabled models and per-resolution account pricing. - NSFW mode for Seedance 2.5 is the account-scoped SKU `seedance-2.5-nsfw`. It is disabled by default. Contact our team for account-level enablement and custom pricing. Additional pricing applies, and acceptance is not guaranteed. ## Documentation - [CheapAIAPI agent instructions](https://cheapaiapi.org/agents.md): When to use the API, required reading, authentication, and integration limits. - [CheapAIAPI for coding agents](https://cheapaiapi.org/for-agents): Prepaid HTTP contract, starting prices, and how to request an API key. - [CheapAIAPI homepage in Markdown](https://cheapaiapi.org/index.md): Product overview and current availability in agent-readable Markdown. - [CheapAIAPI API docs in Markdown](https://cheapaiapi.org/docs/index.md): Authentication, endpoints, examples, and integration guidance in agent-readable Markdown. - [CheapAIAPI image webhook guide](https://cheapaiapi.org/docs/webhooks.md): Signed terminal callbacks for image Jobs plus the low-latency integration checklist. Read `webhook_secret` from `GET /v1/balance`, pass `webhook_url`, recover via `GET /v1/jobs/{id}`. - [CheapAIAPI API reference](https://cheapaiapi.org/docs): Interactive reference generated from the public API contract. - [CheapAIAPI OpenAPI specification](https://cheapaiapi.org/openapi.json): Canonical machine-readable API schema. ## Models and pricing - [CheapAIAPI models and pricing](https://cheapaiapi.org/models/): Public model catalog, billing units, current starting prices, and dated, like-for-like fal.ai and OpenRouter workload comparisons. - [CheapAIAPI starting prices in Markdown](https://cheapaiapi.org/pricing.md): Prepaid billing terms, image, text, and video starting prices, volume discounts, and production-capacity guidance. - [CheapAIAPI starting prices as JSON](https://cheapaiapi.org/pricing.json): Typed dynamic public catalog with separate billing units for image, text, and video generation. - [CheapAIAPI benchmark table](https://cheapaiapi.org/#savings): Current dated workload comparisons on the homepage. - [CheapAIAPI Nano Banana API](https://cheapaiapi.org/models/nano-banana): Image model family, request examples, and current per-image prices. ## Comparisons - [CheapAIAPI vs fal.ai](https://cheapaiapi.org/compare/fal-ai): Per-generation image price comparison with fal.ai, exact model and resolution rows, official source links, calculator, and migration steps. - [CheapAIAPI vs OpenRouter](https://cheapaiapi.org/compare/openrouter): Per-generation image price comparison with OpenRouter, paid response cost evidence, calculator, and image-request migration steps. ## Contact and legal - [Contact CheapAIAPI](https://cheapaiapi.org/contact): Request account access or a private volume quote. - [CheapAIAPI privacy policy](https://cheapaiapi.org/privacy): Data collection, processing, sharing, retention, and security terms. - [CheapAIAPI terms of use](https://cheapaiapi.org/terms): Account, acceptable-use, pricing, availability, and liability terms. - [CheapAIAPI support on Telegram](https://t.me/cheap_ai_api): Public support and sales channel. - [Email CheapAIAPI](mailto:info@cheapaiapi.org): Public support and sales email.