OPTINROUTER / DEVELOPER DOCS

Policies & routing configuration

Versioned rules control destinations, processing, transformations and release decisions before preferences are considered.

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

Rule precedence

Organization deny rules override project and user preferences. Pin an immutable policy revision per request. Authenticate the principal, check current revocation and provider capabilities, then choose among eligible routes by the allowed cost/latency preferences. Unknown required region or retention facts make a route ineligible.

02

Enterprise private policy example

This is a validated structural example, not a live policy. The allowed model is a placeholder. Regions represent verified processing boundaries, not a provider headquarters address. Required controls block when unavailable.

json
{
  "version": "2026-10-19-preview",
  "name": "Private engineering",
  "mode": "enterprise_private",
  "allowed_locations": [
    "managed",
    "customer_server"
  ],
  "routing": {
    "models": [
      "approved-model-id"
    ],
    "regions": [
      "eu"
    ],
    "require_verified_region": true
  },
  "retention": "no_content",
  "data_exchange": false,
  "input": [
    {
      "kind": "redact",
      "ref": "detector_secrets@1",
      "required": true
    },
    {
      "kind": "semantic_filter",
      "ref": "filter_enterprise@1",
      "required": true
    }
  ],
  "output": [
    {
      "kind": "grammar",
      "ref": "grammar_review@1",
      "required": true
    }
  ],
  "limits": {
    "deadline_ms": 30000,
    "max_parallel_actions": 2,
    "max_repair_attempts": 0
  },
  "failure_mode": "block",
  "delivery": "buffered"
}
03

Field definitions

Stage references identify administrator-approved detector, grammar or lookup revisions. The model cannot invent a tool, relax a rule or change the destination. Organization identity comes from authenticated scope rather than an arbitrary request field.

FieldMeaning
allowed_locationsCertified places where stages may execute
routingEligible model IDs and verified processing regions
retention / data_exchangeContent retention and commercial exchange are independent controls
input / outputOrdered stages with pinned references and required flags
limitsRequest deadline, parallel-action ceiling and repair budget
failure_mode / deliveryBlock on required failure; buffered or explicitly supported streaming units
04

Configuration lifecycle

Validate the draft, review the diff, publish a new immutable revision and activate it for a scoped rollout. Preserve a rollback reference. Stale or unverifiable configuration must not silently fall back to a permissive policy. Proposed validate/publish APIs remain unavailable today.

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.