POST /execute
Executes a prompt against a schema with automatic validation and intelligent retry.
Endpoint
Request Body
| Field | Type | Description | |
|---|---|---|---|
| prompt | string | required | Prompt sent to the LLM |
| schema_id | string | required | Validation schema ID |
| provider | string | required | anthropic | openai | gemini |
| model | string | required | Provider model |
| options.max_retries | number | optional | Maximum retries. Default: 3 |
| options.temperature | number | optional | Model temperature. Default: 0.2 |
| end_user_id | string | optional | Identifier of your end user (e.g. user ID, phone, session). Enables persistent memory when the schema has memory enabled (or options.memory is true). Memory is scoped per end user. |
| external_id | string | optional | Extra scope key to keep separate memory threads for the same end user (e.g. one per conversation). Default: "". |
| options.memory | boolean | optional | Force-enable persistent memory for this call even if the schema does not have it on. Requires end_user_id. |
Persistent memory
When a schema has memory enabled and you pass end_user_id, Reliant stores each validated turn in your own database and injects the recent history as read-only context on the next call for that user. Memory is scoped by project + schema + end user, so it can never leak across tenants or users. The system prompt keeps full authority — history is treated strictly as data, never as instructions — so validation, retries, fallback and quality checks all behave exactly as without memory.
The response includes a conversation_id identifying the memory thread. List threads with GET /memory/conversations and erase a user's memory with DELETE /memory.
Response — 200 OK
Response — 207 (Fallback used)
Returned when all retries failed and the safe_fallback was used.