NDOR API
Programmatic access to NDOR's decision intelligence engine. Submit analyses, poll for results, and integrate structured decision outputs into your workflows.
Overview
The NDOR API is an async decision intelligence engine. You submit a job, poll for status, and retrieve structured decision outputs when ready.
Submit an objective → Receive a job ID → Poll until complete → Fetch decision output
Available analysis tools:
Review
Full document clause-by-clause decision intelligence
Sanity
Logical consistency and assumption validation
Draft
Generate structured professional outputs from instructions
Interpret
Plain-language explanation of complex text
Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer ndor_sk_your_key_hereAPI keys are created from your Account page. Each key can be scoped to specific tools and has configurable rate limits.
Keep your API key secret
Never share your key in client-side code, public repos, or logs. Rotate immediately if compromised.
Quick Start
Step 1: Create an API key
Go to your Account page and click "Create API Key". Copy the key immediately — it is shown only once.
Step 2: Submit an analysis
curl -X POST https://ndor.app/api/v1/analyse \
-H "Authorization: Bearer ndor_sk_your_key" \
-F "tool=sanity" \
-F "instruction=Does this clause make sense? The party shall \
indemnify and hold harmless the other party from any claims \
arising from negligence."{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "processing",
"poll_url": "/api/v1/jobs/a1b2c3d4-...",
"result_url": "/api/v1/jobs/a1b2c3d4-.../result"
}Step 3: Poll for status
curl https://ndor.app/api/v1/jobs/{job_id} \
-H "Authorization: Bearer ndor_sk_your_key"Step 4: Get the result
curl https://ndor.app/api/v1/jobs/{job_id}/result \
-H "Authorization: Bearer ndor_sk_your_key"Returns the full analysis result when the job is complete (HTTP 200).
Endpoints
Error Codes
| Code | Error | Description |
|---|---|---|
400 | Bad Request | Invalid tool, missing files, instruction too short |
401 | Unauthorized | Missing or invalid API key |
402 | Insufficient Credits | Not enough credits for the requested analysis |
403 | Scope Denied | API key does not have access to the requested tool |
404 | Not Found | Job not found or not owned by you |
410 | Gone | Result has expired — re-submit the analysis |
413 | File Too Large | Uploaded file exceeds 50 MB limit |
422 | Job Failed | Job failed during processing |
429 | Rate Limited | Per-key rate limit exceeded. Check Retry-After header. |
503 | Service Unavailable | Job system temporarily unavailable |
Best Practices
Poll at reasonable intervals
Start polling after 3 seconds, then every 5 seconds. Most analyses complete in 10–30 seconds. Do not poll more than once per second.
Store your job IDs
Save the job_id returned from /analyse. If your connection drops, you can resume polling without re-submitting.
Handle retries gracefully
On 429 (rate limit), wait for the Retry-After duration. On 5xx errors, retry with exponential backoff (2s, 4s, 8s).
Use idempotency keys
Pass a client_request_id to prevent duplicate jobs if your request is retried. The same ID returns the existing job.
Scope your keys
Create separate keys for different environments (production, staging). Restrict scopes to only the tools each integration needs.
Rotate keys periodically
Use the rotate endpoint to generate a new key without downtime. Update your application, then the old key is automatically revoked.