NAIL SDK Documentation

Integrate AI agent liability cover into your platform. Run adversarial diagnostics, manage policies, process claims, and embed live safety badges.

Quick Start

Base URL: https://neuravant.ai
Auth: Bearer token via POST /api/auth/login
Format: All requests/responses are JSON

Authentication

Register an account and login to get a JWT token. Include it in all subsequent requests.

POST/api/auth/register
Create a new account. Returns JWT token.
cURLPythonJavaScript
# Register a new account
curl -X POST https://neuravant.ai/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "dev@example.com", "password": "secure123", "full_name": "Dev User", "organisation": "Acme AI"}'

Base URL & Headers

# All authenticated requests
Authorization: Bearer <your-jwt-token>
Content-Type: application/json

# Or use API key
X-API-Key: <your-api-key>

Submit Diagnostic

POST/api/diagnostic/submit
Submit an AI agent for adversarial safety diagnostic. Returns a job ID to track progress.
cURLPythonJavaScript
curl -X POST https://neuravant.ai/api/diagnostic/submit \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "CustomerBot",
    "agent_url": "https://api.example.com/chat",
    "organisation": "Acme AI",
    "autonomy_level": "semi_autonomous"
  }'

# Response
{
  "job_id": "abc-123-def",
  "status": "queued",
  "agent_name": "CustomerBot"
}

Parameters

Field Type Required Description
agent_name string Yes Display name for the agent
agent_url string No Agent API endpoint (for live testing)
organisation string No Company name
autonomy_level string No human_in_loop | semi_autonomous | fully_autonomous

List Diagnostic Jobs

GET/api/diagnostic/jobs
List all diagnostic jobs. Filter by status.
curl -H "Authorization: Bearer $TOKEN" \
  https://neuravant.ai/api/diagnostic/jobs

List Policies

GET/api/policy/list
List all policies. Returns policy IDs, tiers, ratings, and premiums.
curl -H "Authorization: Bearer $TOKEN" \
  https://neuravant.ai/api/policy/list

# Response
{
  "total": 2,
  "policies": [
    {
      "policy_id": "pol-abc123",
      "agent_name": "CustomerBot",
      "tier": "professional",
      "nail_rating": "AA",
      "coverage_limit": 2000000,
      "monthly_premium": 416.67,
      "status": "active"
    }
  ]
}

Submit Claim

POST/api/claims/submit
File a claim against an active policy.
curl -X POST https://neuravant.ai/api/claims/submit \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "policy_id": "pol-abc123",
    "agent_name": "CustomerBot",
    "incident_type": "hallucination_liability",
    "incident_date": "2026-03-01",
    "description": "Agent provided incorrect medical advice",
    "claimed_amount": 50000
  }'

List Claims

GET/api/claims
List all claims with optional filters.
curl -H "Authorization: Bearer $TOKEN" \
  https://neuravant.ai/api/claims

Create Checkout Session

POST/api/payment/checkout
Create a Stripe checkout session for policy payment.
curl -X POST https://neuravant.ai/api/payment/checkout \
  -H "Content-Type: application/json" \
  -d '{
    "tier": "professional",
    "customer_email": "dev@example.com",
    "agent_name": "CustomerBot"
  }'

# Response
{
  "checkout_url": "https://checkout.stripe.com/...",
  "session_id": "cs_live_..."
}

List Skills

GET/api/skills
List all installed platform skills/plugins.
curl https://neuravant.ai/api/skills

# Filter by type
curl https://neuravant.ai/api/skills?skill_type=compliance

Run Compliance Scan

POST/api/skills/compliance/scan
Run all compliance skills (GDPR, SOC 2, EU AI Act) against audit data.
curl -X POST https://neuravant.ai/api/skills/compliance/scan \
  -H "Content-Type: application/json" \
  -d '{
    "test_results": [...],
    "composite_scores": {"hallucination": 0.85, "prompt_injection": 0.92}
  }'

Embeddable Badge

GET/api/continuous/badge/{agent_name}.svg
Get an embeddable SVG badge showing the agent's current NAIL rating. Use in README files, websites, and dashboards.
# Embed in HTML
<img src="https://neuravant.ai/api/continuous/badge/CustomerBot.svg" alt="NAIL Badge">

# Embed in Markdown (GitHub README)
![NAIL Badge](https://neuravant.ai/api/continuous/badge/CustomerBot.svg)

Register for Monitoring

POST/api/continuous/register
Register an agent for continuous safety monitoring (every 6 hours).
curl -X POST https://neuravant.ai/api/continuous/register \
  -H "Content-Type: application/json" \
  -d '{"agent_name": "CustomerBot", "organisation": "Acme AI"}'

Bordereaux Export

GET/api/admin/bordereaux/premium
Generate premium bordereaux for capacity partner reporting. Supports CSV and JSON.
# JSON format (default)
curl https://neuravant.ai/api/admin/bordereaux/premium

# CSV download
curl -o premium.csv https://neuravant.ai/api/admin/bordereaux/premium?format=csv

# Filter by period
curl "https://neuravant.ai/api/admin/bordereaux/premium?period_start=2026-01-01&period_end=2026-03-31"

Audit Trail

GET/api/admin/audit
Query the immutable audit trail. Filter by category, actor, resource.
# All events
curl https://neuravant.ai/api/admin/audit

# Filter by category
curl "https://neuravant.ai/api/admin/audit?category=policy"

# Audit statistics
curl https://neuravant.ai/api/admin/audit/stats

Rate Limits

Endpoint Limit Window
POST /api/diagnostic/submit 10 requests per minute
POST /api/auth/* 20 requests per minute
All other endpoints 60 requests per minute

Exceeding rate limits returns 429 Too Many Requests with a Retry-After header.

Error Codes

Code Meaning
400 Bad Request — missing or invalid parameters
401 Unauthorized — invalid or missing token
404 Not Found — resource doesn't exist
429 Rate Limited — too many requests
500 Internal Error — contact support

Need help?

api@neuravant.ai · Client Portal