ToAPIs
    homeToAPIs
    ModelsModel PricingAPI DocsMCP
    LoginStart for Free
    Model Context Protocol

    Generate images and videos with ToAPIs in your AI agent

    Connect ToAPIs to the agents you already use through MCP. Clients that support browser sign-in need no API key copied. 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
    Start connectingBrowse models

    Connect

    Pick your client and connect in a few steps

    MCP endpoint

    https://api.toapis.cn/mcp

    1. 1

      Create a dedicated key

      This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace <API_KEY> in the configuration below with this key.

      Open API Tokens
    2. 2

      Create a custom plugin

      Open the Doubao desktop app, click "插件·技能·伙伴" (Plugins, Skills, Partners) in the left sidebar, click "+ 添加" (Add) at the top right of the "插件" (Plugins) page and choose "新建自定义插件" (New custom plugin). Enter ToAPIs as the server name, choose HTTP as the transport type and enter the URL below as the server URL.

      https://api.toapis.cn/mcp
    3. 3

      Add the auth header and save

      Under "自定义 Headers" (Custom headers), click "+ 添加" (Add). Enter Authorization as the header name and the line below as the value (replace <API_KEY> with your key), then click "保存" (Save).

      Bearer <API_KEY>

      Add it in the Doubao desktop app (Windows or macOS). For enterprise accounts, whether custom plugins are allowed depends on the administrator's settings.

    4. 4

      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?
    5. 5

      Start creating

      Describe the image or video you want, for example:

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

      Create a dedicated key

      This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace <API_KEY> in the configuration below with this key.

      Open API Tokens
    2. 2

      Paste the JSON configuration

      In QwenWork, open "扩展" (Extensions) → "连接器" (Connectors) in the left sidebar, click "+ 添加" (Add) → "粘贴 JSON 配置" (Paste JSON) at the top right, paste the configuration below (replace <API_KEY> with your key) and click "导入" (Import).

      {
        "mcpServers": {
          "toapis": {
            "type": "streamable-http",
            "url": "https://api.toapis.cn/mcp",
            "headers": {
              "Authorization": "Bearer <API_KEY>",
              "X-Locale": "en"
            }
          }
        }
      }
    3. 3

      Turn on the connector

      Connectors are off by default. Turn on toapis in the connector list, then start a new task. It does not work in existing conversations.

    4. 4

      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?
    5. 5

      Start creating

      Describe the image or video you want, for example:

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

      Run in a terminal

      The first command installs the ToAPIs skills (needs Node.js; MCP works without them). The second adds the ToAPIs MCP server:

      npx skills add toapis/skills -g --agent qwen-code -y
      qwen mcp add --scope user --transport http toapis https://api.toapis.cn/mcp --header "X-Locale: en"
    2. 2

      Authorize in the browser

      Run qwen to start Qwen Code. When it connects to ToAPIs, it opens the authorization page in your browser: sign in, choose a key and click Allow. Type /mcp in Qwen Code to check the connection and sign-in status of toapis.

    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
    Browser sign-in not working? Use an API key

    Create a key under "API Tokens" in the console, replace <API_KEY> in the command below with it and run the command.

    qwen mcp add --scope user --transport http toapis https://api.toapis.cn/mcp --header "Authorization: Bearer <API_KEY>" --header "X-Locale: en"
    1. 1

      Create a dedicated key

      This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace <API_KEY> in the configuration below with this key.

      Open API Tokens
    2. 2

      Add the MCP server manually

      In Trae, open "设置" (Settings) > "MCP". In the "MCP Servers 管理" (MCP Servers) section, click "添加" (Add) > "手动添加" (Add manually) at the top right, paste the configuration below (replace <API_KEY> with your key) and click "确认" (Confirm).

      {
        "mcpServers": {
          "toapis": {
            "url": "https://api.toapis.cn/mcp",
            "headers": {
              "Authorization": "Bearer <API_KEY>",
              "X-Locale": "en"
            }
          }
        }
      }
    3. 3

      Install the skills (recommended)

      They help the agent pick models and write prompts (needs Node.js; MCP works without them):

      npx skills add toapis/skills -g --agent trae-cn -y
    4. 4

      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?
    5. 5

      Start creating

      Describe the image or video you want, for example:

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

      Add a custom connector

      In WorkBuddy, open Connectors from the sidebar, click Custom connector in the top right, paste the configuration below and save.

      {
        "mcpServers": {
          "toapis": {
            "type": "http",
            "url": "https://api.toapis.cn/mcp"
          }
        }
      }
    2. 2

      Connect and authorize

      Click Trust and Connect, then sign in on the ToAPIs page that opens, choose an API key and click Allow.

    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
    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.cn/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
    1. 1

      Add to Claude

      Opens Claude's custom connector form with the name and URL filled in.

      Add to Claude
    2. 2

      Connect and authorize

      Click Add, then Connect. Sign in on the ToAPIs page, choose an API key and click Allow.

      Claude reaches ToAPIs from Anthropic's servers, so do not pick a key with an IP allowlist. The Free plan allows one custom connector.

    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
    Add it manually

    Open Settings, then Connectors, and add a custom connector. Name it ToAPIs, use the URL below, and leave the OAuth client ID and secret empty.

    https://api.toapis.cn/mcp

    Switch to Full access

    By default Codex does not let the agent change settings outside the workspace. Switch this chat's permission mode to Full access, and switch it back after the setup.

    The Codex CLI and desktop app share one configuration, so one setup covers both.

    1. 1

      Send this prompt to Codex

      Set up ToAPIs in Codex for image and video generation.
      1. Install the ToAPIs skills: `npx skills add toapis/skills -g --agent codex -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: `codex mcp add toapis --url https://api.toapis.cn/mcp`. Newer Codex versions open the browser sign-in right after adding and wait until it finishes: tell me to sign in and click Allow in the browser, then wait for the command to finish.
      3. Check the sign-in: run `codex mcp list`; if the Auth column for toapis shows OAuth, it worked. If it shows Not logged in, run `codex mcp login toapis`, again tell me to finish in the browser, and check again after the command finishes. If a command times out before I finish, wait until I tell you I am done, then run `codex mcp list` again.
      If a command is blocked because it writes outside the workspace, stop and tell me.
      Finally tell me the result: if it worked, remind me to start a new chat to use it; if not, tell me which step failed.
    2. 2

      Authorize in the browser

      Codex opens the ToAPIs authorization page. Sign in, check the client name, choose an API key or create a dedicated one with a spending limit, and click Allow. In the desktop app you can also click Authenticate next to toapis under Settings, MCP servers.

    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
    Prefer not to change permissions? Run these commands in a terminal
    npx skills add toapis/skills -g --agent codex -y
    codex mcp add toapis --url https://api.toapis.cn/mcp
    codex mcp list
    # If the Auth column for toapis shows "Not logged in", run: codex mcp login toapis
    1. 1

      Add ToAPIs

      Click the button and confirm in Cursor, or paste the configuration below into ~/.cursor/mcp.json.

      Add to Cursor
    2. 2

      Sign in

      In Cursor's MCP settings, click Connect next to toapis, sign in to ToAPIs in the browser, choose an API key and click Allow.

    3. 3

      Install the skills (recommended)

      They help the agent choose models and write prompts. This needs Node.js; without it, MCP still works:

      npx skills add toapis/skills -g --agent cursor -y
    4. 4

      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?
    5. 5

      Start creating

      Describe the image or video you want, for example:

      Use ToAPIs to generate a 16:9 image of a lighthouse at dawn
    Configure mcp.json manually
    {
      "mcpServers": {
        "toapis": {
          "url": "https://api.toapis.cn/mcp",
          "headers": {
            "X-Locale": "en"
          }
        }
      }
    }
    1. 1

      Add ToAPIs

      Devin Desktop and Devin CLI share one configuration. Run these commands in a terminal, or ask Devin to run them:

      devin mcp add -s user toapis https://api.toapis.cn/mcp
      devin mcp login toapis
    2. 2

      Authorize in the browser

      devin mcp login toapis opens the browser: sign in to ToAPIs, choose an API key and click Allow. If you skip it, Devin asks you to sign in the first time it uses toapis.

    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
    1. 1

      Add to the MCP configuration

      The Antigravity app, IDE and CLI share ~/.gemini/config/mcp_config.json. Merge the configuration below and save it, then type /mcp in the CLI or reload the servers in settings.

      {
        "mcpServers": {
          "toapis": {
            "serverUrl": "https://api.toapis.cn/mcp",
            "headers": {
              "X-Locale": "en"
            }
          }
        }
      }
    2. 2

      Authorize and paste the code

      Open Antigravity settings with Cmd + , (Ctrl + , on Windows), go to Customizations and click Authenticate next to toapis. After you sign in to ToAPIs and click Allow, the page shows an authorization code. Paste it into settings and click Submit.

    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
    1. 1

      Add a remote MCP server

      Add a remote MCP server (Streamable HTTP) with the URL below and choose OAuth sign-in. Leave the client ID and secret empty.

      https://api.toapis.cn/mcp
    2. 2

      No browser sign-in?

      Some clients only support header authentication or cannot complete the browser sign-in. Create a dedicated API key in the console and connect with an Authorization: Bearer header.

      API key setup guide
    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

    Browser sign-in

    Clients such as Qwen Code and WorkBuddy sign in through 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.

    Start connectingSign up free
    ToAPIs
    homeToAPIs

    Enterprise AI API gateway: text, image, video, and audio models behind one interface.

    运营主体:
    鯨樞智能科技有限公司
    JINGSHU INTELLIGENT LIMITED
    注册地址:
    ROOM 5042, 5/F, YAU LEE CENTRE, NO.45, HOI YUEN ROAD, KWUN TONG, KOWLOON, HONG KONG
    联系方式:
    support@toapis.com

    Models

    • Sora 2 API
    • Veo 3.1 API
    • GPT Image 2 API
    • All models

    Alternatives

    • Fal.ai alternative
    • Wavespeed AI alternative
    • PiAPI alternative
    • CometAPI alternative
    • Replicate alternative
    • AIMLAPI alternative

    Resources

    • Docs
    • MCP
    • Service status
    • Pricing
    • Privacy
    • Terms
    • Acceptable Use
    • Data Deletion
    • Data Retention
    • Subprocessors & Regions
    • Billing & Refunds
    • Cookie Policy
    • Sitemap
    • About

    © 2026 ToAPIs. All rights reserved.