Check the credential that will run the job
GET /v1/billing/rates can help compare published rates, but it cannot
tell you whether this key can make a later request. Store the redacted
responses with the run record; keep the key out of logs, prompts, and saved
artifacts.
Quote the work before you fan out
Quote each route and intended unit count before starting a loop:requestId, planKey, meterClass, units, budget, and budgetGate
with the run record. A quote is an estimate, not a reservation. Set a maximum
work-unit count before the job begins, then quote each route in the workload
instead of extrapolating from one call.
Decide what the agent may retry
Do not retry a refusal until its cause changes. Stop and keep the response context for authorization, billing, budget-gate, hard-cap, or quota errors. For429, honor Retry-After when present and reduce concurrency rather than
starting parallel retry loops.
API keys can read billing state, limits, and quotes. Budget changes use a
signed-in organization session. Do not give an unattended process a human
browser token to raise its own cap.

