Pengguna baharuPelan DNS dan CDN percuma untuk setiap akaun baharu.Cipta akaun anda

API keys, quota and usage

Key groups, quota caps, model and IP limits and expiry, plus usage logs and statistics.

5 minit bacaan Dikemas kini 20 Okt 2026

This page covers API key settings, how LLM quota is counted, and how to track usage with logs and statistics.

How quota works

  • Account quota: activating the LLM API gives you a separate LLM account, and model charges are deducted from it. It is managed separately from your main account balance. You add to it by transfer or redemption code. On Account overview, Current balance shows what remains and Historical usage shows lifetime spend.
  • Displayed amounts: the console shows quota as a US-dollar amount. When you type a raw quota value into key settings, 500000 quota units = $1.
  • Pricing: most models charge separately for input and output tokens. Some models, tagged Pay per request, charge per call. LLM API → Models & pricing shows each model's input and output price per 1K tokens and its ratios. A group can also apply a price multiplier, which is shown in the group options when you create a key.
Note

Every request must fit within both your account quota and the key's own quota cap. If either one runs out, the request fails.

Managing API keys

Open LLM API → API tokens (/llm/tokens). The list shows these columns for each key:

ColumnDescription
NameThe name you entered when creating the key
StatusEnabled / Disabled / Expired / Exhausted
Remaining / Total quotaA progress bar of remaining quota. Keys with unlimited quota show Unlimited allowance.
GroupThe key's group. Smart circuit breaker means the auto group.
KeyPartly masked by default. Click the eye icon to reveal it or the copy icon to copy it.
Available modelsShows Unlimited when no model limits are set
IP restrictionsShows Unlimited when none is set
Created / ExpiresNever

In the Actions column, use the switch to enable or disable a key, the edit icon to change its settings, or the delete icon to delete it. Requests that use a deleted key fail immediately.

Key options

FieldDescription
NameRequired. Name keys by purpose, for example "prod-support-bot".
GroupLeave empty to use the default group. The list only shows groups your account can use, and may include a description and price multiplier for each. Choose Smart circuit breaker to let the platform pick an available group. The group decides which models the key can call and the price multiplier.
Unlimited quotaWhen on, the key has no cap of its own and is limited only by your account quota.
Quota limitShown when unlimited quota is off. Enter the most quota this key may spend (500000 = $1). When it is used up, the key's status changes to Exhausted.
Enable model restrictions / Available modelsWhen on, list the model names the key may call, separated by commas, for example gpt-4o-mini,text-embedding-3-small. Requests for other models are rejected.
IP restrictionsOne allowed source IP per line. Leave empty for no limit. Use this when calls come only from fixed servers.
Expiration timeLeave empty for a key that never expires. You cannot pick a time in the past. When the time passes, the key's status changes to Expired.
Tip

If you edit a disabled or expired key and give it a valid expiry (or no expiry), it is re-enabled automatically when you save.

Security recommendations

  • Create separate keys for each application and environment so you can disable and audit them one at a time.
  • Give keys used by public-facing apps a quota limit. If the key leaks, the loss is capped.
  • Set an IP limit for server-side callers where you can.
  • Keep keys on the server only, never in browser or mobile app code. If you suspect a key has leaked, disable or delete it right away and create a new one.

Adding quota

  • Transfer: on Account Overview, click Transfer on the Current balance card to move funds from your main balance. The minimum is 1, and the dialog shows how much quota you will get. Transfers cannot be reversed.
  • Redemption code: enter the code in the Top up with redemption code card on Account Overview and click Redeem.
  • Top up your main balance: click Top up on the Current balance card to go to Billing → Balance.

Usage logs

LLM API → Request logs (/llm/logs) lists every call and every change to your quota.

  • Filters: time range, key (token) name, model name and type. The types are Top up, Spending, Manage, System and Error.
  • Columns: time, key, type, model, duration and time to first token, input tokens, output tokens, cost, source IP and details. If the requested model was mapped to a different model, the entry shows both the requested model and the actual model.
  • Summary: the top of the page shows totals for the current filter, such as total records, successful requests and failed requests.

When troubleshooting, filter by the Error type first, then read the error message in the details.

Usage statistics

LLM API → Usage (/llm/stats) summarises usage for a time range:

  • Total quota, used, remaining and usage rate
  • Requests, tokens and spend in the selected period
  • A usage trend chart, spend by model and a ranking of models by request count
  • A daily breakdown table with date, model, requests, tokens and quota spent

The Account Overview page also shows a short summary: request count, quota and tokens for the period, and average RPM (requests per minute) and TPM (tokens per minute) over the selected date range.

Adakah halaman ini membantu?