# API changes: July 12, 2026

[← Changelog](/docs/changelog) · [July 2026](/docs/changelog/2026-07)

### NEW-0712-1: The AI quota exhaustion response now points to the top-up path

The `402 ai_quota_exhausted` error with `reason: wallet_empty` now additionally returns the `hint` and `topupUrl` fields. `hint` is a short English message: the monthly AI quota and the account balance are exhausted, and an account admin can top up the balance to resume. `topupUrl` is a link the admin opens to top up. The fields are additive: the existing response fields (`reason`, `resetAt`) are unchanged, and the `reason: breaker` and `reason: wallet_off` branches do not carry them. This lets an agent client relay the top-up path to the human. The error is returned by model calls, see [POST /v1/chat/completions](/docs/ai/chat/completions).

### FIX-0712-2: `sleep-now` on a server with a long-past computed wake now sleeps honestly

**Before**

For a server with an enabled wake schedule, `POST /v1/infra/servers/:id/sleep-now` could return `{ data: { slept: false, reason: "WAKE_IMMINENT" } }` forever when the scheduled wake was left far in the past (for example, the server was woken outside the schedule). The server never slept and kept its plan running around the clock.

**After**

A wake that lies in the past by more than the schedule's allowance (the margin plus the typical server preparation time) is no longer treated as imminent: `sleep-now` sleeps the server and answers `{ success: true }`, and the next wake moves to the nearest window of the schedule. `WAKE_IMMINENT` stays a normal response only for a genuinely near wake.
