System One decisions (TypeSafe Jev)
const url = 'https://api.openpike.dev/v1/systemone';const options = { method: 'POST', headers: { 'x-openpike-tags': 'agent=reviewer,env=prod', 'x-openpike-no-log': '1', 'x-openpike-run': 'task-8841', 'x-openpike-run-max-usd': '5', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"model":"typesafe/jev-1.13.0","state":{"ticket":"Customer reports the checkout page returns a 500 error for all users."},"questions":[{"id":"urgent","type":"noul","question":"Is this ticket urgent?"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.openpike.dev/v1/systemone \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-openpike-no-log: 1' \ --header 'x-openpike-run: task-8841' \ --header 'x-openpike-run-max-usd: 5' \ --header 'x-openpike-tags: agent=reviewer,env=prod' \ --data '{ "model": "typesafe/jev-1.13.0", "state": { "ticket": "Customer reports the checkout page returns a 500 error for all users." }, "questions": [ { "id": "urgent", "type": "noul", "question": "Is this ticket urgent?" } ] }'TypeSafe’s System One format, served by TypeSafe and OpenRouter. Send a state and typed
questions; get answers. Not streamed. OpenPike forwards the body with the model
rewritten to the provider’s own ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Example
agent=reviewer,env=prodComma-separated key=value pairs merged over the virtual key’s tags for this request, for
example agent=reviewer,env=prod. At most 10 pairs; keys and values at most 64 characters.
Not forwarded to the provider.
1 or true keeps this request out of prompt logging even when the workspace has it on.
Not forwarded to the provider.
Example
task-8841The run this request belongs to, 1 to 128 printable ASCII characters, for example a task or
session ID. Run limits on matching budgets cap each run’s spend, requests and wall time; a run
at a cap gets 429 run_limit_exceeded. Not forwarded to the provider.
A human name for the run, at most 200 characters. Needs x-openpike-run. Not forwarded.
Example
5A spend cap in dollars for the run, above zero. Only lowers a budget’s run spend cap. Needs
x-openpike-run. Not forwarded.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The facts the questions are about.
object
object
choice, score or noul (yes, no or unknown).
Example
{ "model": "typesafe/jev-1.13.0", "state": { "ticket": "Customer reports the checkout page returns a 500 error for all users." }, "questions": [ { "id": "urgent", "type": "noul", "question": "Is this ticket urgent?" } ]}Responses
Section titled “Responses”The provider’s response, passed through.
object
object
object
Example generated
{ "model": "example", "answers": [ {} ], "usage": {}}Headers
Section titled “Headers”Example
req_QhMBW1esl4VW2o8NXDEcOLsSThe request ID, also shown in Logs.
Example
deepseekThe provider that served the request, or that returned an upstream error.
Example
deepseek/deepseek-flashThe provider/model that served the request; differs from the request for aliases.
Example
1Upstream attempts, 1 when no fallback happened.
Example
gate;dur=4.2gate;dur=<ms>: time spent checking budgets, pauses and plan limits.
invalid_request (body is not valid JSON, or not a JSON object), invalid_tags, invalid_model (not provider/model, unknown provider or alias), unsupported_format (the provider does not serve this endpoint’s format) or unsupported_parameter (background: true on /v1/responses).
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "invalid_model", "message": "Unknown provider \"deepsek\".", "request_id": "req_..." }}Headers
Section titled “Headers”Example
req_QhMBW1esl4VW2o8NXDEcOLsSThe request ID, also shown in Logs.
invalid_virtual_key: missing, unknown or revoked virtual key, or a key disabled because the plan allows fewer keys.
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "invalid_virtual_key", "message": "The API key is invalid or revoked.", "request_id": "req_..." }}Headers
Section titled “Headers”Example
req_QhMBW1esl4VW2o8NXDEcOLsSThe request ID, also shown in Logs.
provider_disabled: the provider is in the catalog but not enabled yet.
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "invalid_virtual_key" }}missing_provider_key: the workspace has no key for that provider.
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "invalid_virtual_key" }}An OpenPike block, before the provider is called: budget_exceeded, loop_detected,
scope_paused, run_limit_exceeded, plan_limit_reached, plan_limit_throttled or
too_many_auth_failures.
A 429 from the provider itself comes back as upstream_error with the provider’s status.
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "budget_exceeded", "message": "The hard budget for agent=reviewer is used up for this period.", "request_id": "req_..." }}Headers
Section titled “Headers”Seconds until the request may succeed. Set on OpenPike’s 429 blocks, and passed through from the provider on upstream errors.
Example
req_QhMBW1esl4VW2o8NXDEcOLsSThe request ID, also shown in Logs.
upstream_unreachable (502): the provider could not be reached. upstream_error: the
provider returned an error; its status code is passed through (so it may be any 4xx or
5xx) with its message, after anything that looks like a key is removed.
The error shape of chat completions, Responses, System One and models.
object
object
Example
{ "error": { "type": "openpike_error", "code": "invalid_virtual_key" }}Headers
Section titled “Headers”Example
deepseekThe provider that served the request, or that returned an upstream error.