unhardcoded
reference

API reference

OpenAI-compatible completions, dry-run helpers, and the field-schema lookup.

An OpenAI-compatible completions endpoint, dry-run helpers, and a field-schema lookup. Carry a policy_ir or flow_ir in the request body; inference runs over the provider keys configured on the host.

Authentication

Every request carries Authorization: Bearer <key>. The host key identifies your workspace and its trace history, never a provider account. Your provider keys (OpenAI, Anthropic, Gemini, and others) are configured on the host; unhardcoded routes through your own accounts and never resells tokens, marks up inference, or bills the model spend.

Endpoints

POST/v1/chat/completions
OpenAI-compatible completions. Carry policy_ir or flow_ir in the body; everything else is the standard request shape. The router resolves the model over the live catalog and writes the decision to the trace.
POST/x/rankdry-run
Returns the candidate ranking and per-model verdicts without running inference. Preview which models clear the floor, and why, before a token is spent.
POST/x/policy/normalizedry-run
Admits a policy_ir and returns its canonical form, content fingerprint, and grammar version. Identify and cache a term without running it.
POST/x/flow/normalizedry-run
Admits and identifies a flow_ir, the bounded graph and each node's policy, so a malformed workflow fails fast instead of mid-run.
GET/x/fields
Returns the live field vocabulary, core fields plus this host's registered extensions, that policies gate on with cmp/is and score on with field. The source of truth for valid field names.

Request body

policy_ir (or flow_ir) is a top-level sibling of model and messages; flow_ir wins if both are present. When you attach a policy or flow it drives routing and model is only a trace label. With neither, the model string selects a route, e.g. profile:cheap or flow:<id>, falling back to the host's default profile.

curl
$ curl https://<your-host>/v1/chat/completions \
    -H "Authorization: Bearer $UNHARDCODED_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "policy:support",
      "messages": [{ "role": "user", "content": "…" }],
      "policy_ir": ["policy", ["and", ["meets_req"]], …]
    }'
← Back to docs