entity_type: "context" and a set of input fields (like model or user_tier); OpenLIT checks all Active rules and returns which rules matched, plus references to their linked contexts.
Creating, editing, and deleting contexts requires being logged into OpenLIT (session-based). Only this evaluate/retrieval step supports the Bearer-token API key flow described below.
Create an API Key
- Navigate to Settings → API Keys in OpenLIT.
- Click Create API Key, enter a name, and save the key securely.
Call the evaluate API
Send aPOST request to /api/rule-engine/evaluate with your input fields and entity_type: "context". Set include_entity_data: true to receive the full context record (id, name, description, content, tags, meta_properties, status, created_by, created_at, updated_at) instead of just matching rule IDs and entity references.
SDK Rule Engine
Python, TypeScript, and Go examples for retrieving contexts, including full parameter tables and error handling
API Reference: Evaluate
Full request/response schema and a curl example for the evaluate endpoint

