API reference
A versioned REST API for every inspection type. The machine-readable spec is at /api/v1/openapi.json.
Authentication
API access is included with the Pro and Team plans. Create an API key in Dashboard → API keys and send it as a Bearer token. Keys start with ail_ and are shown only once.
Authorization: Bearer ail_xxxxxxxxxxxxxxxxxxxxxxxxCreate an inspection
Text, code, website and repository inspections use JSON:
curl -X POST https://aiinspectorlab.com/api/v1/inspections \
-H "Authorization: Bearer $AIL_KEY" \
-H "Content-Type: application/json" \
-d '{"contentType":"website","url":"https://example.com/blog/post","crawlSameOrigin":false}'Images, documents and code files use multipart form data:
curl -X POST https://aiinspectorlab.com/api/v1/inspections \
-H "Authorization: Bearer $AIL_KEY" \
-F contentType=document -F file=@report.pdfThe response is 202 Accepted with the inspection in pending state and a Location header.
Poll for results
curl https://aiinspectorlab.com/api/v1/inspections/ins_... -H "Authorization: Bearer $AIL_KEY"
{ "data": { "id": "ins_...", "status": "processing", "progress": 40, "stage": "Running detection model", ... } }Poll every few seconds until status is completed or failed. Failed inspections include an error message; transient failures are retried automatically up to three times.
Reports
curl https://aiinspectorlab.com/api/v1/reports/ins_... -H "Authorization: Bearer $AIL_KEY" # JSON
curl https://aiinspectorlab.com/api/v1/reports/ins_...?format=pdf -o r.pdf -H "Authorization: Bearer $AIL_KEY" # PDFThe JSON report contains likelihood (with status: available, unavailable, failed or mock), findings grouped by category, segments, files, metadata, provenance, engines and limitations. Treat score as null unless status is available.
Endpoints
| POST | /api/v1/inspections | Create an inspection |
| GET | /api/v1/inspections | List inspections (page, pageSize, contentType, status) |
| GET | /api/v1/inspections/:id | Inspection status |
| DELETE | /api/v1/inspections/:id | Delete an inspection and its stored content |
| GET | /api/v1/reports/:id | Report as JSON or PDF |
| POST | /api/v1/reports/:id/share | Create an expiring share link |
| DELETE | /api/v1/shares/:shareId | Revoke a share link |
| POST | /api/v1/repositories/analyze | Inspect a public GitHub repository |
| GET | /api/v1/usage | Usage for the current billing period |
| GET | /api/v1/openapi.json | OpenAPI 3.1 specification |
Errors & limits
Errors return { "error": { "code", "message", "fields?" } } with an appropriate HTTP status. API keys are limited to 120 requests per minute and 20 new inspections per minute; responses include X-RateLimit-* headers and 429 responses include Retry-After. Monthly inspection quotas follow your plan.