Run Compliance Checks

Verify requirements against your documents with AI-powered verdicts

Before you begin

  • You have an API key (pai_test_* or pai_live_*)
  • You have a project with processed documents (Upload Documents)
  • Feature api.check is enabled for your organization

Run a single compliance check

Submit a requirement and get a verdict against your project’s knowledge base:

$curl -X POST https://api-staging.pyramid-ai.com/api/v2/check/verify \
> -H "Authorization: Bearer pai_test_YOUR_KEY_HERE" \
> -H "Content-Type: application/json" \
> -d '{
> "project_id": "YOUR_PROJECT_ID",
> "requirement": "All confined spaces must have continuous air monitoring"
> }'
1{
2 "success": true,
3 "data": {
4 "verdict": "COMPLIANT",
5 "confidence": 0.92,
6 "explanation": "The safety manual specifies continuous atmospheric monitoring...",
7 "recommendation": "Current documentation supports this requirement.",
8 "sources": [
9 {
10 "id": "chunk_abc",
11 "title": "safety-manual.pdf",
12 "relevance": 0.95
13 }
14 ]
15 },
16 "request_id": "..."
17}

Verdict values

VerdictMeaning
COMPLIANTThe requirement is supported by the project documents
CONTRADICTSThe documents contradict or conflict with the requirement
NOT_FOUNDNo relevant information found in the project documents

Run a batch check (check run)

For multiple requirements, create a check run that processes them asynchronously.

1

Create the check run

$curl -X POST https://api-staging.pyramid-ai.com/api/v2/check/runs \
> -H "Authorization: Bearer pai_test_YOUR_KEY_HERE" \
> -H "Content-Type: application/json" \
> -d '{
> "project_id": "YOUR_PROJECT_ID",
> "name": "Q4 Safety Audit",
> "requirements": [
> {"text": "Fire extinguishers must be inspected monthly"},
> {"text": "Emergency exits must be clearly marked"},
> {"text": "PPE must be provided for all site workers"}
> ]
> }'
2

Trigger the check

After creating the run, trigger it to start processing:

$curl -X POST https://api-staging.pyramid-ai.com/api/v2/check/runs/RUN_ID/trigger \
> -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"
3

Poll for results

Check the run status until all requirements are processed:

$curl https://api-staging.pyramid-ai.com/api/v2/check/runs/RUN_ID \
> -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"
4

Get individual requirement results

Retrieve the detailed results for each requirement in the run:

$curl https://api-staging.pyramid-ai.com/api/v2/check/runs/RUN_ID/requirements \
> -H "Authorization: Bearer pai_test_YOUR_KEY_HERE"

Each requirement includes the same verdict, confidence, explanation, and sources as a single check.

Example: Automate compliance in a spreadsheet

A typical workflow for clients like AIS using the Excel Add-in:

  1. Upload your compliance reference documents via Documents API
  2. Read each row from your spreadsheet (e.g., tree name + recommendation)
  3. Call POST /check/verify for each row
  4. Write the verdict and recommendation back to the output column

This turns a manual review process into an automated pipeline that runs in minutes.

What’s next