Run the model against one document on demand, or consolidate an entire matter's documents into one analysis. Not available on the Free tier.
Generate AI analysis for a case that does not have one. The work runs in the background and the call returns HTTP 202 immediately. Poll GET /cases/:id/analysis after 30 to 60 seconds to collect the result.
Not available on the Free tier. A Free Developer key gets HTTP 403 with code: "API_TIER_NOT_ALLOWED" and an upgradeUrl before any work starts and before any credit is charged. Pay As You Go, Scale and Enterprise all have full access.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| force | boolean | No | Re-run the model even when an analysis is already stored. Default false, in which case a stored analysis is returned instead with alreadyExists set to true. |
| allowRemoteFetch | boolean | No | Default false. Only on POST /cases/:id/analyze. When true and the source document is not already in stored data, permits fetching it from a remote host on the allowlist (official court and government domains, plus CourtMesh's own storage), for a surcharge of 20 credits on top of the 100 credit base price, charged only when a remote fetch actually happened. A target host outside the allowlist is refused with REMOTE_FETCH_NOT_ALLOWED regardless of tier or balance. |
curl -X POST https://research.courtmesh.ai/api/v1/prod/cases/507f1f77bcf86cd799439011/analyze \
-H "X-API-Key: cm-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"force": false}'A 202 means accepted, not finished. If the background job later fails, the charge made at admission is reversed, so a failed analysis does not stay billed. Cases with no readable text and no stored document are rejected up front rather than accepted and then failed.
One analysis across every document sharing this case number, rather than one document at a time. Unlike /analyze, this call is synchronous: it runs the model and answers when it is done, which can take well over a minute. Give your client a generous timeout and call it from a worker.
Not available on the Free tier. Same refusal as /analyze: HTTP 403, code: "API_TIER_NOT_ALLOWED", an upgradeUrl, and no charge.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| force | boolean | No | Re-run the model even when an analysis is already stored. Default false, in which case a stored analysis is returned instead with alreadyExists set to true. |
curl -X POST https://research.courtmesh.ai/api/v1/prod/cases/507f1f77bcf86cd799439011/analyze-consolidated \
-H "X-API-Key: cm-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"force": false}'