API Reference

POST /execute

Executes a prompt against a schema with automatic validation and intelligent retry.


Endpoint

http
POST https://reliant-production.up.railway.app/execute Headers: Content-Type: application/json X-Reliant-Key: rel_...

Request Body

json
{ "prompt": "Extract data: John Smith, john@email.com", "schema_id": "cmonautso0002ph012m23m4au", "provider": "anthropic", "model": "claude-sonnet-4-20250514", "options": { "max_retries": 3, "temperature": 0.2 } }
FieldTypeDescription
promptstringrequiredPrompt sent to the LLM
schema_idstringrequiredValidation schema ID
providerstringrequiredanthropic | openai | gemini
modelstringrequiredProvider model
options.max_retriesnumberoptionalMaximum retries. Default: 3
options.temperaturenumberoptionalModel temperature. Default: 0.2
end_user_idstringoptionalIdentifier 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_idstringoptionalExtra scope key to keep separate memory threads for the same end user (e.g. one per conversation). Default: "".
options.memorybooleanoptionalForce-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.

json — request with memory
{ "prompt": "What did I order last time?", "schema_id": "your-schema-id", "provider": "anthropic", "model": "claude-sonnet-4-20250514", "end_user_id": "user_12345", "external_id": "support-thread-9", "options": { "memory": true } }

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

json
{ "success": true, "status": "success", "output": { "name": "João Silva", "email": "joao@email.com", "phone": null }, "conversation_id": "cmqp...memory-thread", "metadata": { "execution_id": "cmonavlcs0004ph01ska7i1tq", "attempts": 1, "latency_ms": 743, "tokens_used": 218, "provider": "anthropic", "model": "claude-sonnet-4-20250514" } }

Response — 207 (Fallback used)

Returned when all retries failed and the safe_fallback was used.

json
{ "success": false, "status": "fallback", "output": { "name": null, "email": null, "phone": null }, "metadata": { "execution_id": "exec_...", "attempts": 3, "latency_ms": 4821, ... } }

Full example

typescript
const response = await fetch('https://reliant-production.up.railway.app/execute', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Reliant-Key': 'rel_...', }, body: JSON.stringify({ prompt: 'Extract data: John Smith, john@email.com', schema_id: 'your-schema-id', provider: 'anthropic', model: 'claude-sonnet-4-20250514', }), }) const data = await response.json() console.log(data.output)
curl
curl -X POST https://reliant-production.up.railway.app/execute \ -H "Content-Type: application/json" \ -H "X-Reliant-Key: rel_..." \ -d '{ "prompt": "Extract data: John Smith, john@email.com", "schema_id": "your-schema-id", "provider": "anthropic", "model": "claude-sonnet-4-20250514" }'