Skip to content
2api2api Docs
Open console

Introduction

Quickstart

From registration to your first successful call. Do the five steps below in order.

A 3-minute walkthrough from sign-up and redemption to setting up your tools, in Chinese. It was recorded in July 2026, so the interface and group names may differ slightly from today. Where they differ, follow the written steps below.

Player not loading? Watch it on Bilibili ↗
  1. Open 2api.dev/register and enter your email and password. If it asks you to verify your email, click the verification link in your inbox first, then come back and sign in.

  2. After you sign in, click Redeem (兑换) in the left sidebar, or open 2api.dev/redeem directly. Paste your card code and click Redeem.

    Card codes are case-sensitive. Make sure you don’t copy extra spaces or line breaks. After a successful redemption, your balance or plan updates right away. ChatGPT top-up codes are not redeemed here. Submit them at cz.2api.dev.

  3. Click API Keys (API 密钥) in the left sidebar, then click Create Key (创建密钥). Choose the right group. Otherwise the key can’t use the quota you redeemed:

    Models you want to use Group
    GPT (Codex, etc.) GPT 纯血Pro 余额分组 (0.2x)
    Claude (Claude Code, etc.) CC-Max (1.2x)

    If you redeemed a daily, weekly or monthly card, choose the group that belongs to the plan. You can see its name under My Subscriptions (我的订阅).

    After the key is created, copy the key that starts with sk-. Anyone who has the key can use your quota. Don’t post it in chat groups or forums, and don’t leave it visible in screenshots.

  4. We recommend magpie. It sets up your tools in one click, so you don’t edit config files by hand. Other options:

  5. In a terminal, request the model list with your key. If it returns model names, the key and the group are fine, and the names it returns are the model names you can use.

    Terminal window
    curl https://2api.dev/v1/models -H "Authorization: Bearer sk-your-key"

    A 401 usually means the key was copied wrong or has been deleted. An empty list usually means the wrong group was chosen. For more cases, see the FAQ.