> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://documents.pyramid-ai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://documents.pyramid-ai.com/_mcp/server.

# Run Compliance Checks

## Before you begin

* You have an API key (`pai_test_*` or `pai_live_*`)
* You have a project with processed documents ([Upload Documents](/howto/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:

```bash
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"
  }'
```

```json
{
  "success": true,
  "data": {
    "verdict": "COMPLIANT",
    "confidence": 0.92,
    "explanation": "The safety manual specifies continuous atmospheric monitoring...",
    "recommendation": "Current documentation supports this requirement.",
    "sources": [
      {
        "id": "chunk_abc",
        "title": "safety-manual.pdf",
        "relevance": 0.95
      }
    ]
  },
  "request_id": "..."
}
```

### Verdict values

| Verdict       | Meaning                                                   |
| ------------- | --------------------------------------------------------- |
| `COMPLIANT`   | The requirement is supported by the project documents     |
| `CONTRADICTS` | The documents contradict or conflict with the requirement |
| `NOT_FOUND`   | No relevant information found in the project documents    |

## Run a batch check (check run)

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

#### Create the check run

```bash
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"}
    ]
  }'
```

#### Trigger the check

After creating the run, trigger it to start processing:

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

#### Poll for results

Check the run status until all requirements are processed:

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

#### Get individual requirement results

Retrieve the detailed results for each requirement in the run:

```bash
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](/howto/documents)
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

* [Manage Projects](/howto/projects) — organize your knowledge base
* [Ask a Question](/howto/agent) — use Agent for free-form Q\&A instead of structured checks