402 Payment Required
The gateway rejected the request because a budget limit has been hit. The code field identifies which budget.
402 responses are fail-closed by design. The request does NOT reach the provider. No tokens are consumed and no cost is incurred beyond what was already tracked.
Error codes
daily_limit_exceeded
{
"error": {
"code": "daily_limit_exceeded",
"message": "Daily spend limit of $25.00 reached for organization org_xxx. Resets at 2026-05-26 00:00 UTC.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yb",
"governance_stage": "cost_estimate",
"limit_usd": 25.0,
"current_spend_usd": 25.03
}
}Cause: Your organization has hit its daily spending cap.
Fix options:
- Raise the daily limit — Dashboard → Costs → Budgets → Edit Daily Cap
- Wait for reset — budgets reset at midnight UTC
- Check where the spend went — Dashboard → Costs → Today’s Usage to find the expensive operations
# Raise the daily limit via API
curl -X PATCH https://api.curate-me.ai/v1/admin/budgets/org \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"daily_limit_usd": 50.0}'key_budget_exceeded
{
"error": {
"code": "key_budget_exceeded",
"message": "Daily spend limit of $5.00 reached for API key cm_sk_xxx.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yc",
"governance_stage": "hierarchical_budget",
"limit_usd": 5.0,
"current_spend_usd": 5.01
}
}Fix: Raise the per-key budget in Dashboard → Settings → API Keys → Edit Key, or use a key without a per-key budget cap.
team_budget_exceeded
{
"error": {
"code": "team_budget_exceeded",
"message": "Daily spend limit of $10.00 reached for team engineering.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yd",
"governance_stage": "hierarchical_budget",
"team_id": "team_engineering"
}
}Fix: Raise the team daily budget in Dashboard → Team → Budget.
session_budget_exceeded
{
"error": {
"code": "session_budget_exceeded",
"message": "Runner session budget of $2.00 exceeded for session ses_xxx.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6ye",
"governance_stage": "runner_session_budget",
"session_id": "ses_xxx",
"limit_usd": 2.0,
"current_spend_usd": 2.04
}
}Cause: A runner session has exceeded its per-session cost cap. This is specific to managed OpenClaw runner sessions.
Fix: Start a new session with a higher max_budget_usd parameter, or investigate why the session spent more than expected.
# Start a runner session with explicit budget
curl -X POST https://api.curate-me.ai/gateway/admin/runners/sessions \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"runner_id": "runner_xxx", "max_budget_usd": 5.0}'plan_limit_exceeded
{
"error": {
"code": "plan_limit_exceeded",
"message": "Free plan daily request limit (100 requests) exceeded. Upgrade to Starter to continue.",
"request_id": "req_01hwz3kj4p5qm8n9v2t6yf",
"governance_stage": "plan_enforcement"
}
}Fix: Upgrade your plan at Dashboard → Settings → Billing.
Budget monitoring
Set up budget alerts before you hit the limit:
# Create a budget alert at 80% of daily limit
curl -X POST https://api.curate-me.ai/v1/admin/alerts \
-H "X-CM-API-Key: cm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "budget_threshold",
"threshold_pct": 80,
"scope": "org",
"notify_email": "ops@yourcompany.com"
}'Or enable Slack/Teams alerts in Dashboard → Settings → Notifications.
Use the X-CM-Daily-Cost (current spend) and X-CM-Daily-Budget (your daily limit) response headers (returned on every successful request) to track budget usage in your application code.