AZComply API-referentie
De AZComply API biedt u programmatische toegang tot de enige deterministische EU AI Act-classificatie-engine ter wereld. Integreer regulatoire risicodetectie rechtstreeks in uw CI/CD-pipelines, compliance-workflows of bedrijfsapplicaties.
Twee niveaus: POST /v1/classify voert de pure Python-engine uit in <100 ms zonder credits en zonder LLM. POST /v1/assess voert de volledige 9-agent LLM-pipeline asynchroon uit voor narratieve analyse, actieplannen en PDF-klare rapporten (1 credit per beoordeling).
/v1/classify
Synchroon · Gratis · <100 ms · Alleen engine
/v1/assess
Asynchroon · 1 credit · ~60 s · Volledige pipeline
API-sleutels
az_live_* / az_test_* · SHA-256 opgeslagen
Basis-URL
Alle verzoeken moeten HTTPS gebruiken. HTTP-verbindingen worden geweigerd.
Versiebeheer
De API is voorzien van versiebeheer via het URL-pad (/v1/). Brekende wijzigingen worden gepubliceerd onder een nieuw versieprefix (bijv. /v2/) met een verouderings-kennisgeving van 12 maanden. De versie van de EU AI Act-engine wordt in elk antwoord geretourneerd als engine_version.
Authenticatie
De AZComply API gebruikt API-sleutels voor authenticatie. Voeg uw sleutel toe aan elk verzoek via de HTTP-header X-API-Key.
Sleuteltypen
| Prefix | Type | Gedrag |
|---|---|---|
az_live_* | Productie | Echte classificatie, verbruikt credits op /v1/assess |
az_test_* | Sandbox | Geen LLM, geen credits. /v1/assess retourneert direct een deterministisch nagebootst resultaat |
Sandboxmodus
Gebruik az_test_*-sleutels in uw ontwikkelings- en CI/CD-omgeving. Aanroepen naar POST /v1/assess retourneren onmiddellijk een deterministisch resultaat (geen LLM, geen achtergrondtaak, geen creditkosten). De sandbox: true-vlag is altijd aanwezig in sandbox-antwoorden.
Snelstart
Doe uw eerste API-aanroep in minder dan 2 minuten.
1. Sleutel aanmaken
Ga naar Dashboard → API-sleutels en klik op Sleutel aanmaken. De volledige sleutel wordt eenmalig weergegeven — sla hem op in uw secrets manager (AWS Secrets Manager, GitHub Secrets, Vault, enz.).
2. Eerste aanroep doen
Classificeer een AI-systeembeschrijving. Geen credit verbruikt.
curl -X POST https://api.azcomply.eu/v1/classify \
-H "X-API-Key: az_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "AI system that automatically ranks job applicants by scoring their CVs before human review",
"jurisdictions": ["FR"]
}'3. Antwoord interpreteren
{
"risk_code": "HIGH_RISK",
"ci_status": "block",
"gate_pass": false,
"verdict": {
"classification": "HIGH",
"obligations_count": 9,
"fine_exposure": "€15,000,000 or 3% of global annual turnover"
},
"compliance_deadline": "2027-12-02",
"engine_version": "current",
"classified_at": "2026-03-25T14:30:00Z"
}POST /v1/classify
/v1/classifyDeterministische classificatie · Geen credits · <100 ms
Classificeert een AI-systeem volgens EU AI Act 2024/1689 met behulp van de deterministische Python-engine. Nul LLM-kosten. Retourneert risiconiveau, aantal verplichtingen, FRIA-vereiste, boete-exposure en nalevingsdeadline in minder dan 100 ms.
classify (standaard inbegrepen op alle sleutels). Dit endpoint is gratis — de engine is pure Python en kost niets om te draaien.Aanvraagbody
Twee invoermodi — geef ofwel description (vrije tekst) of facts (gestructureerd) op.
Modus A — Vrije tekst
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
description | string | Verplicht | Plain-text description of the AI system (10–14,000 chars)e.g. "CV ranking AI used in HR" |
system_name | string | Optioneel | Human-readable name for the systeme.g. "HireBot v2" |
jurisdictions | string[] | Optioneel | ISO-2 country codes. Loads national law context.e.g. ["FR", "BE"] |
Modus B — Gestructureerde feiten
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
facts | object | Verplicht | Pre-structured SystemFacts fields. Useful for CI/CD where you know the system properties.e.g. {"is_hr_tool": true, "operator_role": "DEPLOYER"} |
Antwoord
curl -X POST https://api.azcomply.eu/v1/classify \
-H "X-API-Key: az_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "AI system that automatically ranks job applicants by scoring their CVs before human review",
"jurisdictions": ["FR"]
}'{
"risk_code": "HIGH_RISK",
"ci_status": "block",
"gate_pass": false,
"verdict": {
"classification": "HIGH",
"obligations_count": 9,
"fine_exposure": "€15,000,000 or 3% of global annual turnover"
},
"compliance_deadline": "2027-12-02",
"engine_version": "current",
"classified_at": "2026-03-25T14:30:00Z"
}Antwoordvelden
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
risk_level | string | Verplicht | PROHIBITED | HIGH_RISK | LIMITED_RISK | MINIMAL_RISK | GPAI | GPAI_SYSTEMIC | UNCODED |
operator_role | string | Verplicht | PROVIDER | DEPLOYER | IMPORTER | DISTRIBUTOR |
annex_iii_category | string | null | Verplicht | Matched Annex III category if HIGH_RISK, e.g. "Employment & HR — Annex III §4(a)" |
obligations_count | integer | Verplicht | Number of EU AI Act obligations applicable to this system |
fria_required | boolean | Verplicht | Whether a Fundamental Rights Impact Assessment is required (Art. 27) |
national_law_flags | string[] | Verplicht | National law indicators detected, e.g. ["CAO_39_BE", "CNIL_FR"] |
compliance_deadline | string | null | Verplicht | ISO 8601 date of applicable compliance deadline |
fine_exposure | object | Verplicht | { max_tier: string, max_eur: integer } — maximum fine under EU AI Act |
gate_pass | boolean | Verplicht | True only if no obligations detected (MINIMAL_RISK with no flags) |
engine_version | string | Verplicht | Classification engine version from /v1/systems/engine-info |
sandbox | boolean | Verplicht | True if request was made with an az_test_* key |
Gestructureerde modus (CI/CD)
Geef vooraf geëxtraheerde systeemeigenschappen door als gestructureerde feiten voor deterministische resultaten in geautomatiseerde pipelines:
curl -X POST https://api.azcomply.eu/v1/classify \
-H "X-API-Key: az_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"facts": {
"system_name": "CV Ranking Engine",
"system_description": "Scores and ranks job applicants",
"operator_role": "DEPLOYER",
"jurisdictions": ["FR"],
"is_hr_tool": true,
"employee_count": 250,
"uses_gpai_model": false
}
}'POST /v1/assess
/v1/assessVolledige 9-agent LLM-pipeline · 1 credit · ~60 s · Async 202
Voert de volledige beoordelingspipeline uit: feitextractie, deterministische classificatie, 9 LLM-persona (logische criticus, FRIA-adviseur, actieplan-architect, rapportschrijver, etc.) en retourneert een volledig narratief met actieplan. Retourneert direct 202 Accepted met een job_id.
assess (niet standaard inbegrepen — inschakelen bij het aanmaken van uw sleutel). Kosten: 1 credit, alleen afgetrokken nadat de pipeline succesvol is voltooid.Aanvraagbody
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
description | string | Verplicht | Plain-text description of the AI system (20–14,000 chars) |
language | string | Optioneel | Report language: en, fr, nl, de, it, es. Default: en |
jurisdictions | string[] | Optioneel | ISO-2 country codes for national law context |
webhook_url | string | Optioneel | HTTPS URL to receive classification.completed / classification.failed events |
webhook_secret | string | Optioneel | Secret for HMAC-SHA256 signature verification |
curl -X POST https://api.azcomply.eu/v1/assess \
-H "X-API-Key: az_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Document describing our AI-powered credit scoring system...",
"language": "en",
"jurisdictions": ["BE"],
"webhook_url": "https://hooks.yourcompany.com/azcomply",
"webhook_secret": "your-webhook-secret"
}'{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "queued",
"poll_url": "/v1/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6",
"estimated_seconds": 60
}Taakbevraging
docs.assess.pollingDesc De Retry-After-header vertelt u het aanbevolen polling-interval.
# Poll for completion (every 5 seconds)
curl https://api.azcomply.eu/v1/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
-H "X-API-Key: az_live_YOUR_KEY"
# Fetch result once status == "completed"
curl https://api.azcomply.eu/v1/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6/result \
-H "X-API-Key: az_live_YOUR_KEY"| Status | Betekenis | Actie |
|---|---|---|
queued | Taak ontvangen, wachten op een worker | Wacht, bevraag opnieuw |
processing | Pipeline actief (LLM-persona actief) | Wacht, bevraag opnieuw |
completed | Alle fasen voltooid, resultaat beschikbaar | Haal /result op |
failed | Pipelinefout — het veld error bevat details | Controleer de fout en probeer opnieuw |
Resultaat
Wanneer status === completed, haal het volledige resultaat op:
/v1/jobs/{job_id}/resultRetourneert het volledige JSON-rapport wanneer de taak is voltooid
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"risk_level": "HIGH_RISK",
"operator_role": "DEPLOYER",
"obligations_count": 11,
"fria_required": true,
"national_law_flags": ["CAO_39_BE", "CAO_9_BE"],
"compliance_deadline": "2027-12-02",
"fine_exposure": { "max_tier": "TIER_2_HIGH_RISK", "max_eur": 15000000 },
"gate_pass": false,
"validation_score": 94,
"fallacy_flags": [],
"bias_flags": [],
"fria_analysis": "A Fundamental Rights Impact Assessment is required under Art. 27...",
"action_plan": "Phase 1 (0–3 months): Establish AI governance framework...",
"narrative": "This credit scoring system presents significant regulatory risk...",
"completed_at": "2026-03-25T14:31:03Z"
}POST /v1/workpapers
/v1/workpapersBetaalde markdown-workpaper · 1 credit · Async 202 · API/MCP-transport
Genereert een markdown-workpaper van betaalde kwaliteit voor headless API-clients en MCP-agents. Het gebruikt dezelfde gehoste QAE-extractie, deterministische classificatie, creditreservering, taakpolling en resultaatbewaring als het betaalde API-rapporttraject, maar retourneert een machineleesbaar taakresultaat met markdown in plaats van een PDF-rapportartefact.
assess. Kosten: 1 credit, alleen gefinaliseerd nadat de workpaper succesvol is voltooid. Gebruik Idempotency-Key bij herhaalde pogingen om dubbele reserveringen te voorkomen.Aanvraagbody
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
description | string | Verplicht | Plain-text description of the AI system (20-14,000 chars) |
system_name | string | Optioneel | Display name used in the generated workpaper |
jurisdictions | string[] | Optioneel | ISO-2 country codes for national law context |
brief_scope | auto | single | composite | portfolio | Optioneel | Use composite for independently operable component suites |
components | object[] | Optioneel | Component boundaries for composite-system workpapers |
include_coverage_overlay | boolean | Optioneel | Adds deterministic coverage matrix rows |
curl -X POST https://api.azcomply.eu/v1/workpapers \
-H "X-API-Key: az_live_YOUR_KEY" \
-H "Idempotency-Key: hospital-suite-2026-05-30" \
-H "Content-Type: application/json" \
-d '{
"system_name": "Hospital Operations Suite",
"description": "Integrated hospital AI suite with triage, scheduling, diagnostics, kiosk, and facilities components...",
"jurisdictions": ["BE"],
"brief_scope": "composite",
"components": [
{ "name": "Patient Triage", "description": "Assigns urgency scores and appointment priority" }
]
}'{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "queued",
"poll_url": "/v1/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6",
"estimated_seconds": 60
}Resultaat
docs.workpapers.resultDesc
Webhooks
Configureer een webhook-URL op POST /v1/assess om real-time meldingen te ontvangen wanneer een beoordeling is voltooid of mislukt. AZComply ondertekent elke levering met HMAC-SHA256 — verifieer altijd de handtekening vóór verwerking.
Gebeurtenissen
| Gebeurtenis | Wanneer | datavelden |
|---|---|---|
classification.completed | Pipeline geslaagd | job_id, risk_level, obligations_count, fria_required, compliance_deadline |
classification.failed | Pipeline mislukt (credit vrijgegeven) | job_id, error |
Headers bij elke levering
Handtekening verifiëren
Verifieer altijd de X-AZComply-Signature-header vóór het verwerken van webhook-payloads.
import hmac, hashlib, json
def verify_azcomply_signature(
body: bytes,
signature_header: str,
secret: str,
) -> bool:
"""
Verify X-AZComply-Signature header on incoming webhook.
signature_header looks like: sha256=<hex_digest>
"""
expected = "sha256=" + hmac.new(
key=secret.encode(),
msg=body,
digestmod=hashlib.sha256,
).hexdigest()
return hmac.compare_digest(expected, signature_header)
# Flask example
from flask import Flask, request, abort
app = Flask(__name__)
WEBHOOK_SECRET = "your-webhook-secret"
@app.route("/webhook", methods=["POST"])
def handle_webhook():
sig = request.headers.get("X-AZComply-Signature", "")
if not verify_azcomply_signature(request.data, sig, WEBHOOK_SECRET):
abort(401)
payload = request.get_json()
event = payload["event"] # "classification.completed"
job_id = payload["data"]["job_id"]
risk_level = payload["data"]["risk_level"]
# ... handle event
return "", 200Herprobeerlogica
AZComply probeert mislukte leveringen tot 3 keer opnieuw met exponentiële backoff: 2 s → 4 s → 8 s. Na 3 mislukte pogingen wordt de gebeurtenis verworpen — controleer de beschikbaarheid van uw endpoint. 4xx-antwoorden worden niet herhaald (behandel ze als permanente fouten aan uw kant).
Sleutelbeheer
Beheer API-sleutels via de REST API of het Dashboard. Sleutelbeheer-endpoints gebruiken JWT bearer-authenticatie (uw gebruikerssessietoken) — niet API-sleutelauthenticatie.
Sleutel aanmaken
/v1/keysJWT-authenticatie · Maakt sleutel aan · Ruwe sleutel EENMALIG geretourneerd
curl -X POST https://api.azcomply.eu/v1/keys \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "CI/CD Pipeline",
"scopes": ["classify", "assess"],
"sandbox": false
}'
# Response (key shown ONCE — store it now):
{
"key_id": "...",
"raw_key": "az_live_FULL_KEY_SHOWN_ONCE_STORE_NOW",
"key_prefix": "az_live_abcd...",
"name": "CI/CD Pipeline",
"scopes": ["classify", "assess"],
"sandbox": false,
"created_at": "2026-03-25T14:00:00Z",
"warning": "Store this key securely. It will not be shown again."
}Sleutels weergeven
/v1/keysJWT-authenticatie · Retourneert alle sleutels voor uw account
curl https://api.azcomply.eu/v1/keys \
-H "Authorization: Bearer YOUR_JWT_TOKEN"Sleutel intrekken
/v1/keys/{key_id}JWT-authenticatie · Onmiddellijke intrekking · Idempotent
curl -X DELETE https://api.azcomply.eu/v1/keys/KEY_ID \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Returns 204 No ContentFouten
| Code | Naam | Betekenis |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created (POST /v1/keys) |
| 202 | Accepted | Job queued (POST /v1/assess) |
| 401 | Unauthorized | Missing, invalid, or revoked API key |
| 402 | Payment Required | Insufficient credits for /v1/assess |
| 403 | Forbidden | Key exists but lacks required scope |
| 404 | Not Found | Job ID not found or belongs to different key |
| 409 | Conflict | Job failed — error field contains details |
| 410 | Gone | Job expired (results retained 7 days) |
| 422 | Unprocessable | Validation error — missing required fields |
| 425 | Too Early | Job result not yet ready — retry after Retry-After seconds |
| 429 | Too Many Requests | Daily rate limit exceeded — see X-RateLimit-* headers |
| 500 | Server Error | Internal error — transient, retry with backoff |
Foutopmaak
Alle fouten retourneren een JSON-body met een detail-veld:
// 401 Unauthorized
{
"detail": "Invalid or revoked API key."
}
// 402 Payment Required
{
"detail": "Insufficient credits. Purchase more at https://azcomply.eu/pricing"
}
// 422 Validation Error
{
"detail": "Provide either 'description' (free-text) or 'facts' (structured dict)."
}
// 429 Rate Limit
{
"detail": "Daily rate limit of 500 calls exceeded. Resets at midnight UTC.",
// Headers also set:
// Retry-After: 3600
// X-RateLimit-Limit: 500
// X-RateLimit-Remaining: 0
}Snelheidslimieten
Snelheidslimieten zijn per API-sleutel en worden dagelijks om 00:00 UTC opnieuw ingesteld. De standaardlimiet is 500 aanroepen/dag. Maandelijkse tellers worden op de 1e van elke maand gereset.
| Endpoint | Standaard daglimiet | Opmerkingen |
|---|---|---|
POST /v1/classify | 500 / key / day | Gratis, alleen engine. Geen creditkosten. |
POST /v1/assess | 500 / key / day | Ook credit-gelimiteerd. De laagste van beide geldt. |
GET /v1/jobs/* | 500 / key / day | Bevraag met intervallen van ≤5 seconden. |
Headers voor snelheidslimieten
Elk antwoord bevat deze headers:
Backoff-strategie
Als u een 429 ontvangt, wacht dan het aantal seconden dat in de Retry-After-header staat voordat u het opnieuw probeert.
import time, requests
def classify_with_backoff(description: str, api_key: str) -> dict:
for attempt in range(3):
r = requests.post(
"https://api.azcomply.eu/v1/classify",
headers={"X-API-Key": api_key},
json={"description": description},
)
if r.status_code == 429:
wait = int(r.headers.get("Retry-After", 60))
print(f"Rate limited. Retrying in {wait}s...")
time.sleep(wait)
continue
r.raise_for_status()
return r.json()
raise Exception("Rate limit exceeded after 3 attempts")Engine current · EU 2024/1689 · AVG-dataresidentie: europe-west4
© 2026 AZComply — Detectietool, geen juridisch advies.