For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API Key
GuidesAPI Reference
GuidesAPI Reference
  • Getting Started
    • Introduction
    • Getting Started
    • Authentication
    • Rate Limits
    • Error Handling
  • Concepts
    • Projects & Documents
    • Document Processing
    • Knowledge & Search
    • Compliance Checking
    • Environments & Keys
    • Streaming & Async
  • How-To Guides
    • Manage Projects
    • Upload & Manage Documents
    • Query Your Knowledge Base
    • Run Compliance Checks
    • View Your Organization
Get API Key
LogoLogo
On this page
  • Before you begin
  • Run a single compliance check
  • Verdict values
  • Run a batch check (check run)
  • Example: Automate compliance in a spreadsheet
  • What’s next
How-To Guides

Run Compliance Checks

Verify requirements against your documents with AI-powered verdicts

Was this page helpful?
Edit this page
Previous

View Your Organization

Retrieve your organization details and verify API key scope
Next
Built with

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

  • Manage Projects — organize your knowledge base
  • Ask a Question — use Agent for free-form Q&A instead of structured checks