PRISM

Public API

REST · Bearer API key · 100 req/hour free tier

Interactive Swagger UI

Authentication

Every request needs your API key (find it on your Dashboard) as a bearer token:

Authorization: Bearer prism_sk_...

Example — RAG query

curl -X POST https://prism-legal-api.vercel.app/v1/rag/query \
  -H "Authorization: Bearer prism_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"question": "What are the penalties for late filing?"}'

Endpoints

  • POST/v1/documents/uploadUpload a PDF, returns doc_id
  • POST/v1/analyze/{doc_id}Run the full analysis (blocking), returns stats
  • GET/v1/documents/{doc_id}Document status + metadata
  • GET/v1/clauses/{doc_id}All extracted clauses
  • GET/v1/causal/{doc_id}LLM-extracted causal rules
  • GET/v1/explain/{doc_id}/{clause_id}LIME explanation for a clause
  • POST/v1/simulate/{doc_id}Run a socioeconomic simulation
  • POST/v1/rag/queryAsk a grounded, cited question over the corpus
  • GET/v1/corpus/documentsList corpus documents

Rate limit: 100 requests/hour per API key. Responses are JSON. Full schemas in the Swagger UI.