Model Context Protocol

Generate images and videos with ToAPIs in your AI agent

Connect ToAPIs to the agents you already use through MCP. Sign in with your browser instead of copying an API key. The agent picks the model, reads its parameters, submits the job and brings back the result.

  • 200+ models
  • Browser sign-in
  • Dedicated keys with spending limits
  • Same prices as the API

Connect

Pick your client and connect in a few steps

MCP endpoint

https://api.toapis.com/mcp

  1. 1

    Send this prompt to Claude Code

    Claude Code asks before it runs each command. Allow them.

    Set up ToAPIs in Claude Code for image and video generation.
    1. Install the ToAPIs skills: `npx skills add toapis/skills -g --agent claude-code -y` If npx is not found, first install Node.js LTS (it includes npx) in the standard way for this system. If npx is still not found after that, run it from the Node.js install directory by its full path. If Node.js cannot be installed (for example an administrator password is needed or the install is blocked), skip this step and continue, then remind me at the end to install the skills after installing Node.js.
    2. Add the ToAPIs MCP server: `claude mcp add --transport http --scope user toapis https://api.toapis.com/mcp --header "X-Locale: en"`
    3. Tell me to type /mcp, select toapis and authorize it in the browser (restart Claude Code first if toapis is not listed). When I tell you I am done, run `claude mcp list` and confirm that toapis shows Connected; if it does not, tell me what it shows and help me fix it.
  2. 2

    Authorize in /mcp

    Type /mcp in Claude Code, select toapis and sign in in the browser. If toapis is not listed, restart Claude Code first.

  3. 3

    Check the connection

    Start a new chat and send the question below. If it shows your balance, the connection works (checking is free). If it asks you to sign in, fails authentication or cannot find the ToAPIs tools, go back and check the steps above.

    How many ToAPIs credits do I have left, and how much did I spend today?
  4. 4

    Start creating

    Describe the image or video you want, for example:

    Use ToAPIs to generate a 16:9 image of a lighthouse at dawn

Capabilities

What you can do once connected

Describe what you want in plain words. The agent picks a model, prepares the parameters from its docs, submits the job and follows it up.

Generate images

Text to image, edits with reference images, aspect ratio and count.

Use ToAPIs to generate a 16:9 image of a lighthouse at dawn

Tool: generate_image

Generate videos

Text to video and image to video, with Seedance recommended by default.

Turn this product photo into a 5-second vertical promo video

Tool: generate_video

Use local files

Give the path of a local image. The agent uploads it and uses it as a reference.

Use ./product.png as a reference and put the product on a white background

Tool: create_upload

Check your account

Balance, recent tasks, why a task failed, and what you spent today.

How many ToAPIs credits do I have left, and how much did I spend today?

Tool: get_balance / get_usage

Why MCP

No API key to copy

Sign in with your browser. The connection uses the key you choose, and the key never appears in the agent's configuration or chat.

Spending under control

Create a dedicated key with a spending limit for the connection, and disconnect any time under Connected apps in the console.

Same prices as the API

Usage is billed at the normal model prices from your credits, and failed tasks are refunded under the usual rules.

Every model, one connection

GPT Image, Nano Banana, Seedance, Kling and 200+ other models, with new models available as soon as they launch.

FAQ

Curated high-frequency questions. Click any question to expand the answer. Use the button below to rotate questions.

You do not copy one. When you authorize, you pick an existing key on the ToAPIs page or create a dedicated one, and the agent uses it through an access token. Clients that only support header authentication can connect with an API key instead.

The same as calling the API: model prices are deducted from the chosen key and your account credits. Listing models, checking the balance and looking up tasks are free. Only image and video generation is charged.

Installing the skills and adding the MCP server writes to the Codex configuration on your computer, and the default permission mode stops the agent from changing files outside the workspace. You only need it for the setup and can switch back afterwards, or run the commands in a terminal yourself.

Disconnect it under Connected apps in the console. This revokes the authorization and disables a dedicated key created for the connection, unless another connection still uses it. Removing toapis in the client, for example with codex mcp remove toapis, only deletes the local configuration.

The two sites have separate accounts and credits. Accounts on toapis.com use api.toapis.com/mcp, and accounts on toapis.cn use api.toapis.cn/mcp. Signing in on the other site shows a site mismatch.

Most desktop and command-line clients that support remote MCP with OAuth can connect as described under Other clients. If a client's sign-in fails, connect it with an API key instead. We will keep adding steps for more clients.

Connect ToAPIs to your agent

Sign up to get started, then generate images and videos right in the chat.