CPEN RouterOpenAI-compatible routing with live price caps

Authentication

OAuth signup grants the launch credit path. Paid API calls use cpen_live API keys issued from the account dashboard.

Authorization: Bearer cpen_live_...

Price caps

Caps are declared in USD. CPEN rejects the request when no live preset route fits the cap.

"routing": {
  "currency": "USD",
  "max_input_per_1m": "0.03",
  "max_output_per_1m": "0.15"
}

Displayed price

Public API responses and UI tables show the customer-facing USD price. Route selection uses the input and output caps you send.

visible_input_price <= max_input_per_1m
visible_output_price <= max_output_per_1m

Extraction request

The extraction endpoint accepts text plus a JSON schema. Invalid JSON retry and real upstream execution are next implementation steps.

POST /v1/extractions
{
  "model": "cpen/middle",
  "input": "Alice paid 12.50 USD for a notebook.",
  "schema": {"type": "object"},
  "routing": {
    "currency": "USD",
    "min_total_per_1m": "0.05",
    "max_total_per_1m": "0.30",
    "rpm_cap": 60,
    "strategy": "balanced",
    "continuity_mode": "stay_within_cap"
  }
}