API Keys
API keys let you access SuperDocs from your code, scripts, or AI tools.
Create a key
- Open use.superdocs.app and sign in
- Click the gear icon to open Settings
- Go to the API Keys tab
- Click Create API Key
- Enter a name (e.g., “My App” or “CI/CD”)
- Copy the key immediately — it’s only shown once
Keys start with sk_ followed by 32 hex characters:
Authentication
Include your key in the Authorization header:
The same header format works for both REST API and MCP connections.
Verify your key
The cheapest way to confirm a key works is GET /v1/sessions — it consumes no operations, returns immediately, and accepts API keys:
A 200 response with a JSON list of your sessions (possibly empty on a brand-new key) confirms the key is valid. A 401 with {"detail": "Authentication required..."} means the key is wrong, revoked, or the Authorization header didn’t reach the server.
Do not use /v1/users/me (or any /v1/users/* endpoint) to verify your API key. Those endpoints are for the web-app session surface — they accept web-app session tokens only and reject sk_ keys with a 401. The error makes it look like your key is bad; it isn’t, you’re just hitting an endpoint that doesn’t accept API keys.Endpoints that accept API keys: /v1/chat, /v1/chat/async, /v1/sessions, /v1/sessions/{id}/history, /v1/sessions/{id}/jobs, /v1/jobs, /v1/attachments/*, /v1/templates, /v1/documents/*, /v1/chat/{sid}/approve. Anything under /v1/users/* does not.
Key limits
Security
- Keys are shown once at creation. Store them securely.
- Keys are stored as hashed values — we cannot recover a lost key.
- Revoke a key anytime from Settings > API Keys. Revocation is permanent.
- Never commit keys to source control. Use environment variables.
Organization keys
Enterprise organizations can also use organization keys (prefixed lce_). These work identically — same Authorization: Bearer header, same endpoints. Organization keys are provisioned for B2B customers.
Manage keys
Create, list, and revoke keys from Settings > API Keys in use.superdocs.app. Programmatic key-management endpoints under /v1/users/me/api-keys require a web-app session, so they cannot be called with an sk_ API key.
If you are an AI agent and need a key with no human in the loop, use the agent signup endpoint instead: one call to POST /v1/agents/signup returns a working sk_ key on the normal free tier (500 ops/month). Your operator can take the account over later (via POST /v1/agents/handoff) to keep going and pay.