Getting Started

Start building with the PILOT API in under 5 minutes.

Quick Start

1

Get your API key

Sign in to app.withpilot.ai and navigate to Settings → API Keys. Click Create Key to generate a new API key.

Your key will look like: pk_live_a1b2c3d4e5f6...

Important: The full API key is only shown once at creation. Copy it immediately and store it securely.
2

Make your first API call

Test your key by fetching your profile:

# Verify your API key
curl -H "Authorization: Bearer pk_live_YOUR_KEY" \
  https://app.withpilot.ai/api/v1/auth/me

Expected response:

{
  "id": "usr_abc123",
  "email": "you@company.com",
  "name": "Your Name",
  "role": "user"
}
3

Capture something

Send your first capture — PILOT will classify it automatically:

curl -X POST https://app.withpilot.ai/api/v1/capture \
  -H "Authorization: Bearer pk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Need to review the Q3 proposal before Friday meeting with Jaime",
    "source": "api"
  }'

PILOT classifies the input and returns:

{
  "id": "cap_xyz789",
  "content": "Need to review the Q3 proposal before Friday meeting with Jaime",
  "classification": "task",
  "confidence": 0.94,
  "extracted": {
    "title": "Review Q3 proposal for Friday meeting with Jaime",
    "person": "Jaime",
    "due_hint": "Friday"
  }
}
4

Get your daily briefing

curl -H "Authorization: Bearer pk_live_YOUR_KEY" \
  https://app.withpilot.ai/api/v1/briefing

Authentication

PILOT supports two authentication methods:

API Keys (recommended for integrations)

API keys are prefixed with pk_ and passed in the Authorization header:

Authorization: Bearer pk_live_your_key_here

Manage keys programmatically:

ActionEndpointMethod
List keysGET /api/v1/keysGET
Create keyPOST /api/v1/keysPOST
Revoke keyDELETE /api/v1/keys/{key_id}DELETE

OAuth 2.0 (for user-facing apps)

For applications that act on behalf of a user, use the OAuth flow:

  1. Redirect user to GET /api/v1/auth/oauth/start
  2. User authenticates with Microsoft identity platform
  3. Callback returns an authorization code
  4. Exchange code at POST /api/v1/auth/oauth/callback for a JWT
  5. Use JWT in Authorization header: Bearer eyJ...

Base URL

https://app.withpilot.ai

All API paths are relative to this base URL. The API version is embedded in the path: /api/v1/.

Rate Limits

TierLimitWindow
Standard (OAuth)60 requestsPer minute
API Key120 requestsPer minute

Rate limit info is returned in response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets

When rate limited, you'll receive a 429 Too Many Requests response. Back off and retry after the reset time.

Error Handling

All errors follow a consistent format:

{
  "detail": "Human-readable error message",
  "status_code": 422
}

Common status codes

CodeMeaningAction
200SuccessRequest completed
401UnauthorizedCheck your API key or refresh your token
403ForbiddenYour account lacks permission for this action
404Not FoundResource doesn't exist or wrong ID
422Validation ErrorCheck request body against the schema
429Rate LimitedWait for X-RateLimit-Reset then retry
500Server ErrorRetry with exponential backoff. Contact support if persistent.

What's Next?

Need help? Contact us at support@withpilot.ai or visit withpilot.ai.