Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aethis.ai/llms.txt

Use this file to discover all available pages before exploring further.

Base URL

https://api.aethis.ai/api/v1/public/

Authentication

x-api-key: ak_live_...
Decision endpoints (/decide, /rulesets/{id}/schema, /rulesets/{id}/explain) require no authentication. Safe to call client-side from a browser or mobile app. Authoring endpoints (/projects/, /generate-and-test, /publish, /guidance) require an x-api-key header. Call from your server — never expose API keys to client-side code. Get an API key →

Endpoint groups

Decision

Evaluate eligibility against a published ruleset. No auth required. Under 5ms.
  • POST /decide
  • GET /rulesets/{id}/schema
  • GET /rulesets/{id}/explain

Projects

Author rules from source text using a test-driven workflow. API key required.
  • POST /projects/
  • POST /projects/{id}/generate-and-test
  • POST /projects/{id}/publish
  • POST /projects/{id}/guidance

Rulesets

Inspect, list, and manage published rule rulesets.
  • GET /rulesets/
  • GET /rulesets/{id}/schema
  • GET /rulesets/{id}/explain
  • PATCH /rulesets/{id}/visibility
  • POST /rulesets/{id}/archive

Rulebooks

Compose multiple section rulesets into a single rulebook with outcome logic.
  • POST /rulebooks/
  • GET /rulebooks/{id}
  • GET /rulebooks/{id}/schema
  • POST /rulebooks/{id}/activate
  • POST /rulebooks/{id}/archive

Quick example

# Evaluate eligibility — no API key
curl -X POST https://api.aethis.ai/api/v1/public/decide \
  -H "Content-Type: application/json" \
  -d '{
    "ruleset_id": "aethis/uk-fsm/child-eligibility",
    "field_values": { "child.age": 10, "child.school_type": "state_funded" },
    "include_trace": true
  }'
{
  "decision": "eligible",
  "fields_provided": 2,
  "fields_evaluated": 2,
  "trace": {
    "age_check": "PASS — age 10 is within 4–15 (Regulation 3)",
    "school_type_check": "PASS — school_type is state_funded (Section 512ZA)"
  }
}

Response codes

CodeMeaning
200OK
201Created (project or ruleset)
202Accepted — generation queued, poll /status
404Ruleset or project not found
422Validation error — wrong field type, missing required field, invalid ruleset ID
429Rate limit exceeded
422 format:
{
  "detail": [
    {
      "loc": ["body", "field_values", "child.age"],
      "msg": "Expected an integer, got str",
      "type": "type_error.integer"
    }
  ]
}
429 with rate limit headers:
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1714000000

{ "error": "rate_limit_exceeded", "retry_after": 1714000000 }

DATE fields

DATE fields must be passed as integer ordinals, not ISO strings. 2025-04-13739354.
# Python
python3 -c "from datetime import date; print(date(2025,4,13).toordinal())"
// JavaScript
Math.floor(new Date('2025-04-13').getTime() / 86400000) + 719163

SDKs and interfaces

For higher-level interfaces to the same API:
  • CLIuv tool install aethis-cli (or pipx install aethis-cli); file-based authoring, terminal evaluation, CI/CD
  • MCP servernpx -y aethis-mcp; tools for coding agents (Claude Code, Cursor, Windsurf)
  • REST API guide — curl examples with full request/response for all common workflows

Select an endpoint from the sidebar to view its full parameter schema and example responses.