☰

API Keys

API Keys

Quản lý các key dùng để xác thực yêu cầu API

Thông tin kết nối API

Dùng địa chỉ này làm Base URL trong các client tương thích OpenAI. Địa chỉ đã bao gồm /v1; không thêm lại lần nữa.

Nhập đầy đủ key vào trường API Key. Với yêu cầu HTTP trực tiếp, gửi Authorization: Bearer YOUR_API_KEY.

Xác minh key (cURL)

Đặt biến môi trường OPENAI_API_KEY bằng key đầy đủ của bạn, sau đó chạy lệnh này để liệt kê các mô hình khả dụng. Lệnh này không gọi mô hình tạo nội dung.

curl 'https://api.eastx.ai/v1/models' \
  -H "Authorization: Bearer $OPENAI_API_KEY"
Tài liệu tích hợp đầy đủ (tab mới)

Tổng số key

0

Đang hoạt động

0

Đã vô hiệu hóa

0

Tổng đã tiêu

$0.00

Đang tải…

Quick integration guide

Pick a model and a tool, then copy the config. Code below updates to the selected model.

Choose a model

…

Claude Code connects through the Anthropic-compatible API. Every model variable below points to the selected model, so both the main model and background tasks use it.

  1. 1Install Claude Code (Node.js 18+ required)

    bash
    npm install -g @anthropic-ai/claude-code
  2. 2Write ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json)

    json
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.eastx.ai",
        "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
        "ANTHROPIC_MODEL": "MODEL_NAME",
        "ANTHROPIC_DEFAULT_OPUS_MODEL": "MODEL_NAME",
        "ANTHROPIC_DEFAULT_SONNET_MODEL": "MODEL_NAME",
        "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MODEL_NAME",
        "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
      }
    }
  3. 3Start it in your project folder

    bash
    cd your-project
    claude

Replace YOUR_API_KEY with the full key you created on this page. Never commit keys to a repository.