Skip to main content
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.
Choose the site that holds your account and credits. The examples below use the international endpoint. For a toapis.cn account, replace https://api.toapis.com/mcp with https://api.toapis.cn/mcp and use the toapis.cn console. Accounts and credits are separate.

Before connecting

Use a client that supports remote MCP over Streamable HTTP. Optional ToAPIs skills help with model selection and prompts; their npx skills add commands require Node.js. You can skip skills installation and still use MCP. For browser authorization, sign in to the matching ToAPIs site, check the client name, choose an API key or create a dedicated key with a spending limit, then click Allow. For header authentication, create a dedicated key under API Tokens and replace <API_KEY> locally. Keep real keys out of chats and version control.

Pick your client and connect in a few steps

Claude Code

Run the commands below in a terminal. The first installs optional skills; the second adds the MCP server. Then authorize in /mcp and check with claude mcp list.

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.

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.

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.

Codex

Run the commands below in a terminal. The first installs optional skills. Adding the server may open browser authorization automatically; finish it before continuing. If codex mcp list shows Not logged in, run codex mcp login toapis, finish authorization, and check again. Start a new chat after setup.

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.The Codex CLI and desktop app share one configuration, so one setup covers both.Codex MCP

Add ToAPIs

Merge the following into ~/.cursor/mcp.json, then connect in MCP settings.
Install the optional skills:

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.

Add ToAPIs

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

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.

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.
Merge the toapis entry into your existing configuration; keep your other servers.

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.

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

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.

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).
Add it in the Doubao desktop app (Windows or macOS). For enterprise accounts, whether custom plugins are allowed depends on the administrator’s settings.

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

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

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.

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:

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.

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.

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

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).
They help the agent pick models and write prompts (needs Node.js; MCP works without them):

Add a custom connector

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

Connect and authorize

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

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.

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.

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.

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.

Generate videos

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

Use local files

Give the path of a local image. The agent uploads it and uses it as a reference.
The agent reads the model documentation before generating, uploads local references with create_upload, and follows progress with get_generation. While a job is running, let it finish rather than submit again. If the submission response is lost, reuse the same client_request_id when retrying; a new ID can create another billable job. If the state is unknown, check the console task list before resubmitting. Save the returned result URLs; clients may also download results locally.

Available tools

FAQ

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.