OPTINROUTER / DEVELOPER DOCS

Errors, limits & failure behavior

A failed required control stops the protected flow. A useful error explains the next check without exposing private data.

Contract preview · Production API access is closed. All /v1 endpoints currently return 401.Install CLI
01

HTTP and reason codes

Only the 401 boundary is live for /v1 today. Other rows define the proposed platform behavior. Correlate the error with a server-issued request ID.

HTTPReasonClient action
401unauthorizedAccess is closed or credentials are invalid; no retry loop
403policy_denied / scope_deniedReview the authorized policy and scopes
409revision_conflict / idempotency_conflictRefresh the revision; do not reuse a key with another payload
422grammar_invalid / action_graph_invalidFix structure or unsupported configuration
429rate_limited / budget_capRespect Retry-After or review the budget
502upstream_failureInspect the recorded outcome before retrying
503required_control_unavailableKeep the protected route blocked
504deadline_exceededCancel child work; processing may already have occurred
02

Error envelope

Messages should not echo prompts, credentials, private output or full policy internals. Details can identify a schema path and stable public reason.

json
{
  "error": {
    "code": "grammar_invalid",
    "message": "Response did not satisfy the required grammar.",
    "request_id": "req_example"
  }
}
03

Retries and partial results

After an interrupted inference request, absence of a response does not prove absence of processing or cost. Account and reconcile attempts. Retry only under the operation contract and budget. Never retry a committed side effect without its durable idempotency record.

04

No silent weakening

Required-check timeouts, stale policy, unsupported features and unknown eligibility facts do not turn into an unprotected request. Any optional branch behavior must be configured, visible and unable to claim protection after release.

Contracts & examples

Download the preview, validate its shape locally and review the capability limits before planning an integration.

OpenAPI preview

OptinRouter AI guide

Product and developer guidance.

A good place to start

What would you
like to know?

Ask about public APIs, policies, grammars, context actions or the product. This guide uses approved information and can’t reveal private details or take actions.

Recent messages stay in this page’s memory. Reload or reset to clear them here.