Erayaha Logo
API Reference & Engine Specs

Developer Documentation.

Everything you need to programmatically integrate Erayaha's deterministic document reasoning compiler, contract vulnerability scanner, and Model Context Protocol (MCP) server into your applications.

Specifications & Discovery

Machine-Readable Standards

Erayaha supports the latest OpenAPI 3.1.0 specifications, RFC 9457 structured problem details, standard IETF RateLimit response headers, and the Model Context Protocol (MCP) Streamable HTTP transport standard.

REST API Reference

Core Operations

POST/api/v1/scan
operationId: scanContractVulnerability

Scans raw contract text against deterministic structural logic graphs to uncover liabilities, circular obligations, indemnification loops, and missing caps.

curl -X POST https://erayaha.ai/api/v1/scan \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: c9a4b3d1-4e78-4392-8012-124982348ab1" \
  -d '{
    "contractText": "This Mutual Non-Disclosure Agreement...",
    "documentType": "NDA",
    "jurisdiction": "US-Delaware"
  }'
POST/api/v1/playbook/analyze
operationId: analyzeClausePlaybook

Evaluates individual contract clauses against standard corporate fallback playbooks and generates tested inline redlines.

POST/api/v1/contracts/batch-scan
operationId: batchScanContracts

Bulk scans an array of contract documents simultaneously in one high-throughput request.

Reliability & Errors

RFC 9457 & Rate Limits

Rate Limit Headers

All API responses include standard IETF structured fields allowing automated agents to self-throttle in real time:

  • • RateLimit-Policy: 120;w=60
  • • RateLimit-Limit: 120
  • • RateLimit-Remaining: 119
  • • RateLimit-Reset: 60
  • • Retry-After: 60 (on HTTP 429)

RFC 9457 Problem Details

Errors return structured JSON with actionable hints so AI agents can self-correct without guessing:

  • • type: URI reference to error docs
  • • title: Short human summary
  • • code: Stable machine code
  • • hint: Actionable resolution step