Bayesian API reference
Version 1.0.0, OpenAPI 3.1.0. Generated from the contract on every deploy.
Servers: provided to partners. API access is available to partners on request: info@geateh.si.
Operations marked partner-only are for a partner’s operators. Every operation except health, readiness and the contract needs a key with the scope named on it.
Machine-readable: openapi.json.
Overview
The judging engine's service contract (v1). Bayesian is the system of record for judgments: definitions, norm verdicts with their condition decisions and as-of day, derivations, questions, presumptions and assumptions, and the journal of every change. The caller is the system of record for documents, rules and their review, geometry and the user-facing report; Bayesian judges the rules and provision texts the caller supplies and never re-extracts a reviewed rule.
Generated by bayesian-admin openapi from the Rust types (src/api.rs and the engine's); a test fails when this file differs from the generated one. Within v1 fields are only added.
Norm status in a report (ReportStatus.of): meets → applies_meets; likely_not → applies_likely_not; cannot_tell → applies_cannot_tell (with the question that settles it); conditional → applies_meets_if (the open ways verbatim, what to ask the applicant for); not_applicable → not_applicable (with the condition decision). Every norm line carries the citation, the as-of day and its basis, changed after … flags, condition_checks and the norm's review state.
Confidence of a norm line: the norm's review state approved or corrected → high, unvalidated → medium, read by a model or near (not verbatim) → low, never above what the verdict's shown label says.
The as-of day (facts.as_of): filing (the application's filing date), else document (the documentation's date) or today, both listed on each norm verdict as an assumption.
Callbacks are optional; polling GET /api/v1/jobs/{id} with backoff is the default. A callback is POST callback.url with a CallbackPayload, headers X-Bayesian-Signature: sha256=<hex HMAC-SHA256(secret, raw body)> and X-Bayesian-Delivery: <uuid>, retried 3 times with backoff on a non-2xx answer. Responses carry X-Request-Id, X-Bayesian-Build and X-Bayesian-Kb-Revision. Bodies up to 1 MB. Request and result bodies are never logged: a log line carries the request id, the job id, the tenant and the organisation.
Authentication
bearer: http bearer
A key of the tenant, optionally of an organisation, with scopes (x-scope on each operation names the one it needs). X-Api-Key: <key> is accepted until v2.
session: apiKey
The demo's sign-in (POST /api/v1/sessions): an account's session, with its tenant and its role's scopes (admin every scope; user read, evaluate, facts:write, amend). Accepted wherever a key is, a key first when both come. A write it signs needs X-Requested-With: bayesian or a same-origin Origin.
Endpoints
| Method | Path | Summary | Access |
|---|---|---|---|
| GET | /api/v1/account | Your account | scope read |
| POST | /api/v1/account/keys | Rotate your key | scope read |
| GET | /api/v1/account/notices | The account's notices | scope read |
| POST | /api/v1/account/notices/{id}/seen | Mark a notice seen | scope read |
| GET | /api/v1/accounts | The accounts (admin) | scope admin partner-only |
| POST | /api/v1/accounts/accept | Accept an invite | no key |
| POST | /api/v1/accounts/{id}/disable | Disable an account (admin) | scope admin partner-only |
| PUT | /api/v1/accounts/{id}/settings | Set an account's limits (admin) | scope admin partner-only |
| POST | /api/v1/amend | Amend knowledge | scope amend partner-only |
| POST | /api/v1/checks | Start a check | scope evaluate |
| GET | /api/v1/coverage | What a municipality's plan holds | scope read |
| GET | /api/v1/credentials | Your model credentials | scope evaluate |
| PUT | /api/v1/credentials/{provider} | Bring your own model key | scope evaluate |
| DELETE | /api/v1/credentials/{provider} | Remove your model key | scope evaluate |
| GET | /api/v1/definitions | List definitions | scope read |
| PUT | /api/v1/definitions/{predicate} | Define a concept | scope curate partner-only |
| POST | /api/v1/definitions/{predicate}/accept | Accept a draft definition | scope curate partner-only |
| POST | /api/v1/facts | Store facts ahead of checks | scope facts:write |
| GET | /api/v1/health | Liveness | no key |
| GET | /api/v1/history | The journal | scope read |
| GET | /api/v1/invites | The invites (admin) | scope admin partner-only |
| POST | /api/v1/invites | Invite someone (admin) | scope admin partner-only |
| GET | /api/v1/jobs | List jobs | scope read |
| GET | /api/v1/jobs/{id} | Read a job | scope read |
| GET | /api/v1/jobs/{id}/explain/{claim} | Explain a claim | scope read |
| POST | /api/v1/jobs/{id}/facts | Answer a job's questions | scope facts:write |
| POST | /api/v1/jobs/{id}/publish | Publish a job as a verdict | scope publish |
| GET | /api/v1/jobs/{id}/report | A permit check's document | scope read |
| GET | /api/v1/metrics | Metrics | scope admin partner-only |
| POST | /api/v1/norms/state | Review norms | scope curate partner-only |
| GET | /api/v1/openapi.json | The contract | no key |
| GET | /api/v1/ready | Readiness | no key |
| GET | /api/v1/sessions | The current session | no key |
| POST | /api/v1/sessions | Sign in | no key |
| DELETE | /api/v1/sessions | Sign out | no key |
| GET | /api/v1/tenants | The tenants' copies | scope admin partner-only |
| POST | /api/v1/tenants/rebase | Rebase the tenants' copies | scope admin partner-only |
| POST | /api/v1/tenants/{tenant}/promote | Promote a tenant's work into the base | scope admin partner-only |
| GET | /api/v1/tenants/{tenant}/writes | What a tenant wrote | scope admin partner-only |
| GET | /api/v1/verdicts/{id} | Read a verdict | scope read |
| GET | /api/v1/verdicts/{id}/changes | A verdict's changes | scope read |
Your account
GET/api/v1/accountscope read
The account signed in (or the account whose tenant the key belongs to): the account, its tenant and scopes, its settings and the limits in force (settings.own what the admin set, the rest the server's defaults where it set nothing), today's research budget use (budget: day, used, limit, left), its open jobs, its tenant's keys by fingerprint (current the one its sessions act as) and its model credentials as GET /api/v1/credentials gives them (null when the server keeps none).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Rotate your key
POST/api/v1/account/keysscope read
Signed in only (a key cannot replace itself): a new API key for your tenant with the scopes read, evaluate, facts:write and amend, shown this once; the key your sessions acted as is revoked at once. { key, fingerprint, revoked }.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Responses
| Status | Body | Description |
|---|---|---|
201 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
429 | application/json ErrorResponse |
|
The account's notices
GET/api/v1/account/noticesscope read
What the caller's account shows until they have seen it, newest first: { notices: [ { id, kind, created, body, seen } ] }. kind is rebase (the shared base was refreshed; body.summary says what of theirs was carried over, body.clashes lists what was not carried as it was) or promotion (the admin took some of their work into the base; body.targets). None on a server without tenant copies.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The notices. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Mark a notice seen
POST/api/v1/account/notices/{id}/seenscope read
Marks one of the caller's notices seen. 404 for a notice that is not theirs.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The notice. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
The accounts (admin)
GET/api/v1/accountsscope admin partner-only
Every account, oldest first, with its settings, today's research budget use, its open jobs and live sessions; defaults the server's limits.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Accept an invite
POST/api/v1/accounts/acceptno key
From the invite's link: token (from the link's fragment), the account holder's name and a password (10 to 256 characters). Makes the account, its tenant (u-<random>) and the tenant's first API key (scopes read, evaluate, facts:write, amend), returned this once, and signs in: the answer sets the bayesian_session cookie. The password is kept only as its argon2id hash. 404 for an unknown invite, 400 for an expired one, 409 for a used one or an address with an account. Rate-limited per address.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
201 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
429 | application/json ErrorResponse |
|
Disable an account (admin)
POST/api/v1/accounts/{id}/disablescope admin partner-only
The account signs in no more: its sessions end and its tenant's keys are revoked. Your own account cannot be disabled (409). { account, revoked_keys }.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The account id ( |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
Set an account's limits (admin)
PUT/api/v1/accounts/{id}/settingsscope admin partner-only
The account's tenant's own limits: daily_fill (research sessions per UTC day), rate_per_minute (API requests), max_concurrent_jobs (queued or running at once). Each one absent or null leaves the server's default; all absent clears them. They hold for the tenant's keys and sessions together, from the next request.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The account id ( |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Request body (required)
application/json TenantSettings
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Amend knowledge
POST/api/v1/amendscope amend partner-only
Set a status (active, superseded, stale, retracted, erroneous), retract, restore or purge items, rules or definitions, with a reason; journaled. A key may amend only what its tenant wrote unless it has curate.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The amendment report. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Start a check
POST/api/v1/checksscope evaluate
Check a text, or a parse from an earlier job, in a domain: its claims judged against the knowledge base and the caller's facts. For si-building: the site's norms in force on as_of, their conditions applied to the project, a norm block per claim; with principles, a derivation per claim. Returns a job; the result lists questions the caller can answer with POST /api/v1/jobs/{id}/facts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Llm-Credential | header | string | Optional: an Anthropic API key used for this request's model calls only; never stored or logged. Luma does not send it: its checks run on the platform's key, and Luma charges its organisations from the job's |
X-Llm-Payer | header | Payer | Optional: who pays the model calls, recorded on the job's usage: |
Request body (required)
application/json CheckRequest
Responses
| Status | Body | Description |
|---|---|---|
202 | application/json JobAccepted | Accepted: the job is queued. Poll |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
429 | application/json ErrorResponse |
|
503 | application/json ErrorResponse |
|
What a municipality's plan holds
GET/api/v1/coveragescope read
Per planning unit (EUP) the knowledge base knows and per factor of the domain: the plan's norms in force on as_of (today by default) by review state (approved by a planner or the supplier, unvalidated as extracted or read), their articles, the cells with none (missing), and in_words_only: factors that want a number held there only in words. National acts are not counted. The curation backlog for a planner's review.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
municipality required | query | integer | The municipality's code (Juršinci: 42). |
as_of | query | string (date) | |
domain | query | string | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Your model credentials
GET/api/v1/credentialsscope evaluate
The model keys your tenant stored, as far as they can be read back: provider, fingerprint, last four characters, when checked, whether research may use them. Never the key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
503 | application/json ErrorResponse |
|
Bring your own model key
PUT/api/v1/credentials/{provider}scope evaluate
Store your own key for provider (anthropic): your tenant's checks then run on it, the payer user, research only with allow_research. Checked live once with the smallest call; a key the provider refuses is not stored (400). Kept sealed at rest, never logged or journaled; the answer names it by fingerprint and its last four characters. 503 when the server keeps no credentials.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
provider required | path | one of anthropic | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
503 | application/json ErrorResponse |
|
Remove your model key
DELETE/api/v1/credentials/{provider}scope evaluate
Your tenant's checks go back to the service's key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
provider required | path | string | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
List definitions
GET/api/v1/definitionsscope read
The definitions of a domain's concepts: analytic (with their composition and conditions, each with its provision) or operational; draft or accepted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain | query | string | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The definitions. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Define a concept
PUT/api/v1/definitions/{predicate}scope curate partner-only
Store a definition of a predicate (a new version when one exists), accepted; journaled.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
predicate required | path | string | The predicate key. |
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The definition stored. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Accept a draft definition
POST/api/v1/definitions/{predicate}/acceptscope curate partner-only
Mark the model's draft analysis of a predicate as reviewed and accepted; journaled.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
predicate required | path | string | The predicate key. |
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The definition accepted. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Store facts ahead of checks
POST/api/v1/factsscope facts:write
Store a card, plan acts and rules with their review states, or provision texts (each read into knowledge, its text kept verbatim) without a check. Journaled under the caller.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain | query | string | The domain profile the facts are kept under ( |
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Llm-Credential | header | string | Optional: an Anthropic API key used for this request's model calls only; never stored or logged. Luma does not send it: its checks run on the platform's key, and Luma charges its organisations from the job's |
X-Llm-Payer | header | Payer | Optional: who pays the model calls, recorded on the job's usage: |
Request body (required)
application/json Facts
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json FactsStored | What was stored. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
503 | application/json ErrorResponse |
|
Liveness
GET/api/v1/healthno key
200 while the process serves.
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | Alive: |
The journal
GET/api/v1/historyscope read
Every change to knowledge, newest first, with its sequence number, time, actor, targets and reason; filtered by subject, predicate or actor; tenant-scoped.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
subject | query | string | |
predicate | query | string | |
limit | query | integer | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The events. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
The invites (admin)
GET/api/v1/invitesscope admin partner-only
Every invite, newest first: its id (the first 8 hex digits of the token's hash), address, role, who made it, when it expires and whether it was used. Never a token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Invite someone (admin)
POST/api/v1/invitesscope admin partner-only
The demo is invite-only: make an invite for email with role (user by default, or admin) and get its link, <public URL>/accept#token=…, shown this once (the token is kept only as its SHA-256; it rides in the fragment, so no server or proxy logs it). Valid for 7 days, once. The server sends no e-mail: pass the link on yourself. 409 when the address has an account, or on a server that started open (no key, account or invite); then make the first invite with bayesian-admin accounts invite.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
201 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
List jobs
GET/api/v1/jobsscope read
The tenant's jobs, newest first; a key with an organisation sees its organisation's.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org | query | string | |
status | query | JobStatus | |
limit | query | integer | |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json JobList | The jobs. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Read a job
GET/api/v1/jobs/{id}scope read
Its status; when done, result (the compact evaluation), questions_open and run (build, parameters, knowledge-base revision, prompts, model, usage, seconds).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The job id. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json Job | The job. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Explain a claim
GET/api/v1/jobs/{id}/explain/{claim}scope read
The claim's argument in prose: the rules that decided, their evidence, what was set aside and why.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The job. |
claim required | path | string | The claim's position in |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The explanation: |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Answer a job's questions
POST/api/v1/jobs/{id}/factsscope facts:write
Supply facts that answer the job's questions (a norm for a factor, a provision's text with about copied from the question, a location card); a new job of kind investigate checks the same parse again with them.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The job asked. |
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Llm-Credential | header | string | Optional: an Anthropic API key used for this request's model calls only; never stored or logged. Luma does not send it: its checks run on the platform's key, and Luma charges its organisations from the job's |
X-Llm-Payer | header | Payer | Optional: who pays the model calls, recorded on the job's usage: |
Request body (required)
application/json JobFacts
Responses
| Status | Body | Description |
|---|---|---|
202 | application/json JobAccepted | Accepted: the job is queued. Poll |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
409 | application/json ErrorResponse |
|
429 | application/json ErrorResponse |
|
503 | application/json ErrorResponse |
|
Publish a job as a verdict
POST/api/v1/jobs/{id}/publishscope publish
A permanent verdict page with versions; a later check of the same text adds a version.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The job. |
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The verdict: |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
A permit check's document
GET/api/v1/jobs/{id}/reportscope read
From a finished check that carried the permit root (principles: true; 409 otherwise, never a guessed grouping): kind=dopolnitev, the open items under the GZ-1, 54. člen condition each blocks, with the provision that requires it; kind=obrazlozitev, per condition what was established (with its grounding), the provision applied as in force on the day, the norms set aside and the finding. framing=pre_assessment (the default; authority_draft only for an authority's key) titles it as a pre-assessment that needs professional sign-off, never an administrative act. lang sl or en; text=1 adds the Markdown rendering. Provision references carry rule_id and source_rule as considered[] does. No model call: the render cache's renderings in lang are used, the rest stays as written (untranslated).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The job. |
kind required | query | one of dopolnitev, obrazlozitev | |
lang | query | one of sl, en | |
framing | query | one of pre_assessment, authority_draft | |
text | query | string |
|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The report: |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Metrics
GET/api/v1/metricsscope admin partner-only
Prometheus text: jobs by status, seconds per job, model calls, tokens, errors by code. Cluster-internal, or a key with admin.
Responses
| Status | Body | Description |
|---|---|---|
200 | text/plain string | Prometheus exposition format. |
Review norms
POST/api/v1/norms/statescope curate partner-only
A planner's review of norms (approved, corrected with the ways, rejected), so it reaches their weights: approved and corrected count 0.95, unvalidated 0.7; a rejected norm is withdrawn. Journaled with the reason.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | A caller's key for a POST that creates work: the same key returns the same job; the same key with a different body is 409 |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body (required)
application/json NormState
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | What changed: |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
The contract
GET/api/v1/openapi.jsonno key
This document as JSON.
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The OpenAPI 3.1 document. |
Readiness
GET/api/v1/readyno key
200 when the store is reachable, the knowledge base loaded and the model backend configured; 503 otherwise, with the problems.
Responses
The current session
GET/api/v1/sessionsno key
{ signed_in: true, account } for a live session cookie, else { signed_in: false, accounts } (accounts: whether this server signs in at all). Never an error.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
Sign in
POST/api/v1/sessionsno key
email and password; sets the bayesian_session cookie (HttpOnly, Secure, SameSite=Lax, Path=/; 14 days from its last use) and ends the session the browser had. 401 for a wrong address or password (the same answer for both), 403 for a disabled account; rate-limited per address and per e-mail address (429). A cookie is a second way to authenticate beside a key: a write it signs (POST, PUT, DELETE) needs X-Requested-With: bayesian or a same-origin Origin, or it is refused (403).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
429 | application/json ErrorResponse |
|
Sign out
DELETE/api/v1/sessionsno key
Ends the session of the cookie sent and clears the cookie. { signed_out }: whether there was a live session.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
X-Requested-With | header | one of bayesian |
|
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
The tenants' copies
GET/api/v1/tenantsscope admin partner-only
With tenant copies on (BAYESIAN_TENANT_STORES, the demo instance), every tenant reads and writes its own copy of the base, made from it on first use. Lists the copies (tenant, location, created, the base revision it was made from or last rebased on) and the engines in memory (loaded, cap, engine_mb, reckoned_mb, evictions). 404 without tenant copies.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Rebase the tenants' copies
POST/api/v1/tenants/rebasescope admin partner-only
After the base was refreshed: each copy (or the one tenant names) becomes the base as it is now, with everything its tenant wrote carried over: its terms, rules, items, definitions, choice points and contexts, the statuses it set on the base's items, and its gaps. Where both hold the same thing the base wins: a term or choice point of the base's stays and the tenant's is listed as a clash; a rule the base also has gets the tenant's items beside its own; a definition that rivals the base's accepted one comes as a draft beside it. One journaled change (rebase) per copy; each tenant gets a notice.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Promote a tenant's work into the base
POST/api/v1/tenants/{tenant}/promotescope admin partner-only
Takes what targets name in the tenant's copy into the base (rule:<id>: the rule, or the items of it the base lacks; ev:<id>: one item; term:<id>; def:<predicate>), with a rule's class and a term's parents when the base lacks them. The items keep their provenance (who wrote them, in which tenant's copy) and get ids of the base; the promotion is journaled as the admin's (promote) with the reason. The tenant gets a notice. 400 when a target is not in the copy.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tenant required | path | string | The tenant. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Request body (required)
application/json object
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
What a tenant wrote
GET/api/v1/tenants/{tenant}/writesscope admin partner-only
What the tenant wrote in its copy, by kind (rules, items, terms, definitions): the picking list for a promotion (rule:<id>, ev:<id>, term:<id>, def:<predicate>).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tenant required | path | string | The tenant. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object |
|
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Read a verdict
GET/api/v1/verdicts/{id}scope read
The published verdict, its latest version.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The verdict. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The verdict. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
A verdict's changes
GET/api/v1/verdicts/{id}/changesscope read
What changed between its versions and why (the journal's entries that changed its rules).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The verdict. |
X-Request-Id | header | string | Echoed in the response and logged; generated when absent. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json object | The changes. |
400 | application/json ErrorResponse |
|
401 | application/json ErrorResponse |
|
403 | application/json ErrorResponse |
|
404 | application/json ErrorResponse |
|
Schemas
Account
An account as anyone may read it back: never its password.
| Field | Type | Description |
|---|---|---|
created required | string | |
disabled | string or null | When it was disabled; a disabled account signs in no more. |
email required | string | Lowercased; unique. |
id required | string |
|
key | string or null | The fingerprint of its current API key: what its sessions act as. |
name required | string | |
role required | Role | |
tenant required | string |
|
Applies
Whether the norm applies to the claim.
Type: one of yes, no, unclear
AsOf
The day a permit check is judged as of: the application's filing date, else the documentation's date (an assumption). Later changes to the acts are flagged on the verdict but never decide it.
| Field | Type | Description |
|---|---|---|
basis required | AsOfBasis | |
date required | string | ISO date ( |
AsOfBasis
Why a permit check is judged as of its day.
One of:
"filing"The day the application was filed: the law in force then decides.
"document"The documentation's own date, the filing date being unknown: an assumption.
"today"Today, neither the filing date nor the documentation's date being known: an assumption.
Assumption
One choice point at one value: what a rule, evidence item, definition or claim assumes, and what a context fixes.
| Field | Type | Description |
|---|---|---|
point required | string | The choice point's id ( |
value required | string | One of its values ( |
AssumptionHow
How a verdict used a choice point.
One of:
"fixed"The context (a named or explicit one, the text's own premises, a forced default) or the claim's own condition fixes the value: its rules decide and the other values' rules are left out.
"marginalised"Not fixed: the verdict is the prior-weighted mixture over the point's values; the value listed is the default, with its prior.
"decisive_by_evidence"Not fixed and mixed, but every value of the point gives the same label: the evidence decides whichever value holds.
AssumptionUse
A choice point a verdict rests on: "assumes genocide_definition = convention_intent (marginalised, prior 0.70)".
| Field | Type | Description |
|---|---|---|
how required | AssumptionHow | |
point required | string | |
prior required | number (double) | The value's prior. |
value required | string | The value fixed; for a marginalised point, its default. |
where | array of string | Where the assumption enters the chain: rule ids, |
Basis
What a decision rests on.
One of:
"statute"A provision's own words, quoted.
"supplied"The project's facts as its documentation states them, or the place as given.
"assumption"Nothing given decides it: the usual case, to be confirmed.
Bound
How a claimed quantity is meant: a threshold or requirement ("the required 40,000 signatures", "at least"), a ceiling ("up to"), or an approximation ("about 1,000").
Type: one of at_least, at_most, about
Callback
A URL to call when a job finishes, with the secret its body is signed with.
| Field | Type | Description |
|---|---|---|
secret required | string | The HMAC-SHA256 key of |
url required | string |
CallbackDelivery
A callback's delivery: tried attempts times, the receiver's last answer.
| Field | Type | Description |
|---|---|---|
at | string or null | |
attempts required | integer (uint32) | |
delivered required | boolean | |
id required | string |
|
last | string or null | The receiver's last status, or why no answer came. |
CallbackPayload
The body of a callback (POST callback.url).
| Field | Type | Description |
|---|---|---|
job_id required | string | |
result_url required | string | Where the job is read: |
status required | JobStatus |
CardAct
An act in force at the place.
| Field | Type | Description |
|---|---|---|
key | string or null | |
kind | string or null | |
name required | string | |
status | string or null | |
url | string or null |
CardMunicipality
| Field | Type | Description |
|---|---|---|
code required | integer (uint32) | The municipality's register code (RPE: 190 for Žalec). |
name required | string |
CardParcel
| Field | Type | Description |
|---|---|---|
area_m2 | number (double) or null | |
ko required | integer (uint32) | |
parcel required | string |
CarryReport
What a carry did.
| Field | Type | Description |
|---|---|---|
choices | array of string | Choice points and contexts carried. |
clashes | array of string | What was not carried as it was, one line each. |
definitions | array of string | Definitions carried, by predicate. |
items | array of array of any | Items carried: (rule, id there, id here). |
lookups required | integer (uint) | Gaps, sources, aliases and glosses carried (a rebase only). |
rules | array of string | Rules carried whole (they were not here). |
statuses | array of string | Statuses set on items both hold: the item ids. |
terms | array of string |
CaseCondition
A condition of the single case that a statement about a kind leaves out.
| Field | Type | Description |
|---|---|---|
condition required | string | The condition: a rule's condition term, or an analysis's condition (its predicate). |
provision | string or null | The provision that sets it ("ZON, 104. člen, (1)"). |
words required | string | In words: the term's gloss, or the condition's description. |
CheckRequest
POST /api/v1/checks: check a text (or a stored parse) in a domain.
| Field | Type | Description |
|---|---|---|
analysis_depth | integer (uint) or null | How many levels of analysis below a claim (default 3). |
as_of | AsOf or null | The day the check is judged as of and why (the filing date, else the documentation's date). |
callback | Callback or null | |
context | ContextSpec or null | A context fixing choice points (a named interpretation). |
domain required | string | The domain profile: |
facts | Facts or null | The caller's facts: the location card, plan acts and rules with their review states, provision texts. |
fill_gaps | integer (uint) or null | Web research sessions; 0, the default (si-building's knowledge comes from the caller). The service's model backend has no web tools: a value above 0 is answered |
label | string or null | A label for the caller (a project id). |
lang | string or null | The language of the result's prose ( |
org | string or null | The caller's organisation: the job, its verdict and what it derives about the project are scoped to it. |
parsed | ParsedStatement or null | A parse returned by an earlier job ( |
principles | boolean | Reason from first principles: concepts analysed into their conditions, a derivation per claim. |
site | PlaceSpec or null | The site, when the caller does not supply its card in |
text | string or null | The text to check: a DGD's relevant parts, a statement. One of |
ChoiceKind
What a choice point chooses between.
One of:
"definition"Which definition of a contested concept ("genocide": the Convention's intent requirement, or any grave war crime).
"reading"Which reading of a text or doctrine (Kant's idealism: two aspects or two worlds).
"proposition"Whether a substantive premise holds ("synthetic a priori judgments exist": yes or no).
ChoicePoint
A choice the evidence does not settle, with its values.
| Field | Type | Description |
|---|---|---|
default | string | The value the default context assumes. Absent when proposing a point: the value with the highest prior. |
draft | boolean | Proposed (by the parser from a text's premise, or by operationalize for a contested predicate) and not yet accepted: listed, never used in a verdict. |
forced | boolean | The default context fixes the point at its default value (a legal default that applies unless a context says otherwise) instead of marginalising over the values by prior. |
gloss | string or object | What is being chosen, in one line. |
id required | string | snake_case id ( |
kind | ChoiceKind | |
values required | array of ChoiceValue | Mutually exclusive and exhaustive values, each with a prior. |
ChoiceValue
One value of a choice point.
| Field | Type | Description |
|---|---|---|
basis | string or null | Where the prior comes from: "scholarly acceptance, SEP 2024", "legal default", "stated". |
gloss | string or object | What the value means, in one line. |
id required | string | snake_case id, unique within the point ( |
prior required | number (double) | Prior probability that this value is the right one (0 to 1). The priors of a point are normalised to sum to 1 when it is stored. |
Claim
| Field | Type | Description |
|---|---|---|
assumes | array of Assumption | The values of known choice points (listed under "Known choice points") this claim is made under, when the text attaches one to it ("under the Convention's definition, …"). Omit otherwise. On ingest the claim's evidence counts only under these values; in evaluation they are fixed only in the text's own context. |
attributed_to | string or null | For an attribution: term id of who said or believes it. |
bound | Bound or null | For a quantity in the object: whether it is a bound or an approximation rather than an exact value. |
conditions | array of string | Context ids under which the statement is made, e.g. |
dated | string or null | The day the text was read (ISO date), from [ |
depends_on | array of Dependency | Other claims of this text this one leans on. |
force | Force | |
framing | Framing or null | Set only when the wording frames the referent in a misleading way. |
kind | ClaimKind | |
null_result | boolean | The statement reports that no significant effect or difference was found ("no significant reduction in stroke"): absence of evidence of an effect, not evidence that there is none. Encode with positive=false. |
object | string or null | Object or value of the predicate when it has one, e.g. |
place | string or null | Where the claim holds: ISO country code ( |
positive | boolean | false when the statement denies the proposition ("mammals do not lay eggs"). |
predicate required | string | snake_case predicate, e.g. |
public_act | boolean | The claim is that a public act took place: something was published, posted, said or announced in public, a vote cast, a document signed or filed. The act's own record (the post, the transcript, the voting record) settles it, whatever the act's content says. |
quantifier | string or null | The hedge or quantity as written: "most", "rarely", "70%", "always". |
self_reference | boolean | The claim is about the text itself or what its author does in it: its structure and sections ("this paper has three sections", "section two addresses …"), its aim, scope or method ("I am concerned with …", "I do not examine …"). The text settles it, not outside sources, so it is not researched. Not for what the text says about the world: "in section two I show that X causes Y" is the claim that X causes Y, without this flag. |
subject required | string | Term id of the subject in its resolved sense (an existing KB term id, or the id of a term proposed alongside the claim). |
text | string or null | The span of the original text this claim came from. |
time | TimeScope or null | The period the claim is about; none means the day the text was read ( |
timeless | boolean or null | Whether the claim's truth is independent of the date it is judged on (an interpretation, a definition, who first did something), so a newer source is another reading, not an update. Omitted: an attribution or evaluation is timeless, any other kind is not. |
value | Quantity or null | A number the claim states, with its unit (FZ 0.35 → 0.35 ratio; 9 m). |
ClaimKind
What sort of statement the author is making; decides how a missing verdict should be read.
One of:
"fact"Something that is or was the case and could be checked.
"prediction"About the future: "the party will get 3-4%".
"attribution"The author reports what someone else said or believes (see
attributed_to); the claim is the reported content."evaluation"The author's judgement: "a disastrous policy", "the best candidate".
"insinuation"Implied but not stated: suggested motives, loaded juxtapositions. The claim is the implied proposition.
"sentiment"A feeling or attitude: "I'm so glad it's out", "she is frustrated".
"hypothetical"Conditional or counterfactual: "if the law passes, prices will rise", "had they acted sooner, …". Not researched as a fact.
CompactClaim
One claim's verdict, without argument trees or glosses.
| Field | Type | Description |
|---|---|---|
alternatives | array of ContextVerdict | Under other readings: the verdict with one of those points at one of its values, each with its prior (not equally valid alternatives). |
assumptions | array of AssumptionUse | The choice points the verdict above rests on, anywhere in its chain: "genocide_definition = convention_intent (marginalised, prior 0.70)", with where each enters. The verdict above is the headline. |
conditions | array of string | Conditions beyond the document setting. |
definition | string or null | For an operationalised evaluation: the definition used. |
domain | string or null | The domain the claim was evaluated under. |
flags | array of string | |
force required | Force | |
framing | CompactFraming or null | |
indicators | array of CompactIndicator | For an operationalised evaluation: each indicator's verdict. |
kind required | ClaimKind | |
label required | string | Overall label; "misleading" / "possibly misleading" for framed claims. |
literal_label | string or null | How true the literal words are, when framing changed the overall label. |
local | LocalClaim or null | The claim in the request language when it is not English: the label, how it is shown, its flags and assumptions through the vocabulary, the subject's gloss and the predicate's reading through the render cache. |
norm | NormResult or null | For a claimed value at a site: the norm in force it was compared with ([ |
null_result | boolean | The claim reports that no significant effect was found (absence of evidence). |
only_if | array of CaseCondition | For a statement about a kind: the conditions of the single case it leaves out, under which it was judged (a universal statement is false for leaving them out). |
opinion required | array of number (double) | [belief, disbelief, uncertainty] |
params required | string | Fingerprint of the parameter set that produced the verdict. |
positive required | boolean | |
predicate required | string | Canonical predicate key as evaluated. |
probability required | number (double) | |
public_act | boolean | The claim is that a public act took place (a post published, a statement made, a vote cast), checkable from the act's own record. |
root | boolean | The domain's root claim (si-building: that the permit may be issued), which a first-principles check adds: its conditions are its |
rules required | array of string | Rules that decided the verdict. |
self_reference | boolean | The claim is about the text itself (its sections, what its author does in it): judged on no evidence, not researched, not a decided fact. |
shown required | Shown | How to show the verdict to people: "verified" when the evidence is beyond reasonable doubt (with the basis), otherwise the label with a rounded probability. |
subject required | string | |
text | string or null | |
time | string or null | Period the claim is about, e.g. "2026", "1970–"; absent means now. |
unless | array of CaseCondition | For a statement about a kind: the exceptions for the single case it leaves out, presumed not to apply. |
CompactEvaluation
The compact result of evaluate_statement: one entry per claim.
| Field | Type | Description |
|---|---|---|
added_terms | array of string | |
claims required | array of CompactClaim | |
context | string or null | The context the claims were judged in when not the default ("legal", "text_own", "genocide_definition = broad_war_crimes"). |
contradictions | array of Contradiction | Pairs of the text's claims that cannot both be right as judged (a blanket compliance statement against a value that likely fails the act's norm; a conclusion judged false from a premise that holds), also flagged on both claims ([ |
derivations | array of Derivation | First principles: one derivation per claim, at claim i's position ([ |
filled | array of string | With fill_gaps: what each fill did, "subject predicate: outcome" (including failures). |
framing_checked | boolean | Whether the framing review ran and succeeded; without it, framings are the fast pass's guesses. |
gaps | array of string | "subject predicate (reason)" for each gap still open. |
lang | string or null | The language the request is answered in (ISO 639-1): the one asked for, else the text's own. Labels and flags in |
marked_individual | array of string | |
notes | array of string | What is normal but worth saying, unlike a warning (a corpus without structured rules: the site's norms are read from the plan's articles). |
premises | array of PremiseProposal | Premises the text states (not claims): the known choice point and value each fixes, or a proposed point. |
questions | array of Question | What the evaluation could not settle and what would settle it: a site to locate, a norm for a factor at a site, a provision or record for a statement ([ |
setting | array of string | Context terms that scope the whole text; applied to every claim. |
stats required | TextStats | |
summary required | map of integer (uint) | Claim count per label, e.g. {"likely true": 12, "insufficient evidence": 30}. |
summary_local | map of integer (uint) |
|
warnings | array of string | Coverage problems: parts of the text that could not be parsed, dropped stub claims. |
CompactFraming
| Field | Type | Description |
|---|---|---|
agreement | string or null | How many framing reviews flagged it, e.g. "1/2". |
kind required | FramingKind | |
reason required | string | |
standard | string or null | |
standard_label | string or null | Verdict on the standard characterisation, when it was encoded. |
CompactIndicator
| Field | Type | Description |
|---|---|---|
description | string or object or null | What it measures and why it bears on the evaluation. |
hedge | string or null | The indicator's verdict rests on evidence about a body the subject belongs to, or inferred, only: the "collective evidence only" flag. |
id required | string | |
label required | string | |
measurement | string or null | |
predicate required | string | |
probability required | number (double) | |
sampled | array of SampledItem | For a measured indicator: the sampled items behind its deciding rule (titles as published, the original first). |
supports required | boolean | |
validity required | number (double) |
ConditionCheck
A norm condition's decision as the norm block shows it.
| Field | Type | Description |
|---|---|---|
basis | Basis or null | |
cite | string | What decides it, as cited, and its words. |
condition required | string | The condition, in the provision's words. |
holds | boolean or null | Whether it holds (none: the reader could not tell). |
norm required | string | The norm rule whose condition it is. |
quote | string | |
reason required | string | |
rule required | string | The rule holding the decision. |
Confidence
Type: one of high, medium, low
ContextSpec
The context to evaluate in. As JSON: "default", a context id ("legal"), "text_own", a list of assumptions, or the tagged forms {"named": "legal"}, {"explicit": [{"point": …, "value": …}]}.
One of:
- object
A named context (
kb.contexts), ordefault: every point at its default, marginalised unless the default is forced.Field Type Description namedrequiredstring - object
These assumptions, at most one per point.
Field Type Description explicitrequiredarray of Assumption "text_own"The text's own stated premises, resolved to known choice points (
ParsedStatement.premises), and each claim's ownassumes.
ContextVerdict
The verdict with one choice point fixed at one value (Verdict.alternatives).
| Field | Type | Description |
|---|---|---|
assumptions required | array of Assumption | The assumptions this alternative fixes: the context's, with the point in question at the value in question. |
delta required | number (double) | Probability minus the headline's. |
label required | string | |
point required | string | The choice point varied and its value. |
prior required | number (double) | The value's prior: how much the alternative counts for. |
probability required | number (double) | |
shown | string | How it is shown ("likely true, 0.82", "verified"). |
value required | string |
Contradiction
Two claims of one text that cannot both be right as judged.
| Field | Type | Description |
|---|---|---|
claims required | array of integer (uint) | Their positions in the text's claims, from 0: the general claim or the premise first. |
kind required | ContradictionKind | |
note required | string | The pair in words, as both claims' flags give it. |
ContradictionKind
One of:
"blanket_compliance"The text states that the project complies with an act, and a value it gives likely fails one of that act's norms.
"does_not_follow"The text concludes one claim from another (
derives): the premise holds, the conclusion is judged false.
DefinitionNature
Where a definition's conditions come from.
One of:
"operational"Indicators chosen as observable proxies for the evaluation (
operationalize): a measurement methodology."analytic"The concept's defining conditions from its authoritative sources (scholarship, law, lexicography), as first-principles reasoning analyses them (
first_principles, theanalyseprompt).
Dependency
Another claim of the same text that this one leans on.
| Field | Type | Description |
|---|---|---|
claim required | integer (uint) | The other claim's position in |
relation required | Relation |
Derivation
One claim's derivation from first principles.
| Field | Type | Description |
|---|---|---|
claim required | integer (uint) | The claim's position in the text's claims. |
depth required | integer (uint) | Levels of analysis below the claim (0: not analysed). |
grounds | array of Ground | The leaves settled by evidence, in tree order. |
judgements | array of string | Concept-laden conditions left unanalysed, "subject predicate". |
negated | boolean | The claim denies its predicate ("projektni pogoji niso upravni akti"): the tree analyses the predicate, and the claim holds when it does not. |
open | array of string | Leaves nothing decides yet, "subject predicate". |
presumptions | array of string | What the derivation presumes or assumes without evidence: each presumption of a provision it rests on (holds unless shown otherwise) and each condition a reader took as holding for want of a fact. |
rendering required | string | The derivation as indented text. |
reviews | array of string | Draft analyses to review: a necessary condition the statute itself decides does not hold, so the analysis, not the claim, may be wrong. |
root required | DerivationNode | |
stipulations | array of AssumptionUse | The choice points the derivation rests on (which definition, which reading). |
text | string or null |
DerivationDefinition
The definition an analysed node used.
| Field | Type | Description |
|---|---|---|
basis | array of string or object | The sources the definition rests on. |
composition required | string | "all conditions must hold", "at least 2 of 4 conditions must hold", … |
draft required | boolean | |
label required | string | "'is_fascist' v1 (draft, analysis)". |
nature required | DefinitionNature |
DerivationNode
One node of a derivation: the claim, or a condition at any depth.
| Field | Type | Description |
|---|---|---|
children | array of DerivationNode | |
definition | DerivationDefinition or null | For an analysed node: the definition and composition used. |
direct | Grounding or null | For an analysed node that rules on the claim itself also decide: what grounds them. The verdict fuses them with the analysis, so it can stand while the conditions are open. |
flags | array of string | The node's own flags worth a reader's eye: an undefined concept, a cycle, a draft definition. |
grounding required | Grounding | |
kind | ClaimKind or null | For a condition: |
label required | string | |
predicate required | string | |
probability required | number (double) | |
provision | string or null | For a condition: the provision it rests on, as the definition names it. |
shown required | string | How the node is shown ("verified", "likely true, 0.89"). |
sources | array of string | For a ground, or an analysed node's direct rules: the deciding evidence, "kind: source (date)". |
subject required | string | |
supports | boolean or null | For a condition: whether it counts toward the concept applying (true) or against it (a disqualifier, false). |
DocumentInfo
A document of a corpus: an act with its versions.
| Field | Type | Description |
|---|---|---|
cite_as required | string | The act's name inside a citation ("GZ-1", "Odlok o OPN Občine Žalec"). |
id required | string | The corpus's key ( |
kind required | DocumentKind | |
municipality | integer (uint32) or null | The municipality of a municipal act (RPE code); none for national acts. |
publication | string or null | The gazette line ("Uradni list RS, št. 64/13"). |
role | string or null | A municipal act's role: |
title required | string | |
url | string or null | |
versions | array of VersionInfo | Oldest first. |
DocumentKind
What kind of text a document is.
One of:
- one of
other "statute"A statute (zakon).
"regulation"A government decree or ministerial rule (uredba, pravilnik).
"plan"A municipal spatial plan or another act of a municipality (OPN, OPPN, odlok).
DocumentationStage
The stage of the project documentation (Pravilnik o projektni in drugi dokumentaciji).
One of:
"dpp"Dokumentacija za pridobitev projektnih in drugih pogojev.
"dgd"Dokumentacija za pridobitev gradbenega dovoljenja.
"pzi"Projekt za izvedbo.
"pid"Projekt izvedenih del.
ErrorBody
The error envelope's body.
| Field | Type | Description |
|---|---|---|
code required | ErrorCode | |
details | any | |
message required | string |
ErrorCode
An error's code.
One of:
"unauthorized"No key, or one that is unknown or revoked: 401.
"forbidden_scope"The key lacks the route's scope: 403.
"tenant_mismatch"The resource belongs to another tenant or organisation: 404 to the caller, logged as this.
"invalid_request"The body or a parameter is invalid: 400.
"idempotency_conflict"The same
Idempotency-Keywith a different body: 409."budget_exceeded"The tenant's daily model budget is spent: 429.
"rate_limited"Too many requests: 429, with
Retry-After."model_unavailable"The model refused (a session or usage limit, no credential): 503; nothing was stored.
"kb_schema_newer"The store was written by a newer build: 503 until the service is upgraded.
"not_found"404.
"interrupted"A job that was running when its process stopped: check again (a failed job's error).
"internal"Anything else that went wrong on the service's side: 500.
"shutting_down"The service is shutting down and takes no new work: 503; retry (another replica takes it).
ErrorResponse
Every error response: { "error": { "code", "message", "details"? } }.
| Field | Type | Description |
|---|---|---|
error required | ErrorBody |
EvidenceKind
One of:
- one of
meta_analysis,study,expert,report,anecdote "proven"A proof, a settled theorem, a definition: contradicting it needs a lot.
"official_record"Official records: registries, election results, court filings, statistics offices.
"measurement"A measured or published value with its tolerance: an instrument reading, a standard, a value ± error. Judged against a claimed quantity by its interval (see [
Evidence::measured_value])."llm_recall"What a language model recalled when asked; cheap, unsourced, to be corroborated or contradicted by real sources later.
ExtractionState
A planner's review of an extracted rule.
One of:
- one of
approved,corrected "unvalidated"Extracted by a model, not reviewed:
corpus.extracted_rule_reliability.unvalidated."rejected"Wrong: never ingested.
"read"Read from the provision by the model during a check, for one claim, its quoted words checked against the provision:
…reliability.read.
Facts
What a caller supplies to an evaluation.
| Field | Type | Description |
|---|---|---|
as_of | AsOf or null | The day the check is judged as of and why: the filing date, else the documentation's date (an assumption). Every claim about the site is judged as of it; later versions of an act are flagged, never decide. |
documents | array of DocumentInfo | The acts the norms come from, with their versions (validity, status). A norm whose document is not listed gets a document made from its locus (current version, valid from the norm's version's day unknown). |
luma_location | any | Luma's own answer to |
luma_plan_acts | any | Luma's answer to |
luma_plan_rules | any | Luma's answer to |
norms | array of StructuredRule | The plan's rules as structured norms: factor, operator, value, unit, condition, the requirement verbatim, its locus (act, version, article, paragraph, citation, link) and review state. |
org | string or null | The organisation the project belongs to: what is derived from its facts (the reader's decisions on the site, the norm comparisons, the rules read from its records) holds under |
procedure | Procedure or null | The procedure the check is for (act, instrument, documentation stage, where the caller has it from): a project fact for the reader that applies provisions to the project, an assumption when from a profile. |
site_card | PlaceCard or null | The site's location card: municipality, parcels, planning units (EUP, PEUP, land use, share), regimes, acts in force, as of a date, with its |
sources | array of SourceText | Provision texts and records, ingested before the check (one model call each). |
supplier | string or null | Who supplies them ("Luma Intelligence"), for the journal and the notes. |
FactsStored
POST /api/v1/facts: what was stored.
| Field | Type | Description |
|---|---|---|
stored required | array of string | One line per thing stored (a card, the norms of an act, a source read). |
warnings | array of string |
Force
What kind of statement a claim is; decides how ingestion stores it.
One of:
"generic""Mammals don't lay eggs": a default about a class, exceptions allowed.
"universal""All mammals have hair": claimed without exception.
"statistical""70% of consumers compare prices": a frequency in a population.
"particular""This platypus laid an egg", "Apple's revenue fell": about one instance or event.
Framing
The parser's account of a non-neutral framing.
| Field | Type | Description |
|---|---|---|
kind required | FramingKind | |
reason required | string | One line: why the wording misleads. |
standard | string or null | How the referent is standardly characterised, in plain words ("the siege and sack of Baghdad by Hülegü's army, 1258"). |
standard_claim | Claim or null | The standard characterisation encoded as a claim, so the knowledge base can check it (subject mongols, predicate sacked, object baghdad). |
FramingKind
How a claim frames what it describes. A claim can be literally true and still mislead through its framing.
One of:
- one of
neutral,correlation_as_causation,biased_sample "euphemism"Sanitised wording for something worse ("expanded business operations" for a massacre).
"dysphemism"Loaded wording for something milder.
"category_error"Describes the referent as a kind of thing it is not.
"cherry_pick"A selected window or subset that reverses or exaggerates the overall picture.
"relative_risk_without_base_rate""Doubles the risk" without saying the risk is 1 in 10,000.
"misleading_implicature"True words that invite a false inference.
Ground
A leaf of the derivation settled by evidence.
| Field | Type | Description |
|---|---|---|
grounding required | Grounding | |
label required | string | |
predicate required | string | |
probability required | number (double) | |
sources | array of string | |
subject required | string |
Grounding
What settles a node of a derivation.
One of:
"analysis"Composed from the conditions of a definition (the node's children).
"statute"Decided by a provision's own text: a statute's, regulation's or plan's article (an item with a corpus locus, or an official record citing an article).
"supplied"Decided by a fact the caller supplied (a location card, a record), with its source and date.
"record"Decided by an official record or a proof.
"measurement"Decided by a measurement: a counted sample or a value with its tolerance.
"stated"A project's value as the applicant states it in the documentation, compared with the norm: the requirement is the statute's, the value is neither measured nor recorded.
"sources"Decided by sources: studies, expert statements, reports.
"recall"Decided by model recall only.
"presumption"Held by a presumption of the provision ("until the special acts are aligned"): it holds unless evidence rebuts it.
"assumption"A reader applied a provision to the project and found nothing that decides it: taken as holding, an assumption to confirm.
"judgement"A concept-laden condition left unanalysed: the leaf is a judgement, not a checked fact.
"open"Nothing decides it yet: an open gap.
InviteView
An invite as the admin reads it back: never its token.
| Field | Type | Description |
|---|---|---|
account | string or null | |
created required | string | |
created_by required | string | Who made it: an account id, |
email required | string | |
expires required | string | |
id required | string | The first 8 hex digits of the token's SHA-256. |
role required | Role | |
used | string or null | When it was accepted, and the account it made. |
Job
GET /api/v1/jobs/{id}.
| Field | Type | Description |
|---|---|---|
callback | CallbackDelivery or null | What became of the callback the job asked for, once it was tried. |
created required | string | |
error | ErrorBody or null | Why a failed job failed. |
finished | string or null | |
job_id required | string | |
kind required | JobKind | |
label | string or null | |
org | string or null | |
parent | string or null | The job whose questions this one answers. |
questions_open | integer (uint) | How many of |
result | CompactEvaluation or null | The compact evaluation: claims with labels, norm blocks with |
run | RunInfo or null | |
started | string or null | |
status required | JobStatus |
JobAccepted
The answer to a POST that creates work: 202.
| Field | Type | Description |
|---|---|---|
estimate_seconds | number (double) or null | Seconds the job is expected to take, when known. |
job_id required | string | |
status required | JobStatus |
JobFacts
POST /api/v1/jobs/{id}/facts: answer a job's questions; a new job of kind investigate.
JobKind
What a job does.
One of:
"check"A check of a text or a parse.
"investigate"A check again with the caller's answers to its questions (
parentis the job asked).
JobStatus
A job's state.
Type: one of queued, running, done, failed
LocalClaim
One claim as a reader of the request language sees it ([localize]).
| Field | Type | Description |
|---|---|---|
alternatives | array of string | |
assumptions | array of string | |
flags | array of string | |
gloss | string or null | What the subject term means. |
label required | string | |
lang required | string | |
literal_label | string or null | |
norm | LocalNorm or null | |
reading | string or null | The predicate key in words. |
shown required | string |
LocalNorm
A claim's norm as a reader of the request language sees it.
| Field | Type | Description |
|---|---|---|
applies required | string | |
applies_reason required | string | |
assumptions | array of string | |
cite_as required | string | |
cite_as_beside | string or null | |
conditions | array of string | |
requirement required | string | The requirement as a reader of the language sees it: verbatim when the corpus writes in that language; for an English reader the English rendering; for anyone else the original (never a translation alone). |
requirement_beside | string or null | What is shown beside it: the original (English reader), the English (a reader of a third language), none (the corpus's language). |
review | string or null | |
state | string or null | |
status required | string | |
status_text | string | The status in a reviewer's words ("izpolnjuje le, če: (a) …"). |
Locus
Where a piece of evidence stands in an authoritative text. Generic: a statute's article and paragraph, a plan's annex row, later a page of a philosophical work (A/B pagination) in the same fields.
| Field | Type | Description |
|---|---|---|
cite_as required | string or object | The citation as a reader expects it ("2. odstavek 75. člena Odloka …"): the original in the corpus language, with its English rendering once made ("Article 75(2) of the … Decree"). |
corpus required | string | The corpus it came from ( |
document required | string | The document's key ( |
domain | string or null | The domain profile the item was ingested under, whose reliabilities override |
item | string or null | A row inside the unit: an annex row's unit code ( |
paragraph | string or null | The paragraph ("(2)" → |
state | ExtractionState or null | For a rule extracted by a model: its review state (none: the provision's own text, a statute at |
support | Support or null | For an extracted rule: how its words were found in the provision. |
unit required | string | The unit as the corpus numbers it ( |
url | string or null | |
version required | string | The version cited ( |
MeasuredValue
A measured value: the number, its unit and its tolerance (± in the unit).
| Field | Type | Description |
|---|---|---|
tolerance | number (double) or null | |
unit | string or null | |
value required | number (double) |
NormDecision
What became of a norm considered for a claim ([NormLine::decision]).
One of:
"decisive"It decides (with others at the same specificity, the weakest reading).
"overridden"A more specific norm decides.
"not_in_force"Its period does not cover the check's day.
"never_law"A draft or an unofficial text.
"other_subject"It is about another subject than the claim's.
"implausible"Its number cannot be a requirement on the factor: read for another element.
"not_its_case"Its condition does not hold for the project, as a reader decided it.
"condition_undecided"Its condition is not decided for the project; norms whose conditions hold decide as well or stricter, so it would apply only if it holds.
"does_not_apply"A reader found it does not apply to the claim (a ban on changing use, read for a new building).
"other"Another reason, in
status(and a line stored before this field).
NormLine
One norm that was considered for the claim.
| Field | Type | Description |
|---|---|---|
cite_as required | string or object | Text in English as a plain string. Only when it quotes or reproduces a source written in another language: an object with the original in |
decision | NormDecision | What became of it, for a machine ([ |
outcome required | string | meets, violates, within tolerance, needs comparison, … |
required required | string | |
requirement required | string or object | Text in English as a plain string. Only when it quotes or reproduces a source written in another language: an object with the original in |
rule required | string | |
share required | number (double) | |
source_rule | string or null | The corpus's own id of the structured rule it was read from (Luma's rule id). |
status required | string | decisive, overridden (a more specific norm decides), not in force, draft, not applicable. |
zone required | string | The zone it was considered for, and the site's share in it. |
NormResult
The norm block of a verdict ([Verdict::norm]).
| Field | Type | Description |
|---|---|---|
applies required | Applies | |
applies_reason required | string or object | Why the norm applies or may not: written by the engine, so English is its original (shown in other languages through the vocabulary). |
as_of required | string | The day the norms were selected as in force. |
assumptions | array of string | What the verdict rests on, in words: the version assumed in force, the membership share when below 1, the extraction state when not approved, the norm's condition when the claim does not say whether it holds. |
cite_as required | string or object | Text in English as a plain string. Only when it quotes or reproduces a source written in another language: an object with the original in |
condition_checks | array of ConditionCheck | A reader's decision on each condition that shaped the verdict: the deciding norm's, and those of norms set aside because their condition does not hold for the project, each with its basis ([ |
conditions | array of string | With status |
considered | array of NormLine | |
disagreement | string or null | The stated and the measured value differ beyond the measurement's tolerance. |
factor required | string | |
locus | Locus or null | |
requirement required | string or object | The requirement verbatim (the original, with its English rendering). |
review | string or null | A planner's review of the deciding norm: state, who, when, the note. |
rule required | string | The deciding norm rule. |
state | string or null | The deciding norm's state: |
status required | NormStatus | |
status_text | string | The status in a reviewer's words ("meets only if: (a) …; (b) …"). |
url | string or null | |
value_basis | ValueBasis or null | Where the compared value comes from: |
value_claimed | string or null | |
value_measured | string or null | The measurement compared, with its tolerance and provenance. |
value_required | string or null |
NormState
POST /api/v1/norms/state: a planner's review of norms, so it reaches their weights.
| Field | Type | Description |
|---|---|---|
correction | array of Way or null | With |
norms required | array of string | The norm rules (as a job's |
reason required | string | The planner's note; journaled. |
state required | ReviewState |
NormStatus
The reviewer's reading of the comparison (never a pass/fail score: the verdict's label and probability stay the engine's).
One of:
- one of
meets,likely_not,cannot_tell,not_applicable "conditional"Meets only if a way the claim does not address holds (a consent, a requirement in words, a procedure): the claim fails or does not give the number, and another way remains open.
Notice
Something a tenant's account shows until they have seen it (a rebase's clashes, a promotion of their work).
| Field | Type | Description |
|---|---|---|
body required | any |
|
created required | string | |
id required | string | |
kind required | string |
|
seen required | boolean |
Operator
How a requirement constrains its factor.
One of:
- one of
eq,min,max,range "in"One of the values listed (a building type, a use).
"text"A requirement in words only.
ParsedStatement
Result of parsing a piece of text.
| Field | Type | Description |
|---|---|---|
analyse | array of string | Only when first-principles reasoning is asked for (the request says so under "First-principles reasoning"): the predicate keys of the claims whose truth depends on what a concept means (fascist, democracy, genocide, perjury, British as a status), exactly as used in |
claims required | array of Claim | |
dated | string or null | The day the text was read (ISO date), set when it was parsed and kept with the stored parse: claims without a time are judged as of it. |
language | string or null | The language the text is written in (ISO 639-1). |
notes | array of string | Reference resolutions and sense choices made, in plain words ("they = apples"; "apple read as the fruit, not the company"). |
place | string or null | The place the whole text is about, when it has one; claims without their own place inherit it. |
predicate_readings | array of PredicateReading | When the request is not in English: a human reading of each claim's predicate key, in English and in the request language. |
premises | array of PremiseProposal | Premises the text states rather than asserts ("if genocide means any grave war crime", "assuming synthetic a priori judgments exist"): the known choice point and value each fixes, or a proposed point. A premise is never also a claim. |
proposed_terms | array of TermProposal | |
renderings | array of Rendering | When the request is not in English: the prose written for this parse (glosses, notes, framing reasons), each with its rendering in the request language. Kept in the render cache, not in the knowledge base. |
setting | array of string | Context term ids that scope the whole text: the election, period, place or event it is about. They apply to every claim. |
time | TimeScope or null | The period the whole text is about, when it has one; claims without their own time inherit it. |
Payer
Who pays a job's model calls.
One of:
"org"The organisation's own credential (
X-Llm-Credential)."platform"The service's key.
"user"The user's own key, stored with the service (
PUT /api/v1/credentials/{provider}): the demo's bring-your-own-key.
PlaceCard
What a resolver knows about a place.
| Field | Type | Description |
|---|---|---|
acts | array of CardAct | |
municipality | CardMunicipality or null | |
parcels | array of CardParcel | |
regimes | array of Regime | |
request required | PlaceSpec | |
resolved_at required | string | When the resolver made the card (ISO). |
snapshot | string or null | The newest date of the layers it was made from. |
snapshots | map of string | The date of each layer the resolver read ( |
source | string | The resolver ( |
units | array of ZoneUnit | |
url | string or null | A link to the card, when the resolver has one. |
PlaceSpec
A place to resolve.
One of:
- object
A gazetteer notation (
SI-Žalec): resolved without a card.Field Type Description gazetteerrequiredstring - object
A cadastral parcel: cadastral municipality (k.o.) code and parcel number (
796/14).Field Type Description parcelrequiredobject Field Type Description korequiredinteger (uint32) parcelrequiredstring - object
A point (WGS 84).
Field Type Description pointrequiredobject Field Type Description latrequirednumber (double) lonrequirednumber (double) - object
A GeoJSON polygon.
Field Type Description polygonrequiredany
Polarity
Type: one of required, allowed, prohibited
PredicateReading
A human reading of a predicate key: in English, and in the request language.
| Field | Type | Description |
|---|---|---|
en required | string | What it says in plain English, as a verb phrase about the subject ("called on Israel to comply with humanitarian law in Gaza"). |
key required | string | The predicate key exactly as used ( |
text | string or null | The same in the request language, when it is not English. |
PremiseProposal
A premise a text states rather than asserts ("if genocide means any grave war crime", "assuming synthetic a priori judgments exist"): not a claim and not a hypothetical claim, but the context the text's claims are made in.
| Field | Type | Description |
|---|---|---|
new_point | ChoicePoint or null | When no known point fits: a proposed choice point (snake_case id, gloss, kind, two or more values with priors), with the premise's value named in |
point | string or null | The known choice point it fixes, when one fits (its id). |
text required | string | The span of the text that states the premise. |
value | string or null | The value of that point it fixes. |
Procedure
The procedure a permit check is for: the act, the instrument it issues, the documentation's stage, and where the caller has it from. The reader that applies provisions to the project takes it as a project fact.
| Field | Type | Description |
|---|---|---|
act required | string | The act, as the registry names it ( |
basis required | ProcedureBasis | |
kind required | ProcedureKind | |
stage | DocumentationStage or null | |
works | array of Works | The works the procedure is for, as GZ-1 names them (Luma reads them from the title page): a project fact for every reader, so a change-of-use norm is read against a new building. |
ProcedureBasis
Where the caller has the procedure from.
One of:
"material"Read from the documents (the title page, the designer's statement): a supplied fact.
"profile"The caller's product or profile for the run, not the documents: an assumption.
ProcedureKind
The instrument a permit procedure under GZ-1 issues.
One of:
"gradbeno_dovoljenje"Gradbeno dovoljenje.
"integralno_gradbeno_dovoljenje"Integralno gradbeno dovoljenje (with the environmental impact assessment).
"sprememba_gradbenega_dovoljenja"Sprememba gradbenega dovoljenja.
"uporabno_dovoljenje"Uporabno dovoljenje.
"dovoljenje_za_objekt_daljsega_obstoja"Dovoljenje za objekt daljšega obstoja.
"odlocba_o_legalizaciji"Odločba o legalizaciji.
Quantity
A claimed quantity: a number, its unit and how it is meant.
| Field | Type | Description |
|---|---|---|
bound | Bound or null | |
unit | string or null | |
value required | number (double) |
Question
Something an evaluation could not settle, with what would settle it.
| Field | Type | Description |
|---|---|---|
about | array of Statement | The statements an answer is for: copy them into the source's |
answer required | string | Where the answer goes: |
ask required | string | The question in plain words. |
claims required | array of integer (uint) | The claims (positions in the evaluation's claims) it blocks. |
factor | string or null | The factor key ( |
id required | string | Stable for the same question: |
kind required | QuestionKind | |
municipality | integer (uint32) or null | The municipality's register code, when known. |
needs required | array of string | The fields an answer must carry. |
predicate | string or null | |
provision | string or null | For a source question about a referenced provision: the provision by act and article, as the analysis names it ("GZ-1, 141. člen, (2) 3."). |
site | string or null | The site it is about, as a site spec string ( |
site_term | string or null | |
subject | string or null | The statement of a source question. |
zones | array of QuestionZone | The planning units a norm question is about. |
QuestionKind
What a question asks for.
One of:
"locate_site"Where the site lies: municipality, planning units, land use, regimes, acts in force.
"norm"The norm in force for a factor in the site's planning units.
"source"A provision or record that settles a statement the knowledge base has no rule for.
QuestionZone
A planning unit a norm question is about.
| Field | Type | Description |
|---|---|---|
code required | string | The EUP code as the plan writes it. |
land_use | string or null | |
share required | number (double) | The site's share in it. |
sub_code | string or null |
Readiness
GET /api/v1/ready.
| Field | Type | Description |
|---|---|---|
kb_revision required | integer (uint64) | The knowledge base is loaded, at this revision. |
model | string or null | The model's last probe, when the service probes it ( |
model_backend required | boolean | |
problems | array of string | |
ready required | boolean | |
store required | boolean | |
tenants | TenantStats or null | With tenant copies on (the demo): the tenants' engines in memory against the cap, and what they are reckoned to hold. |
Regime
A protective regime over the place (heritage, flood, a road's protection belt).
| Field | Type | Description |
|---|---|---|
basis | Locus or null | Its legal basis (a road belt's article), when known. |
class | string or null | |
kind required | string | |
name required | string | |
share | number (double) or null | Share of the place's area under it. |
Relation
How a claim leans on another claim of the same text.
Type: one of presupposes, derives, attributes
Rendering
One text the model rendered: the English it wrote (or was given) and its rendering in the request language.
| Field | Type | Description |
|---|---|---|
en required | string | The English text, exactly as written in the answer's field. |
text required | string | Its rendering in the request language. |
ReportStatus
A norm line's status in Luma's report.
One of:
- one of
applies_meets,applies_likely_not "applies_cannot_tell"With the question that would settle it.
"applies_meets_if"Meets only if a way the project does not address holds: the ways verbatim (what to ask for).
"not_applicable"With the condition decision that sets it aside.
ReviewState
A planner's review state of a norm.
Type: one of approved, corrected, rejected
Role
What an account may do: admin everything (every scope, the admin routes, invites); user what its own tenant's key may.
Type: one of admin, user
RuleScope
Where a structured rule applies.
One of:
"unit"A planning unit (EUP).
"sub_unit"A sub-unit (PEUP) inside a planning unit.
"land_use"A land-use class (SS applies to SSe).
"general"The whole act (its general implementation conditions).
"building_type"A building type, under the act's general conditions.
RuleValue
A rule's value: a number, or a value in words ("P+1", "dvokapnica").
One of:
- number (double)
- string
RunInfo
How a job ran: what a result is reproducible from.
| Field | Type | Description |
|---|---|---|
engine_build required | string | |
kb_revision required | integer (uint64) | The knowledge base's revision the result was judged on. |
model required | string | |
params_fingerprint required | string | |
prompts | map of string | Each prompt used, by its versioned name ( |
seconds required | number (double) | |
usage | Usage |
SampledItem
One sampled item of a measurement.
| Field | Type | Description |
|---|---|---|
published | string or null | |
reason | string or object | One line: why this stance. |
stance required | Stance | |
title required | string or object | The item's title as published (a Slovene headline keeps the original in |
url | string or null |
Scope
What a key may do.
One of:
"read"Jobs, verdicts, explanations, history.
"evaluate"Start checks.
"facts:write"Supply facts: cards, norms, provision texts.
"amend"Amend knowledge: statuses, retractions.
"publish"Publish a job as a permanent verdict.
"curate"Definitions, norm review states, base-layer writes.
"admin"Keys and tenants.
Shown
| Field | Type | Description |
|---|---|---|
basis | string or null | Why it counts as verified: "official record: …" or "4 independent sources". |
text required | string | What to show: "verified", "verified false", or the label with a rounded probability ("likely true, 0.87"). |
verified | boolean or null | Some(true) verified true, Some(false) verified false, None otherwise. |
SourceText
A source text the caller supplies: a provision verbatim, a record, a published finding. Its statements are ingested as rules with evidence citing it.
| Field | Type | Description |
|---|---|---|
about | array of Statement | The statements this text is supplied for (copied from the questions it answers): it is read with exactly these subjects and predicate keys, so what it says about them lands on the rules the evaluation judges. |
kind | EvidenceKind | What kind of evidence it is; default |
measured | MeasuredValue or null | With |
published | string or null | The day the text applies or was published (ISO). |
source required | string | The citation: "GZ-1, 141. člen", "Odlok o OPN Občine Juršinci, 52. člen". |
text required | string | The text: the article verbatim, the record's content. |
url | string or null |
Stance
Type: one of favourable, neutral, unfavourable
Statement
A statement by its subject term and predicate key (predicate:object).
| Field | Type | Description |
|---|---|---|
predicate required | string | |
subject required | string |
StructuredRule
A requirement extracted from a provision into fields: what it constrains (factor, subject), how (operator, polarity, value, unit), when (condition), its words (text) and where it stands (locus), with the extraction's confidence, support and review state.
| Field | Type | Description |
|---|---|---|
condition | string or null | |
confidence required | Confidence | |
doc required | string | |
factor required | string | |
id required | string | The corpus's id; sync is idempotent on it. |
locus required | Locus | |
municipality | integer (uint32) or null | |
operator required | Operator | |
period | TimeScope or null | The rule's own period, when the corpus dates each rule (Luma's |
polarity required | Polarity | |
scope required | RuleScope | |
scope_key | string or null | The unit, land-use or building-type code(s) as the act writes them. |
state required | ExtractionState | |
subject | string or null | |
superseded_by | string or null | |
support required | Support | |
text required | string | The requirement verbatim. |
unit | string or null | |
unit_keys | array of string | The national unit codes the scope key resolves to (EUP, or PEUP with a |
value | RuleValue or null | |
value_max | number (double) or null | |
version required | string |
Support
How the extracted rule's text was found in the provision.
One of:
- one of
verbatim "near"Close to the provision's words, not the same: counts at
corpus.near_support_factor."unsupported"Not found in the provision: never ingested.
TenantSettings
A tenant's own limits; each one absent leaves the server's default.
| Field | Type | Description |
|---|---|---|
daily_fill | integer (uint) or null | Research sessions (fill_gaps) per UTC day; the server's |
max_concurrent_jobs | integer (uint) or null | Jobs queued or running at once; without it only the server's |
rate_per_minute | integer (uint32) or null | API requests per minute; the server's |
TenantStats
What /ready and /metrics show.
| Field | Type | Description |
|---|---|---|
cap required | integer (uint) | At most this many. |
engine_mb required | integer (uint) | What one is reckoned to hold, in MB. |
evictions required | integer (uint64) | Engines dropped to make room since the process started. |
loaded required | integer (uint) | Engines held in memory now. |
reckoned_mb required | integer (uint) |
|
TenantStore
A tenant's copy, as the index holds it.
| Field | Type | Description |
|---|---|---|
base_revision required | integer (uint64) | The base's revision it was made from or last rebased on. |
created required | string | |
location required | string | Its Postgres schema, or its file. |
rebased | string or null | |
tenant required | string |
TermProposal
A term the parser wants added to the KB because no existing id fits.
| Field | Type | Description |
|---|---|---|
gloss required | string | One line pinning down the sense. |
id required | string | snake_case id, e.g. |
individual | boolean | true when the id names one specific person, organisation, place, event or instance; false for kinds and contexts. |
parents | array of string | Existing term ids this is a kind of. |
TextStats
Per-text figures for ranking sources; every key is always present.
| Field | Type | Description |
|---|---|---|
by_kind required | map of integer (uint) | |
by_label required | map of integer (uint) | |
claims required | integer (uint) | |
decided_facts required | integer (uint) | Factual claims the KB could decide (a rule applied); a claim about the text itself is never one. |
disputed_values required | integer (uint) | |
framed required | map of integer (uint) | Framed claims per framing kind. |
framed_unanimous required | integer (uint) | Framed claims every review sample agreed on. |
mean_probability_decided_facts | number (double) or null | Mean probability over decided factual claims, 3 decimals; null when none. |
uncorroborated required | integer (uint) | Claims whose deciding rule rests on a single non-official source. |
verified | integer (uint) | Claims shown as verified or verified false (settled beyond reasonable doubt). |
TimeScope
The period a claim or rule is about. Dates are ISO at any precision; from missing means "since always", to missing means "still". "in 2026" is 2026–2026, "since 1970" is 1970–, "in the 1950s" 1950–1959.
| Field | Type | Description |
|---|---|---|
from | string or null | |
to | string or null |
UnitAct
The act a zone's polygon belongs to.
| Field | Type | Description |
|---|---|---|
key | string or null | The corpus key ( |
kind | string or null | |
name | string or null | |
valid_from | string or null |
UnitKind
What a resolved unit is.
One of:
- one of
regime "zone"A planning unit (EUP).
"sub_zone"A sub-unit (PEUP) inside a planning unit.
"land_use"Land use only (no planning unit is known).
Usage
A job's model usage, for the caller's credits.
| Field | Type | Description |
|---|---|---|
backend | string | The model backend: |
by_template | map of UsageLine | By prompt template ( |
cached_calls | integer (uint32) | Readings answered from the read cache ([ |
input_tokens required | integer (uint64) | |
model_calls required | integer (uint32) | |
output_tokens required | integer (uint64) | |
payer | Payer or null | |
usd_estimate required | number (double) | The estimated cost in US dollars at list prices. |
UsageLine
The calls of one line of a usage breakdown (one model, one template).
| Field | Type | Description |
|---|---|---|
cached | integer (uint32) | Readings answered from the read cache, besides |
calls required | integer (uint32) | |
input_tokens required | integer (uint64) | Every input token, cached or not. |
output_tokens required | integer (uint64) | |
usd_estimate required | number (double) |
ValueBasis
Where a norm block's compared value comes from ([NormResult::value_basis]).
One of:
"stated"The value the applicant states in the documentation: not measured, not a record.
"measurement"A measurement the caller supplied (
facts.sourceswithkind: measurement).
VersionInfo
One version of a document.
| Field | Type | Description |
|---|---|---|
covers | array of string | The publications the version's text consolidates, oldest first: the base act and its amendments ("Uradni list RS, št. 96/11", …). A citation names these, never a consolidated text's label. |
id required | string | The corpus's id of the version ( |
label required | string | How readers name it ("NPB 5", "SD OPN 1"). |
source_url | string or null | |
status required | VersionStatus | |
valid_from | string or null | The day it applies from (ISO). |
valid_to | string or null | The last day it applied, when the corpus says; otherwise the product computes it from the next version's |
VersionStatus
Whether a version of a document is law.
One of:
"current"In force now.
"superseded"Was in force; a later version replaced it.
"draft"A proposal (a draft plan before the council): never law.
"unofficial"An unofficial consolidation of the text in force (the base act with its amendments merged by someone other than the gazette): the current norm, cited by the base act and its amendments' publications.
Way
One way a norm can be met ([Norm::satisfied_by]).
| Field | Type | Description |
|---|---|---|
condition | string or null | When it applies, as the provision says. |
kind required | WayKind | |
operator | Operator or null | For a numeric way: |
paragraph | string or null | The paragraph it stands in: the n of "(n)". |
range | WayRange or null | The claimed values this way is open for, when the provision limits it. |
text required | string | The provision's words that state this way, copied exactly. |
unit | string or null |
|
value | number (double) or null | |
value_max | number (double) or null |
WayKind
How a way of meeting a norm is stated ([Way::kind]).
One of:
"numeric"A number to meet ("najmanj 4 m"): give
operator,value,unit."qualitative"A requirement in words ("tako, da ni motena sosednja posest").
"consent"Someone's consent (the neighbours', the road's manager, the municipality).
"procedure"A justification, study or approval in the project.
WayRange
The claimed values a way is open for, when the provision limits it ("Če so odmiki stavb manjši od 1,5 m" → max 1.5 m).
| Field | Type | Description |
|---|---|---|
operator required | Operator |
|
unit | string or null | |
value required | number (double) | |
value_max | number (double) or null |
Works
A kind of works (GZ-1, 3. člen).
One of:
"gradnja_novega_objekta"Gradnja novega objekta.
"dozidava"Dozidava.
"nadzidava"Nadzidava.
"rekonstrukcija"Rekonstrukcija.
"sprememba_namembnosti"Sprememba namembnosti.
"odstranitev"Odstranitev.
"vzdrzevanje"Vzdrževanje.
ZoneUnit
One planning unit the place lies in.
| Field | Type | Description |
|---|---|---|
act | UnitAct or null | |
area_m2 | number (double) | |
code required | string | The planning unit (EUP) code as the plan writes it: |
id required | string | The resolver's id of the unit polygon. |
kind required | UnitKind | |
label | string or null | The land use in words. |
land_use | string or null | The detailed land use (podrobnejša namenska raba): |
oppn_status | string or null | Detailed-plan (OPPN) status as the source states it. |
share required | number (double) | Share of the place's area in this unit (0 to 1). |
snapshot | string or null | The date of the layer the unit came from. |
sub_code | string or null | The sub-unit (PEUP) code: |