Skip to main content

Get started in three steps

Validate your first document using the ZeroDrift Validation API.

Step 1: Get your API key

Contact the ZeroDrift team to obtain your API key. Once you have it, you’ll use it in the x-api-key header for all API requests.
x-api-key: YOUR_API_KEY

Step 2: Submit content for validation

The quickest way to test the API is with a text snippet:
curl -X POST "https://{api-url}/api/validate_snippet_stream/" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text_snippet": "Our fund guarantees 20% returns with zero risk!",
    "document_category": "retail_investor_letter"
  }'
You’ll receive a job_id in the response:
{
  "job_id": "abc123def456",
  "status": "accepted"
}
For document validation, encode your file as base64:
# Encode your document
DOC_BASE64=$(base64 -i document.pdf)

# Submit for validation
curl -X POST "https://{api-url}/api/validate_stream/" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"document_bytes\": \"$DOC_BASE64\",
    \"document_category\": \"retail_investor_letter\"
  }"
For files larger than 6MB, use the presigned URL workflow.

Step 3: Get validation results

Use the job_id to retrieve your validation results:
curl -X POST "https://{api-url}/api/validate_stream_result/" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_id": "abc123def456"}'
Poll until status is done or failed. A completed response includes:
{
  "job_id": "abc123def456",
  "status": "done",
  "overall_status": "issues_found",
  "summary": {
    "total_checks": 25,
    "passed": 20,
    "failed": 3,
    "warnings": 2
  },
  "fixes": [
    {
      "id": "perf_claim_no_disclosure",
      "severity": "high",
      "title": "Performance claim without required disclosure",
      "recommendation": "Add standardized performance disclosure."
    }
  ]
}

Next steps

Explore the full API capabilities:

Validation Endpoints

Learn about all validation options including documents, snippets, and emails.

Rule Packs

Discover available compliance scenarios and rule configurations.

Large File Upload

Use presigned URLs for documents larger than 6MB.

API Introduction

Full API reference with authentication and rate limits.
Need help? Contact us at support@zerodrift.ai