Skip to main content

Quick Start

This guide gets you from token creation to a successful API call.

Step 1: Get your token

In the RouteStack console:
  1. Open Console -> Token Management
  2. Create a new token
  3. Copy the token value and keep it safe

Step 2: Confirm your base URL

Use your RouteStack API base URL:
https://api.routestack.cn/v1
For local development, you may use:
http://127.0.0.1:3000/v1

Step 3: List available models

curl https://api.routestack.cn/v1/models \
  -H "Authorization: Bearer YOUR_ROUTESTACK_TOKEN"

Step 4: Send your first chat request

curl https://api.routestack.cn/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ROUTESTACK_TOKEN" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {
        "role": "user",
        "content": "Hello from RouteStack"
      }
    ]
  }'

Step 5: Verify the request in console

After the request succeeds:
  1. Open Console -> Usage Logs
  2. Confirm the request appears in the logs
  3. Check the model, channel, and quota deduction

What to do next