Developer API

Integrate Clausix contract analysis into your application

Get started in 2 minutes

Generate an API key in your Settings, then POST contract text to /api/v1/analyze. No SDK required.

Get API key

Authentication

All requests must include your API key as a Bearer token in the Authorization header. API keys are managed in Settings → API Keys. You can have up to 5 active keys.

HTTP Header
Authorization: Bearer ck_live_your_api_key

Endpoints

POST/api/v1/analyze

Analyze a contract and receive a full risk assessment. Runs Claude deep analysis. Responses typically arrive in 20–60 seconds depending on contract length.

Request body (JSON)

textrequired
string

The full contract text. Maximum 4 MB.

file_name
string

Optional filename shown in your dashboard (e.g. vendor-agreement.txt).

mode
"fast" | "deep"

Analysis depth. "deep" (default) uses Claude for full clause-by-clause analysis. "fast" returns a quick risk score in ~5 seconds.

Example — cURL

bash
curl -X POST https://clausix.app/api/v1/analyze \
  -H "Authorization: Bearer ck_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "This Agreement is entered into as of...",
    "file_name": "vendor-agreement.txt",
    "mode": "deep"
  }'

Example — Node.js

javascript
const response = await fetch("https://clausix.app/api/v1/analyze", {
  method: "POST",
  headers: {
    "Authorization": "Bearer ck_live_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: contractText,
    file_name: "vendor-agreement.txt",
    mode: "deep", // "fast" | "deep"
  }),
});

const analysis = await response.json();
console.log(analysis.risk_score.level); // "low" | "medium" | "high"

Example — Python

python
import httpx

response = httpx.post(
    "https://clausix.app/api/v1/analyze",
    headers={"Authorization": "Bearer ck_live_your_api_key"},
    json={
        "text": contract_text,
        "file_name": "vendor-agreement.txt",
        "mode": "deep",
    },
    timeout=90,
)

analysis = response.json()
print(analysis["risk_score"]["level"])  # "low" | "medium" | "high"

Response

json
{
  "id": "ana_01j9x...",
  "file_name": "vendor-agreement.txt",
  "mode": "deep",
  "contract_type": "vendor",
  "contract_type_label": "Vendor Agreement",
  "jurisdiction": "California, USA",
  "risk_score": {
    "score": 72,
    "level": "high",
    "summary": "Several high-severity clauses require attention before signing."
  },
  "summary": "A vendor services agreement with unlimited liability exposure...",
  "risk_flags": [
    {
      "id": "flag_01",
      "title": "Unlimited Liability",
      "description": "No cap on your financial exposure.",
      "severity": "high",
      "category": "liability",
      "sourceText": "...",
      "suggestedReplacement": "Liability shall not exceed..."
    }
  ],
  "key_terms": [...],
  "action_items": [...],
  "obligations": [...],
  "deadlines": [...],
  "clauses": [...],
  "jurisdiction_flags": [...],
  "missing_clauses": [...]
}
GET/api/v1/results/:id

Retrieve a previously analyzed contract by its ID. Only returns analyses that belong to the authenticated user.

bash
curl https://clausix.app/api/v1/results/ana_01j9x... \
  -H "Authorization: Bearer ck_live_your_api_key"

Rate limits

Rate limit headers are included in every response so you can monitor usage.

LimitValueWindow
Analyze — burst10 requestsper minute
Analyze — sustained100 requestsper day
Get result60 requestsper minute
X-RateLimit-Limit
integer

Maximum requests allowed in the current window.

X-RateLimit-Remaining
integer

Requests remaining in the current window.

X-RateLimit-Reset
unix timestamp

When the rate limit window resets (seconds since epoch).

Error codes

StatusMeaning
200Success
400Bad request — missing or invalid body field
401Unauthorized — missing or invalid API key
404Not found — analysis ID doesn't exist or belongs to another user
413Payload too large — text exceeds 4 MB
429Rate limit exceeded — check Retry-After header
500Server error — analysis failed
503Service unavailable — try again shortly

Need help integrating? Email us or generate your API key in Settings.