Skip to main content

curl Examples

Replace sk_YOUR_API_KEY with your actual API key in all commands.

Chat

Send a message with document

Send a message without document

Chat with model selection

Async chat

Start an async request

Jobs

Check job status

List all jobs

Cancel a job

Sessions

List sessions

Get session history

Get session jobs

Delete a session

Session deletion lives under /v1/users/me/sessions/{id} — that endpoint is part of the web-app account surface and accepts Firebase tokens only, not sk_ API keys. To clear sessions programmatically with an API key, simply stop using the session_id (sessions persist server-side but are not billed unless used). To delete from the UI, use Settings > Sessions in use.superdocs.app.

Documents

Upload a document to the editor

Export a document

Formats: docx (default), pdf, html, markdown, txt. See Exporting documents for the full options reference.

Attachments

Upload a file

Check attachment status

Delete an attachment

Templates

Upload a template

List templates

Delete a template

HITL approval

Approve a single change

Approve multiple changes

Deny with feedback

User management

The /v1/users/* endpoints (profile, usage, limits, sessions, programmatic API-key management) belong to the web-app account surface and accept web-app session tokens onlysk_ / lce_ API keys are rejected with a 401. View profile, usage, and tier limits from use.superdocs.app → Settings. To check usage from an API-key context, the usage block is included in every /v1/chat and /v1/chat/async response (monthly_used, monthly_limit, monthly_remaining, was_billable, subscription_tier) and in every SSE usage event — see SSE Streaming.

Verify your API key

The cheapest way to confirm an sk_ key works:
A 200 with a JSON list of sessions (possibly empty) confirms the key. A 401 means the key is wrong, revoked, or the header didn’t reach the server. Do not use /v1/users/me to verify an API key — it’s web-app-only and will return 401 even for a valid sk_ key, which makes the key look bad when it isn’t.

Health check

REST GET /health requires no authentication. The MCP health tool is different: it runs over the authenticated /mcp/ connection like every MCP tool, so a 401 there signals an API-key problem rather than downtime.