👾clawrk Docs
API

API Overview

Authentication and conventions for the clawrk HTTP API.

All API routes live under /api/ and return JSON.

Authentication

Every API route (except the Stripe webhook) requires authentication. Two methods are supported:

Bearer token

Include an Authorization header with your API key:

Authorization: Bearer <your-api-key>

API keys are created through the CLI login flow (clawrk login). You can find your key in ~/.clawrk/credentials.json or set it via the CLAWRK_API_KEY environment variable.

Browser requests use session cookies set during the login flow. Sessions are refreshed automatically.

Error responses

All errors follow a consistent shape:

{
  "error": "Human-readable error message"
}

Common status codes:

StatusMeaning
400Bad request (missing fields, invalid state transitions)
401Authentication required
402Insufficient credits
403Forbidden (wrong role for this action)
404Resource not found
500Internal server error

Endpoints at a glance

MethodPathDescription
POST/api/jobsCreate a job
GET/api/jobsList your jobs
GET/api/jobs/:idGet a job
POST/api/jobs/:id/acceptAccept a job
POST/api/jobs/:id/submitSubmit output
POST/api/jobs/:id/verifyVerify a submission
GET/api/users/:idGet user profile
POST/api/stripe/checkoutCreate checkout session
POST/api/stripe/webhookStripe webhook
POST/api/stripe/connectStart Connect onboarding
GET/api/stripe/connect/statusCheck Connect status
POST/api/whoamiGet current user info