CheaperGen

Getting started

MCP & AI agents

Connect Claude, ChatGPT, Codex, Cursor, VS Code or any MCP client to CheaperGen and let agents browse models, quote prices, generate video and images, and fetch the results. Paste one URL, sign in and approve: there's no API key to copy. Billing, rate limits and automatic refunds work the same as the REST API.

Quick connect#

Add to Claude

Opens claude.ai with the connector filled in. Choose Continue, then Add, then Connect, and sign in.
Team or Enterprise? Only an owner can add it (Add for my organization), then members choose Connect. Or switch to a personal account in Claude.

Or paste this into your agent, and it sets itself up:

Set up CheaperGen for me by following https://cheapergen.com/agents/setup.md
MCP server URL: cheapergen.com/api/mcpFull instructions

Use with AI agents#

Use the MCP server when you want an assistant to make media for you, for example in Claude Code or Cursor chat. Use the Agent Skill when an agent is writing code against the API. You can use both: the skill also tells agents to prefer the MCP tools when they are connected.

Server URL and sign-in#

https://cheapergen.com/api/mcp
  • Transport: Streamable HTTP, stateless. It works with clients on both the 2025 and 2026-07-28 MCP protocol versions.
  • Sign-in: OAuth 2.1, as in the MCP authorization spec. The first time a client connects, it opens a CheaperGen page in your browser. Sign in and approve the app. Approved apps are listed under Dashboard → API keys → Connected apps, where you can disconnect them at any time.
  • Headless and CI: send an API key instead, as Authorization: Bearer cg_live_…. See Use an API key.

Connected apps spend real credits

generate charges your prepaid balance. Approve only apps you connected yourself and confirm prices before large jobs. Pass max_cost_usd to generate to enforce your approved spending limit.

Connect a client#

Claude (claude.ai and Claude Desktop)#

One click: Add to Claude opens claude.ai with a custom connector named CheaperGen and the URL above filled in. Choose Continue and Add (keep the defaults), then Connect, sign in and approve. Or add it by hand:

  1. Open Customize → Connectors and add a custom connector.
  2. Name it CheaperGen, paste the URL above, then choose Continue and Add.
  3. Choose Connect, sign in to CheaperGen and approve. Then enable the connector in a chat from the tools menu.

On Team and Enterprise, members can't add custom connectors: an owner adds it for the whole organization (Add for my organization), then members choose Connect. A member with a personal Claude account can also switch to it in the account menu and use the link above. Connectors you add on claude.ai also show up in Claude Desktop.

Claude Code#

claude mcp add --transport http cheapergen https://cheapergen.com/api/mcp

Then run /mcp, select cheapergen and choose Authenticate (or run claude mcp login cheapergen in a terminal). Your browser opens to sign in and approve. Add --scope user to use it in every project. Or install the plugin, which adds the server and the Agent Skill in one step:

Claude Code plugin
/plugin marketplace add CheaperGen/skills
/plugin install cheapergen@cheapergen

ChatGPT#

Desktop app (macOS and Windows). In Work or Codex mode, the ChatGPT desktop app uses the same MCP settings as the Codex CLI, so codex mcp add connects it too. Or add it in the app:

  1. Open Settings → MCP servers → Add server.
  2. Name it cheapergen, choose Streamable HTTP, paste the URL above and save.
  3. Select Restart, then Authenticate, and sign in to CheaperGen to approve. Type /mcp in the composer to check it.

chatgpt.com. Custom MCP servers become plugins, available on ChatGPT Business, Enterprise and Edu workspaces (on Business, admins and owners add them). Add it from the web, not the mobile app:

  1. Open Plugins → Add → Add custom MCP server.
  2. Name it CheaperGen, paste the URL above and choose OAuth for authentication.
  3. Tick I understand and want to continue, choose Create as a plugin, then install it, sign in and approve.
  4. In a chat, type @ and pick the plugin. ChatGPT asks before it runs generate or add_credits.

Plan limits on chatgpt.com

Pro accounts can connect custom MCP servers on chatgpt.com with read-only tools, so ChatGPT can browse models and quote but not generate. Other individual plans can't add them on the web. The desktop app works on any plan with Work or Codex. Deep research and company knowledge only use servers with search and fetch tools, which CheaperGen doesn't have; normal chats work.

Codex#

codex mcp add cheapergen --url https://cheapergen.com/api/mcp

This adds the server to ~/.codex/config.toml and opens your browser to sign in right away. Skipped it? Run codex mcp login cheapergen. The Codex CLI, the Codex IDE extension (gear menu → MCP servers) and the ChatGPT desktop app all read this file, so one setup covers them. Codex cloud tasks don't read it. To edit the file by hand:

~/.codex/config.toml
[mcp_servers.cheapergen]
url = "https://cheapergen.com/api/mcp"

Cursor#

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project). Then open Customize → MCPs and connect cheapergen. In the Cursor CLI, run cursor-agent mcp enable cheapergen, then cursor-agent mcp login cheapergen.

~/.cursor/mcp.json
{
  "mcpServers": {
    "cheapergen": {
      "url": "https://cheapergen.com/api/mcp"
    }
  }
}

Or in one click: Add to Cursor opens Cursor with the server filled in; confirm the install.

VS Code (GitHub Copilot)#

Add this to .vscode/mcp.json, or run MCP: Add Server… and pick HTTP. VS Code asks you to sign in the first time the server starts. Then use the tools in Copilot Chat's agent mode.

.vscode/mcp.json
{
  "servers": {
    "cheapergen": {
      "type": "http",
      "url": "https://cheapergen.com/api/mcp"
    }
  }
}

Or in one click: Install in VS Code opens the server's page in VS Code; choose Install. On Copilot Business or Enterprise, an admin first turns on the MCP servers in Copilot policy.

Gemini CLI#

gemini mcp add --transport http cheapergen https://cheapergen.com/api/mcp

This writes .gemini/settings.json in the project; add -s user for every project. Gemini CLI loads project servers only in trusted folders, so trust the folder when it asks. Then run /mcp auth cheapergen and sign in in your browser.

Devin Desktop (formerly Windsurf)#

devin mcp add -s user cheapergen https://cheapergen.com/api/mcp

Then run devin mcp login cheapergen and sign in in your browser. The command writes ~/.config/devin/mcp_config.json, which the Cascade agent reads too. To edit it yourself, merge in this config (%APPDATA%\devin\mcp_config.json on Windows):

~/.config/devin/mcp_config.json
{
  "mcpServers": {
    "cheapergen": {
      "url": "https://cheapergen.com/api/mcp"
    }
  }
}

Other clients#

Clients with remote servers and OAuth only need the URL (some use "serverUrl" instead of "url"). Clients that only run local (stdio) servers can use the mcp-remote bridge, which needs Node.js and handles the sign-in.

{
  "mcpServers": {
    "cheapergen": {
      "type": "http",
      "url": "https://cheapergen.com/api/mcp"
    }
  }
}

Use an API key (headless, CI)#

Where nobody can sign in through a browser, send an API key from Dashboard → API keys. Create a separate key for each agent so you can revoke it on its own. Keep it in an environment variable, as below: the single quotes store the variable's name rather than the key, and the client reads the value when it connects. Claude Code also expands ${CHEAPERGEN_API_KEY} in a committed .mcp.json from each developer's environment.

claude mcp add --transport http cheapergen https://cheapergen.com/api/mcp \
  --header 'Authorization: Bearer ${CHEAPERGEN_API_KEY}'

Tools#

Every tool wraps the same code as the REST API (API reference), so prices, validation and errors match. Results are compact JSON. A finished image also comes back as a small inline preview, so the chat shows it and the agent can check it, and every output file comes back as a resource link to show or download.

Tools
list_modelscategory?, vendor?
Models with endpoint ids, starting price, list price and discount (list_price_source: official, or reference named by list_price_label, e.g. fal API). Filter by video / image or by vendor.
get_modelmodel
A model id or endpoint id. Returns each endpoint's JSON input schema (enums, defaults, reference-media limits, @Image1 mentions), the pricing table per tier and specs.
quoteendpoint, input?
The price of an input without running it: amount_usd, official_usd (with list_price_source / list_price_label), discount_pct — your own price, with custom_price and volume_level when a Pro or Max plan or a contract sets it. Free. For reference videos, pass reference_video_durations. For a video edit, pass video_duration (the clip's seconds). It also says whether your balance covers the job and, when it doesn't, which top-up to offer. For Seedance image-to-video, include image_url: the video takes the first frame's aspect ratio and is priced at that size.
generateendpoint, input, wait_seconds?, max_cost_usd?, allow_fallback_price?
Paid. Submits a generation, holds the quoted price and returns its id and cost. Waits up to wait_seconds (max 50). Requests above max_cost_usd are refused without charging. Set allow_fallback_price: false to refuse price adjustments; failed jobs are refunded. A finished image also comes back as a small inline preview.
get_generationid, wait_seconds?
Status (queued, running, succeeded, failed, canceled), output URLs, error and final cost. Can wait up to 50 s for the result. A finished image also comes back as a small inline preview.
upload_filefilename, size_bytes? or data_base64?
Free. Turns a photo, video or audio file on your computer into an https URL to use as input. Agents that can run commands get a short-lived upload URL for the file's exact size and a curl command to send it; others can send a small file (up to about 3 MB) as base64. Same types and limits as POST /uploads.
compare_pricesmodel?, tier?, category?
Free. A model's live price per tier against the official (or reference) price and the other API platforms on its comparison page, each with the date its price was checked and its source. Only platforms priced above CheaperGen are listed. Without a model, every model's lowest price against the official one.
get_accountnone
Prepaid balance, image credit (image models only, never video), the amount held for generations in progress, how many are running, and auto top-up settings. Also the account's API limits (limits).
add_creditsamount_usd?
Creates a Stripe checkout link (card, wallets, Alipay, WeChat Pay) for the user to open and pay. Nothing is charged until they pay in the browser; credits arrive within seconds. Agents call it when generate returns insufficient_balance.

Images usually finish within one generate call. Videos take one to several minutes, so the agent submits the job, then calls get_generation with wait_seconds until it's done. A finished generate returns:

generate → result
{
  "id": "gen_8c2QmX1nq0k4Lw7Z",
  "status": "succeeded",
  "endpoint": "bytedance/seedream-5.0-lite/text-to-image",
  "outputs": [
    "https://cdn.cheapergen.com/outputs/gen_8c2QmX1nq0k4Lw7Z.png"
  ],
  "cost": {
    "amount_usd": 0.0303,
    "official_usd": 0.035,
    "list_price_source": "official",
    "list_price_label": "Official",
    "saved_usd": 0.0047,
    "final": true
  },
  "created_at": "2026-10-16T09:12:43.545Z",
  "completed_at": "2026-10-16T09:12:49.058Z",
  "outputs_expire_at": "2026-10-17T09:12:49.058Z",
  "next": "Done. Show or download the output URLs before outputs_expire_at."
}

Developer connector (read-only)#

https://cheapergen.com/api/mcp/dev

/api/mcp/dev is a second MCP server for developers building on the API, with only list_models, get_model, quote, compare_prices, get_account. It never generates media, spends credits or creates a payment, so you can keep it connected while you write code that generates through the REST API. It needs no sign-in; connect it with an API key (Authorization: Bearer cg_live_…) to see your own prices, balance and limits (get_account).

OAuth clients get a read-only token for it by sending the RFC 8707 resource indicator resource=https://cheapergen.com/api/mcp/dev in the authorization and token requests. Without it, the token is issued for the full server /api/mcp; it still works here, but the sign-in page then asks to approve generating and spending.

In Claude Code, add it on its own, or install the developer plugin, which adds it together with the cheapergen-api skill (API keys, endpoints, quotes, polling, webhooks and errors):

claude mcp add --transport http cheapergen-dev https://cheapergen.com/api/mcp/dev

Example prompts#

  • “Which CheaperGen video models accept reference videos, and what would 5 seconds at 720p cost on each?”
  • “Generate a 5-second 720p video with Seedance 2.0 Fast: a paper boat drifting down a rainy neon street, slow dolly-in. Tell me the price first.”
  • “Make four product shots of this mug with Seedream 5.0 Lite, each under $0.05: https://example.com/mug.png”
  • “Animate this photo into a 6-second vertical clip with Wan 3.0: https://example.com/portrait.jpg”
  • “Animate the photo on my desktop (~/Desktop/beach.jpg) into a 5-second clip with Kling 3.0. Tell me the price first.”
  • “Reference-to-video with Seedance 2.0: @Image1 is the character, @Image2 the street; move the camera like @Video1. Here are the URLs: …”
  • “What's my CheaperGen balance, and how many 10-second 1080p Seedance 2.0 clips can I afford?”

Agent Skill#

The CheaperGen skill is a single SKILL.md in the Agent Skills format. It teaches an agent the whole workflow: choose a model, read the schema, quote, submit, poll or verify webhooks, reference mentions, uploads, pricing and errors. Agents load it only when a task needs it. For REST calls it reads your key from CHEAPERGEN_API_KEY, and it prefers the MCP tools when they're connected. Its source is github.com/CheaperGen/skills.

/plugin marketplace add CheaperGen/skills
/plugin install cheapergen@cheapergen

The skills CLI installs into Claude Code, Cursor, Codex, Gemini CLI and other agents (-a picks one, -g installs for all projects). In the Claude apps, zip the cheapergen folder and upload it as a custom skill.

Limits and billing#

  • The same rate limits as REST apply per connected app or key (every MCP request counts), as does the per-account limit on generations in progress.
  • The price is held when generate submits and refunded in full if the generation fails or is canceled. See Billing & credits.
  • Generations made through MCP show up in your dashboard and in GET /api/v1/generations with source: "mcp".
  • Sign-in tokens last an hour and the client refreshes them on its own. Disconnecting the app in the dashboard ends its access immediately.
  • Output URLs are public and expire with your API retention setting (one day by default). Download what you want to keep.

Troubleshooting#

  • The client says the server needs authentication: finish the sign-in it started (in Claude Code: /mcp → cheapergen → Authenticate). If you disconnected the app or haven't used it for 90 days, sign in again.
  • The sign-in page says the app isn't registered, or the redirect doesn't match: remove the server from the client and add it again, so the client registers itself again.
  • A tool call times out: lower wait_seconds. The generation keeps running either way; fetch it later with get_generation.
  • invalid_request: the input doesn't match the endpoint's schema. The error names the field in param; ask the agent to call get_model first.

Something unclear or missing? Email support@cheapergen.com — we read everything.