Skip to main content
A2Agent gives you a single API key that unlocks every supported Chinese LLM through an OpenAI-compatible endpoint. This guide walks you from account creation to a live chat completion request in four steps — no provider-specific setup required.
1

Sign Up for an Account

Go to https://a2agent.me/register and create a free account. A2Agent credits your new account with free trial credits automatically — no payment method needed to get started. You can use those credits to explore models and test latency before adding funds.
2

Create an API Key

After signing in at https://a2agent.me/login, open the API Keys page from the console navigation. Click Create Key, give your key an optional label, and confirm. Copy the key value immediately — it is shown in full only once. Your base URL for all requests is:
https://api.a2agent.me
You will pass this base URL to any client that requires a custom endpoint.
3

Make Your First Request

With your key in hand, run the following command in your terminal. Replace YOUR_API_KEY with the key you just copied.
curl https://api.a2agent.me/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
A successful response returns a JSON object with a choices array containing the model’s reply. You can swap "deepseek-chat" for any model listed on the Models page without changing anything else.If you prefer a Python or Node.js client, the OpenAI SDK works without any modifications beyond setting the base URL and key:
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.a2agent.me/v1",
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello"}],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://api.a2agent.me/v1",
});

const response = await client.chat.completions.create({
  model: "deepseek-chat",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(response.choices[0].message.content);
4

Check Your Usage

Log in at https://a2agent.me/login and navigate to the Usage section of the console to see a breakdown of requests, token counts, and spend by model. Your remaining balance is displayed at the top of the page.
A2Agent is fully compatible with the OpenAI Chat Completions protocol. Any SDK or tool that lets you configure a custom base URL — including the official openai Python and Node.js libraries — works with A2Agent out of the box. Set base_url (or OPENAI_BASE_URL) to https://api.a2agent.me/v1 and point api_key at your A2Agent key.

Next Steps

AI Coding Clients

Configure Claude Code, Cursor, Continue, and other AI coding tools to use A2Agent as their backend.

All Models

Browse the full model list — GLM, Kimi, DeepSeek, Qwen, and MiniMax — with pricing and context-window details.