Quickstart

Get your first AI response through Token360 in under 2 minutes.

Prerequisites

Step 1: Get Your API Key

  1. Log in to the Token360 Console.
  2. Navigate to API Keys in the sidebar.
  3. Click Create API Key, give it a name, and copy the key.

Your key starts with sk- and looks like: sk-abc123def456...

Important: Store your API key securely. It will only be shown once.

Step 2: Top Up Your Account

Before making API calls, you need to add funds to your account.

  1. Click your profile avatar in the top-right corner.
  2. Select Wallet from the dropdown menu.
  3. On the Wallet page, click the Add Funds button under the "Add Funds" section.
  4. Follow the payment instructions to complete your top-up using Stripe or credit card.

Tip: Your available balance will be shown on the Wallet page. You can return here anytime to check your balance or add more funds.

Step 3: Send Your First Request

1curl https://api.token360.ai/v1/chat/completions \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "glm-5.1",
6    "messages": [
7      {"role": "user", "content": "Hello! What can you do?"}
8    ]
9  }'

Step 4: Verify the Response

A successful response looks like:

1{
2  "id": "chatcmpl-abc123",
3  "object": "chat.completion",
4  "created": 1677652288,
5  "model": "glm-5.1",
6  "choices": [
7    {
8      "index": 0,
9      "message": {
10        "role": "assistant",
11        "content": "Hello! I'm an AI assistant. I can help you with..."
12      },
13      "finish_reason": "stop"
14    }
15  ],
16  "usage": {
17    "prompt_tokens": 12,
18    "completion_tokens": 25,
19    "total_tokens": 37
20  }
21}

Optional: Run a batch job

For many chat completion requests at lower priority and lower cost, use the OpenAI-compatible Batch API instead of sending thousands of synchronous calls.

  1. Call GET /v1/batches/models to see which model names support batch.
  2. Build a .jsonl file (one POST /v1/chat/completions request per line; same body.model on every line).
  3. POST /v1/files with purpose=batch, then POST /v1/batches with input_file_id.
  4. Poll GET /v1/batches/{batch_id} or configure a webhook.
Shell
1# Discover models
2curl https://api.token360.ai/v1/batches/models \
3  -H "Authorization: Bearer sk-your-api-key"
4
5# Upload + create (after preparing requests.jsonl)
6curl https://api.token360.ai/v1/files -H "Authorization: Bearer sk-your-api-key" \
7  -F purpose=batch -F file=@requests.jsonl
8
9curl -X POST https://api.token360.ai/v1/batches \
10  -H "Authorization: Bearer sk-your-api-key" \
11  -H "Content-Type: application/json" \
12  -d '{"input_file_id": "file_...", "endpoint": "/v1/chat/completions", "completion_window": "24h"}'

Full guide: Batch Jobs. API reference: Batches group under API Reference.

Was this page helpful?