Tổng Quan
Tạo một API keytype=user mới trong tổ chức gắn với management token hiện tại.
Thân Yêu Cầu
| Trường | Kiểu | Mặc định / Giới hạn | Ghi chú |
|---|---|---|---|
name | string | bắt buộc, mặc định Default Key, độ dài 1-50 | Tên hiển thị, server sẽ trim khoảng trắng |
limitAmount | number | null | tối thiểu 0, input tối đa 1000000 | null hoặc bỏ qua = không giới hạn, 0 = quota bằng 0. Giá trị dương được chuẩn hoá thành trần lưu trữ không vượt quá tương đương 100000 USD |
limitCurrency | enum | default USD | Chỉ hỗ trợ USD. Gửi CNY sẽ trả về 400 currency_retired. |
models | string[] | mặc định [] | Danh sách cho phép model tùy chọn |
expiresAt | string | null | datetime RFC3339 | null nghĩa là không hết hạn |
Ghi Chú
- Giá trị đầy đủ của API key chỉ hiển thị một lần trong response.
models: []nghĩa là key không có hạn chế model bổ sung nào ngoài chính sách của tổ chức.limitAmount: 0tạo ra một key hợp lệ nhưng chưa thể chi tiêu quota cho đến khi được cập nhật.
Ví Dụ
Yêu Cầu / Phản Hồi
Sử dụng bảng OpenAPI tương tác ở trên để xem schema và các trường response chính xác.Response example
Important fields
Full secret API key value. It is returned only once on creation.
API key identifier used in follow-up Management API calls.
Display name for the API key.
Non-secret key prefix for display and support.
One of
active, inactive, or revoked.Spending cap in USD as a JSON number for display.
null means unlimited.Exact spending cap in USD as a decimal string.
null means unlimited.Accumulated usage in USD as a JSON number for display.
Exact accumulated usage in USD as a decimal string.
Per-key model allowlist. Empty array means no additional key-level model restriction.
ISO timestamp when the key expires, or
null for no expiry.ISO timestamp for the most recent use, or
null when unused.ISO creation timestamp.