// DOCS

Developer documentation

Integrate aiCAPTCHAs in minutes. Create a key, generate a challenge, verify the answer.

Quick start

Four steps from zero to verified requests.

API base URLhttps://api.aicaptchas.com

All examples below use this base URL. Replace aic_sk_your_key_here with a key from your dashboard.

  1. Create an API key

    Sign in to the dashboard and create an API key with your desired difficulty level. Keys are prefixed aic_sk_.

  2. Create a challenge
    curl -X POST https://api.aicaptchas.com/api/v2/challenges \
      -H "X-API-Key: aic_sk_your_key_here"
    
    Response: {
      "token": "uuid",
      "challenge": {
        "text": "K_5M@3H2",
        "digits": [5, 3, 2],
        "instruction": "Sum all digits except the largest"
      },
      "expiresIn": 320
    }
  3. Verify the answer
    curl -X POST https://api.aicaptchas.com/api/v2/challenges/verify \
      -H "X-API-Key: aic_sk_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"token": "uuid-from-step-2", "answer": 5}'
    
    Response: {
      "success": true,
      "allowed": true,
      "score": 85.5,
      "solveTimeMs": 523,
      "verificationToken": "uuid"
    }
  4. Server-side validation (optional)
    curl -X POST https://api.aicaptchas.com/api/v2/challenges/siteverify \
      -H "X-API-Key: aic_sk_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"token": "verification-token-from-step-3"}'
    
    Response: {
      "success": true,
      "score": 85.5,
      "solveTimeMs": 523,
      "challengeTs": 1776079724267,
      "operationId": "SUM_EXCLUDING_VALUE"
    }

API reference

Prepend https://api.aicaptchas.com to every path below.

MethodPathAuthDescription
POST/api/v2/challengesX-API-KeyCreate challenge (NLU-based)
POST/api/v2/challenges/verifyX-API-KeyVerify answer
POST/api/v2/challenges/siteverifyX-API-KeyServer-side token validation
POST/api/v1/auth/registerPublicCreate account
POST/api/v1/auth/loginPublicSign in
GET/api/v1/auth/meJWTCurrent profile
GET/api/v1/api-keysJWTList API keys
POST/api/v1/api-keysJWTCreate API key
PATCH/api/v1/api-keys/:idJWTUpdate API key
DELETE/api/v1/api-keys/:idJWTRevoke API key
GET/api/v1/analytics/overviewJWTUsage overview
GET/api/v1/analytics/timeseriesJWTTime-series data

Ready to ship? Grab a key and wire up the widget.

Get an API key