Install the CLI
Node.js 22 or later is required. The CLI currently opens the access flow. It does not route inference, collect sessions or issue credentials.
npm install -g https://optinrouter.ai/downloads/optinrouter-cli-0.3.1.tgz
optinrouter loginObserve the current boundary
This request is safe to try without a real key. It returns 401 Unauthorized because production access is closed. Never put a real credential into a shared example.
curl -i https://optinrouter.ai/v1/models
# Current response: HTTP 401
# error.code: unauthorizedProposed inference request
After onboarding opens, a workspace-scoped key will authorize eligible models. Organization policy always takes precedence over client hints. The header names and revision syntax below are preview contracts.
curl https://optinrouter.ai/v1/chat/completions \
-H "Authorization: Bearer $OPTINROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "X-OptinRouter-Policy: pol_engineering@3" \
-d '{"model":"approved-model-id","messages":[{"role":"user","content":"Review this example"}],"stream":false}'Keys and scopes
Workspace keys will bind identity, organization, limits and expiry. Provider BYOK credentials remain separate. A supplied object ID or policy header never grants cross-tenant access. Key revocation and current policy must be checked before dispatch and any action commits.
Inference is separate from contribution
The enterprise_private policy keeps data exchange off. Calling inference, enabling trace metadata or installing a local adapter does not authorize capture for sale. A commercial data program needs its own accepted agreement.
Contracts & examples
Download the preview, validate its shape locally and review the capability limits before planning an integration.
OpenAPI preview