Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions English/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@
* [Security](ai-stack/ai-gateway/security.md)
* [Pricing](ai-stack/ai-gateway/pricing.md)
* [Token Plan](ai-stack/token-plan/README.md)
* [A-Z Guide](ai-stack/token-plan/a-z-guide.md)
* [Buy Token Plan](ai-stack/token-plan/buy-token-plan.md)
* [Manage Token Plan](ai-stack/token-plan/manage-token-plan.md)
* [AI Coding](ai-stack/ai-coding/README.md)
Expand Down
1 change: 1 addition & 0 deletions English/ai-stack/token-plan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ A dedicated key for calling models within a plan's allowance, entirely separate

| I want to... | Go to |
|---|---|
| **Brand new — walk the full path from purchase to a working tool** | [A-Z Guide](a-z-guide.md) |
| Browse & buy a Token Plan | [Buy a Token Plan](buy-token-plan.md) |
| Manage a purchased plan & its subscription-keys | [Manage Token Plan](manage-token-plan.md) |
| Use a subscription-key with an AI coding tool (Claude Code, Cursor,...) | [Connect OpenAI-compatible tools to GreenNode MaaS](../ai-coding/connect-openai-compatible-to-maas.md) |
Expand Down
416 changes: 416 additions & 0 deletions English/ai-stack/token-plan/a-z-guide.md

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions English/ai-stack/token-plan/buy-token-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,41 @@ Confirming immediately deducts the amount shown as **Total** from the organizati

The plan appears in **My Token Plans** with status `ACTIVE`, **Auto-renew** ON, and the system auto-creates 1 default subscription-key named `default-key` with access to every model in the plan — ready to use once provisioning finishes.

---

## Integrate the subscription-key into an AI coding tool

To let an AI coding tool call the models in your plan, you need exactly **3 values**:

| Value | Where to get it |
|---|---|
| **Base URL** | `https://tokenplan.api.greennode.ai/v1` — the **Subscription Endpoint** in Package Detail |
| **API key** | The **Subscription keys** tab in Plan Detail — use the built-in `default-key` or one you create |
| **Model code** | The **Models** tab in Plan Detail — e.g. `glm-5.2` |

With all 3 values in hand, pick the guide for the tool you use:

| Tool | Setup guide |
|---|---|
| Not sure which tool to pick | [Getting Started with AI Coding](../ai-coding/getting-started.md) |
| Any OpenAI-compatible tool (Cursor, Continue.dev, LiteLLM, OpenAI SDK...) | [Connect OpenAI-compatible Clients to GreenNode MaaS](../ai-coding/connect-openai-compatible-to-maas.md) |
| Claude Code | [Claude Code](../ai-coding/cli-tools/claude-code.md) |
| Codex CLI | [Codex CLI](../ai-coding/cli-tools/codex-cli.md) |
| OpenCode | [OpenCode](../ai-coding/cli-tools/opencode.md) |
| Codex Desktop | [Codex Desktop](../ai-coding/gui-tools/codex-desktop.md) |
| Add an MCP Server to your tool | [Using MCP Servers with AI Coding](../ai-coding/mcp-servers.md) |

{% hint style="info" %}
The AI Coding pages are written for PAYG API Keys. With Token Plan, keep every step exactly the same and swap just 2 values: **Base URL** to the Subscription Endpoint above, and **API key** to your plan's subscription-key.
{% endhint %}

---

## Next steps

| I want to... | Go to |
|---|---|
| Create more subscription-keys & manage the plan | [Manage Token Plan](manage-token-plan.md) |
| Walk the full path from purchase to a working tool | [A-Z Guide](a-z-guide.md) |
| See the Token Plan overview | [Token Plan](README.md) |
| Track the plan's usage | [View Usage & Cost](../usage-budget/view-usage-cost.md) |
20 changes: 19 additions & 1 deletion English/ai-stack/token-plan/manage-token-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,23 @@ Once you have a subscription-key and the model is included in the plan, calling

Send a `POST` request to the endpoint above with the header `Authorization: Bearer <subscription-key>` and `"model": "<model code>"` in the body (get the model code from the **Models** tab, e.g. `glm-5.2`).

See [Connect OpenAI-compatible tools to GreenNode MaaS](../ai-coding/connect-openai-compatible-to-maas.md) for client setup (OpenAI SDK, LiteLLM, Cursor, Continue.dev, Claude Code...) — just swap the Base URL and API Key per the table above; every other step stays the same.
### Setup guides per tool

When you issue a subscription-key to a team member, send the matching guide along so they can set it up themselves:

| Tool | Setup guide |
|---|---|
| Not sure which tool to pick | [Getting Started with AI Coding](../ai-coding/getting-started.md) |
| Any OpenAI-compatible tool (Cursor, Continue.dev, LiteLLM, OpenAI SDK...) | [Connect OpenAI-compatible Clients to GreenNode MaaS](../ai-coding/connect-openai-compatible-to-maas.md) |
| CLI tools | [CLI Tools](../ai-coding/cli-tools/README.md) — [Claude Code](../ai-coding/cli-tools/claude-code.md), [Codex CLI](../ai-coding/cli-tools/codex-cli.md), [OpenCode](../ai-coding/cli-tools/opencode.md) |
| GUI tools | [GUI Tools](../ai-coding/gui-tools/README.md) — [Codex Desktop](../ai-coding/gui-tools/codex-desktop.md) |
| Add an MCP Server to your tool | [Using MCP Servers with AI Coding](../ai-coding/mcp-servers.md) |

Those pages are written for PAYG API Keys — keep every step the same and only swap the Base URL and API key per the comparison table above.

{% hint style="warning" %}
**Claude Code / the Anthropic SDK** follow the Anthropic standard (the base URL has **no** `/v1`), which differs from the OpenAI-compatible Subscription Endpoint. See [Claude Code](../ai-coding/cli-tools/claude-code.md) and confirm the applicable Token Plan endpoint with the support team.
{% endhint %}

---

Expand All @@ -169,5 +185,7 @@ You can track each plan's allowance, control renewal or delete a plan when neede
| I want to... | Go to |
|---|---|
| Buy another plan | [Buy a Token Plan](buy-token-plan.md) |
| Configure AI coding tools for team members | [Getting Started with AI Coding](../ai-coding/getting-started.md) |
| Walk the full path from purchase to a working tool | [A-Z Guide](a-z-guide.md) |
| View overall usage & cost | [Usage & Budget](../usage-budget/README.md) |
| Configure Rate Limit | [Rate Limit](../agent-base/protect-govern/rate-limit.md) |
34 changes: 17 additions & 17 deletions Vietnamese/ai-stack/token-plan/huong-dan-a-z.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Tick đủ 3 dòng này rồi mới sang bước 2:

| # | Cần có | Cách kiểm tra |
| - | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| 1 | **Tài khoản GreenNode** đăng nhập được AI Platform | Mở[aiplatform.console.greennode.ai](https://aiplatform.console.greennode.ai/) |
| 2 | **Vai trò Root hoặc Admin** | Chỉ 2 role này được mua gói. Xem[Phân quyền theo Role](../agent-base/team-permissions/phan-quyen-theo-role.md) |
| 1 | **Tài khoản GreenNode** đăng nhập được AI Platform | Mở [aiplatform.console.greennode.ai](https://aiplatform.console.greennode.ai/) |
| 2 | **Vai trò Root hoặc Admin** | Chỉ 2 role này được mua gói. Xem [Phân quyền theo Role](../agent-base/team-permissions/phan-quyen-theo-role.md) |
| 3 | **Đủ Credits** trong tài khoản cho giá gói | Số dư hiển thị ngay ở màn thanh toán (**Balance**). 1 credit = 1 VND |

{% hint style="warning" %}
Expand All @@ -58,8 +58,8 @@ Credit chưa đủ? Nạp thêm tại AI Platform Console trước khi mua — h
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Max keys** | Cấp được tối đa bao nhiêu người/tool |
| **Duration** | Chu kỳ gói (thường 30 ngày) |
| **Tokens / Requests per cycle** | Hạn mức mỗi chu kỳ — tính**riêng cho từng model**, không bù trừ qua lại |
| **Included Models** | Danh sách model được gọi (Model, Status,**Model code**, Provider) — nhớ **Model code**, lát nữa cần điền vào tool |
| **Tokens / Requests per cycle** | Hạn mức mỗi chu kỳ — tính **riêng cho từng model**, không bù trừ qua lại |
| **Included Models** | Danh sách model được gọi (Model, Status, **Model code**, Provider) — nhớ **Model code**, lát nữa cần điền vào tool |
| **Subscription Endpoint** | `https://tokenplan.api.greennode.ai/v1` — chính là **Base URL** bạn sẽ dùng |
| **What happens when activated** | Điều gì xảy ra ngay sau khi kích hoạt |

Expand All @@ -80,7 +80,7 @@ Gói đã mua **không đổi được sang Plan Type khác** và **không trả

| Trường | Ví dụ | Lưu ý |
| --------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Plan name** (bắt buộc) | `ENG-GLM-1` | Chỉ`a-z A-Z 0-9 _ - .`, tối đa 50 ký tự. **Đặt tên theo phòng ban/dự án** để sau này lọc usage cho dễ |
| **Plan name** (bắt buộc) | `ENG-GLM-1` | Chỉ `a-z A-Z 0-9 _ - .`, tối đa 50 ký tự. **Đặt tên theo phòng ban/dự án** để sau này lọc usage cho dễ |
| **Plan price / Duration / VAT / Total** | `1.080.000 VND` / `30 days` / Included / `1.080.000 VND` | Tự tính theo Plan Type |
| **Auto-renew** | ON (mặc định) | Tự gia hạn cuối mỗi chu kỳ — tắt được sau khi mua |
| **Payment method** | Credits | 1 credit = 1 VND |
Expand Down Expand Up @@ -119,7 +119,7 @@ Chép 3 giá trị này ra Notepad:
| ------------------ | ---------------------------------------------- |
| **Base URL** | `https://tokenplan.api.greennode.ai/v1` |
| **API key** | subscription-key vừa copy |
| **Model** | model code từ tab Models (ví dụ`glm-5.2`) |
| **Model** | model code từ tab Models (ví dụ `glm-5.2`) |

{% hint style="warning" %}
Subscription-key là **bí mật** — ai cầm được key là gọi được model và tiêu hạn mức của gói. Không dán vào chat nhóm, không commit lên Git. Cấp riêng cho từng người (xem [Mục 6](#6-quan-ly-cap-phat-cho-tung-thanh-vien)) để lỡ lộ thì thu hồi đúng một key.
Expand Down Expand Up @@ -208,12 +208,12 @@ curl https://tokenplan.api.greennode.ai/v1/chat/completions \

| Triệu chứng | Nguyên nhân | Cách xử lý |
| ------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------ |
| `401 Unauthorized` | Key sai, key bị Disable, hoặc copy thiếu ký tự | Copy lại key ở tab**Subscription keys**, kiểm tra Status = `ACTIVE` |
| `403 Forbidden` | Gọi model**không nằm trong gói** | Chỉ gọi model có trong tab**Models** của gói đó |
| `401 Unauthorized` | Key sai, key bị Disable, hoặc copy thiếu ký tự | Copy lại key ở tab **Subscription keys**, kiểm tra Status = `ACTIVE` |
| `403 Forbidden` | Gọi model **không nằm trong gói** | Chỉ gọi model có trong tab **Models** của gói đó |
| `402 Payment Required` | Gói đã hết hạn hoặc đã bị xoá | Mua lại (**Buy again**) hoặc bật lại Auto-renew |
| `404 Not Found` | Base URL thiếu`/v1` | Base URL phải kết thúc bằng`/v1` |
| `404 Not Found` | Base URL thiếu `/v1` | Base URL phải kết thúc bằng `/v1` |
| Request hết token giữa chừng | Pool token của model đó đã về 0 | Đợi chu kỳ mới, mua thêm 1 gói, hoặc tạm chuyển sang API Key PAYG |
| Response lỗi parse | Tool tự nối`/v1` vào base URL | Thử bỏ`/v1` nếu tool tự xử lý |
| Response lỗi parse | Tool tự nối `/v1` vào base URL | Thử bỏ `/v1` nếu tool tự xử lý |

📎 *Cấu hình chi tiết cho từng tool cụ thể (LiteLLM, Cursor, Continue.dev, Node.js SDK…): [Kết nối OpenAI-compatible với GreenNode MaaS](../ai-coding/ket-noi-openai-compatible-voi-maas.md) — các bước giữ nguyên, chỉ đổi Base URL và key sang giá trị Token Plan ở Mục 4.*

Expand Down Expand Up @@ -351,8 +351,8 @@ Filter **All API Keys** là **single select** — mỗi lần chỉ xem được

| Chỉ số | Ý nghĩa với gói Token Plan |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Tokens Consumed** | Số quan trọng nhất — tổng Input + Output + Cache. So với**Tokens/cycle** trong Plan Detail để biết còn lại bao nhiêu |
| **Total Requests** | So với**Requests/cycle** trong Plan Detail |
| **Tokens Consumed** | Số quan trọng nhất — tổng Input + Output + Cache. So với **Tokens/cycle** trong Plan Detail để biết còn lại bao nhiêu |
| **Total Requests** | So với **Requests/cycle** trong Plan Detail |
| **Errors** | Số request lỗi — tăng đột biến thường là key sai, gọi model ngoài gói, hoặc gói đã hết hạn mức |
| **Requests over time** | Line chart theo giờ/ngày — xem nhịp sử dụng đều hay dồn cục |
| **Token Breakdown** | Doughnut tách Cache / Output / Input |
Expand All @@ -365,12 +365,12 @@ Nguồn chính xác nhất về hạn mức còn lại vẫn là **Plan Detail**

| Câu hỏi | Cách trả lời |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Ai đang xài nhiều nhất? | Lọc lần lượt từng key thành viên, so**Tokens Consumed** |
| Gói sắp cạn chưa? | So Tokens Consumed với**Tokens/cycle** trong Plan Detail |
| Ai đang xài nhiều nhất? | Lọc lần lượt từng key thành viên, so **Tokens Consumed** |
| Gói sắp cạn chưa? | So Tokens Consumed với **Tokens/cycle** trong Plan Detail |
| Chu kỳ sau nên mua gói to hay nhỏ hơn? | Xem tổng tiêu thụ trọn 1 chu kỳ (Time Range = Absolute từ ngày mua đến ngày hết hạn) |
| Có ai gọi lỗi liên tục không? | Xem card**Errors** khi lọc theo key đó |
| Có ai gọi lỗi liên tục không? | Xem card **Errors** khi lọc theo key đó |

📎 *Chi tiết dashboard, các filter khác và phân quyền xem theo role: [Xem Usage &amp; Cost](../usage-budget/xem-usage-cost.md)*
📎 *Chi tiết dashboard, các filter khác và phân quyền xem theo role: [Xem Usage & Cost](../usage-budget/xem-usage-cost.md)*

---

Expand Down Expand Up @@ -402,7 +402,7 @@ Không đổi được. Phải **Delete** gói cũ (hoàn pro rata phần chưa
| Chi tiết quản lý gói & subscription-key | [Quản lý Token Plan](quan-ly-token-plan.md) |
| Cấu hình chi tiết từng tool AI coding | [Kết nối OpenAI-compatible với GreenNode MaaS](../ai-coding/ket-noi-openai-compatible-voi-maas.md) |
| Chọn tool phù hợp (GUI hay CLI) | [Bắt đầu với AI Coding](../ai-coding/bat-dau.md) |
| Dashboard usage (Tab Usage) | [Xem Usage &amp; Cost](../usage-budget/xem-usage-cost.md) |
| Dashboard usage (Tab Usage) | [Xem Usage & Cost](../usage-budget/xem-usage-cost.md) |
| Phân quyền thành viên trong tổ chức | [Phân quyền theo Role](../agent-base/team-permissions/phan-quyen-theo-role.md) |

---
Expand Down
Loading
Loading