Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Save OpenRouter settings

/api/v1/owner/providers/openrouterPOST
Persists a specific model and optional key locally. Omit apiKey or send an empty string to retain the existing saved key. Automatic model routers are rejected.
Examples are synthetic and illustrate response shape; IDs, signatures, and credentials are not usable authority.
Authorization
ownerSession *cookie halfspan_session
Authenticated HttpOnly owner session. Not an executor credential.
Request Bodyapplication/jsonrequired
apiKey?string
Omit or send an empty string to retain the saved key. Never returned by the API.
model *string
A specific provider/model ID; automatic routers are rejected.
Min length: 3Max length: 200
Response
200 · Successful response. A paused run is an application outcome, not an HTTP error.
configured *boolean
model *string
source *"local" | "environment" | "none"
400 · Request validation failed.
error *string
reasonCode?string
401 · Sign in to the Halfspan workspace.
error *string
reasonCode?string
403 · Console requests must come from the local owner workspace.
error *string
reasonCode?string
500 · The local service could not complete this request.
error *string
reasonCode?string
Request example
curl -X POST "https://service.example.com/api/v1/owner/providers/openrouter" \ -H "x-halfspan-owner: 1" \ -b "halfspan_session=<token>" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4.1-mini" }'
Response example
{ "configured": false, "model": "openai/gpt-4.1-mini", "source": "none" }