API Documentation

Programmatic access to AI Skill Mill for Team plan subscribers. Process documents, retrieve outputs, and integrate knowledge packages into your workflows.

Authentication

All API requests require a valid API key passed in the Authorization header. API keys can be generated and managed from the Settings page.

Authorization: Bearer sk_live_abc123...

Create a Job

POST/api/v1/jobs

Create a new processing job with one or more documents. Documents can be provided as URLs or base64-encoded payloads. Maximum 10 documents per job, 50 MB total payload, 10 MB per base64-encoded document.

Request Body

{
  "documents": [
    {
      "url": "https://example.com/report.pdf",
      "filename": "report.pdf"
    },
    {
      "base64": "JVBERi0xLjQK...",
      "filename": "manual.pdf",
      "contentType": "application/pdf"
    }
  ],
  "outputFormats": ["claude-skill", "cursor-rules"],
  "webhookUrl": "https://your-server.com/webhook"
}

Response (201)

{
  "data": {
    "id": "job_abc123",
    "status": "created",
    "documentCount": 2,
    "outputFormats": ["claude-skill", "cursor-rules"],
    "createdAt": "2026-04-08T10:00:00Z",
    "updatedAt": "2026-04-08T10:00:00Z"
  }
}

List Jobs

GET/api/v1/jobs

List all jobs for the authenticated API key with optional pagination and status filtering.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
pageSizeintegerItems per page (default: 20, max: 100)
statusstringFilter by status: created, processing, complete, failed, review

Response (200)

{
  "data": {
    "jobs": [
      {
        "id": "job_abc123",
        "status": "complete",
        "documentCount": 2,
        "outputFormats": ["claude-skill"],
        "createdAt": "2026-04-08T10:00:00Z",
        "updatedAt": "2026-04-08T10:05:00Z"
      }
    ],
    "meta": {
      "page": 1,
      "pageSize": 20,
      "totalPages": 3,
      "totalCount": 42
    }
  }
}

Get Job Detail

GET/api/v1/jobs/:id

Retrieve detailed information about a specific job including document info, current processing stage, QA scores, and cost.

Response (200)

{
  "data": {
    "id": "job_abc123",
    "status": "complete",
    "currentStage": null,
    "documents": [
      {
        "id": "doc_xyz",
        "filename": "report.pdf",
        "pageCount": 42,
        "sizeTier": "medium",
        "status": "processed"
      }
    ],
    "outputs": [
      {
        "id": "out_001",
        "format": "claude-skill",
        "status": "ready",
        "fileSize": 24576
      }
    ],
    "qaScores": [
      { "agent": "completeness", "score": 92, "passed": true },
      { "agent": "accuracy", "score": 95, "passed": true },
      { "agent": "structure", "score": 88, "passed": true },
      { "agent": "evolution", "score": 90, "passed": true },
      { "agent": "script", "score": 100, "passed": true }
    ],
    "totalCost": 0.87,
    "customerPrice": 50.00,
    "createdAt": "2026-04-08T10:00:00Z",
    "completedAt": "2026-04-08T10:05:12Z"
  }
}

Get Outputs

GET/api/v1/jobs/:id/outputs

Retrieve download URLs for all completed outputs of a job. Download URLs are pre-signed and expire after 1 hour.

Response (200)

{
  "data": {
    "outputs": [
      {
        "id": "out_001",
        "format": "claude-skill",
        "status": "ready",
        "fileSize": 24576,
        "downloadUrl": "https://storage.aiskillmill.com/...",
        "expiresAt": "2026-04-08T11:05:00Z"
      }
    ]
  }
}

Configure Webhook

POST/api/v1/webhooks/configure

Register a callback URL to receive notifications when jobs complete. The webhook URL will be called for all future jobs until updated or removed.

Request Body

{
  "url": "https://your-server.com/webhooks/aiskillmill",
  "secret": "whsec_your_signing_secret"
}

Webhook Callback Payload

{
  "event": "job.completed",
  "jobId": "job_abc123",
  "status": "complete",
  "outputFormats": ["claude-skill", "cursor-rules"],
  "completedAt": "2026-04-08T10:05:12Z"
}

Rate Limits

API requests are subject to the following rate limits per API key:

  • 10 concurrent jobs
  • 100 jobs per hour

Rate limit information is included in response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1712577600

Error Codes

All error responses follow the standard format:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "A human-readable description of the error."
  }
}
CodeHTTP StatusDescription
VALIDATION_ERROR400Request body failed validation.
UNAUTHORIZED401Missing or invalid API key.
FORBIDDEN403API access requires a Team plan subscription.
NOT_FOUND404The requested resource does not exist.
PLAN_LIMIT_EXCEEDED403Concurrent job or per-job document limit exceeded.
RATE_LIMIT_EXCEEDED429Too many requests. Check rate limit headers.
PAYLOAD_TOO_LARGE413Total payload exceeds 50 MB or a single document exceeds 10 MB.
SERVER_ERROR500An unexpected server error occurred.

Code Examples

Complete examples showing how to create a job and poll for results.

Create a Job

curl -X POST https://aiskillmill.com/api/v1/jobs \
  -H "Authorization: Bearer sk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "url": "https://example.com/report.pdf",
        "filename": "report.pdf"
      }
    ],
    "outputFormats": ["claude-skill"]
  }'

Poll for Completion

# Poll until status is "complete" or "failed"
curl https://aiskillmill.com/api/v1/jobs/job_abc123 \
  -H "Authorization: Bearer sk_live_abc123"

# Once complete, get download URLs
curl https://aiskillmill.com/api/v1/jobs/job_abc123/outputs \
  -H "Authorization: Bearer sk_live_abc123"