> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Docs Update: Daily Per-Key Budgets That Reset Automatically

> The Token Management API docs add a new scenario: a scheduled job sets selected keys back to their daily cap at midnight, giving each key a daily budget that resets the next day, so companies can control daily spend per person or per project. Includes a ready-to-run script and caveats.

**2026/10/23 12:19 (UTC+8)** · Docs Update

📖 **New Token Management API scenario: a daily budget per key that resets the next day**

Companies handing keys to workflow teams often need "each key may spend at most X a day, and the limit comes back the next day". The platform has no built-in daily quota, but the Token Management API plus a scheduled job at 00:00 (UTC+8) that sets `remain_quota` back to the daily cap does it: the keys don't change, calls are rejected (and not charged) once the day's budget is used up, and they work again the next day.

The page includes a ready-to-run Python script (no double resets, overspend carried to the next day, yesterday's spend per key) and a cron setup, and explains caveats such as the quota being a soft cap that can be slightly exceeded under high concurrency.

See [Token Management API · Daily per-key budgets](/en/api-capabilities/token-management.md#scenario-daily-per-key-limits-that-reset-automatically)

***

← [Back to Live Updates](/en/live.md) · 📚 [Monthly archive](/en/live/archive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.