Estimated cost of this request exceeds the remaining budget
Increase the budget ceiling, wait for the period to reset, or remove the budget
customer_budget_exceeded
429
Estimated cost exceeds the customer-level budget limit
Increase the customer budget or remove the limit. The response details includes customer_id, budget_limit_microdollars, and budget_spend_microdollars
velocity_exceeded
429
Spend rate within the velocity window exceeds the configured limit
Wait for the cooldown period (check Retry-After header). The response details includes limitMicrodollars, windowSeconds, and currentMicrodollars
session_limit_exceeded
429
Cumulative spend for this session ID exceeds the session limit
Start a new session (new X-NullSpend-Session value) or increase the session limit. The response details includes session_id, session_spend_microdollars, and session_limit_microdollars
tag_budget_exceeded
429
Estimated cost exceeds a tag-level budget limit
Adjust the tag budget. The response details includes tag_key, tag_value, budget_limit_microdollars, and budget_spend_microdollars
customerId missing, malformed (non-[a-zA-Z0-9._:-]+), or exceeds 256 chars
Send a valid customer ID
invalid_plan_ref
400
bind
planRef missing or exceeds 256 chars
Provide a non-empty plan label
invalid_budget_cap
400
bind
budgetCap not a non-negative integer (microdollars)
Send an integer 0 or greater
invalid_margin_target
400
bind
marginTargetPercent outside 0–100
Send an integer between 0 and 100 (or omit)
invalid_estimate
400
gate
estimatedCostMicrodollars not a positive integer (zero rejected)
Send a positive integer microdollar estimate
invalid_feature
400
gate
feature empty or exceeds 256 chars
Send a non-empty string up to 256 chars (or omit)
invalid_idempotency_key
400
bind, gate
Idempotency-Key exceeds 256 chars or contains non-printable-ASCII
Use a printable-ASCII key under 256 chars
customer_data_unsupported
400
bind
customer_data / customerData field present (Sprint 2 scope)
Remove the field; revisit in Sprint 2 when Stripe revenue sync ships
customer_not_allowed
403
bind, gate
customerId outside the API key's allowedCustomers scope
Use a key whose scope includes this customer, or remove allowedCustomers from the key
not_found
404
unit-economics
Customer not bound under the auth-resolved org (also covers cross-org / disallowed-customer to prevent enumeration)
Verify the customer is bound under your org
binding_inactive
409
bind
Existing binding has status = "suspended" or "archived"; reactivation requires admin path (Sprint 2)
Reactivate via admin path (when shipped) or use a new customer ID
idempotency_conflict
409
bind, gate
Same Idempotency-Key reused with a different request body
Use a fresh idempotency key for the new request
idempotency_unavailable
503
bind, gate
Postgres-side idempotency persistence failed
Retry without Idempotency-Key, or retry later. The route fails closed so the caller knows the request is not safely retryable with the original key
See Unit Economics API for the full request/response shapes and the Per-Customer Budgets guide for the conceptual model.
| loop_detected | 429 | Repeated identical or similar prompts exceeded the loop-detection threshold within the sliding window | Inspect agent logic for retry loops. Adjust thresholds in budget settings, or set loop_max_calls to disable. Retry-After returns the recommended cooldown |
| plan_limit_exceeded | 429 | Org exceeded its NullSpend plan-tier governed-request cap (Free tier hard-blocks today) | Upgrade via the upgrade_url returned in the body, or wait for the next period reset. Top-level error.upgrade_url and error.self_host_url are set on this denial |
| budget_unavailable | 503 | Budget enforcement service is temporarily unavailable | Retry after a brief delay. The proxy fails closed — requests are blocked, not passed through |
Too many requests. Default limits: 120/min per IP, 600/min per API key
Reduce request rate. Check the Retry-After header for when to retry
Rate limit responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After headers. See the headers reference. For the full rate limiting reference, see Rate Limits.