curl,
fetch, requests, or any HTTP client.
Base URL
/api/v1/. We follow semver
on the path: breaking changes go into /api/v2/, never into v1.
Auth
Bearer token in theAuthorization header:
Content type
All POST/PATCH bodies are JSON. The server returns JSON for every status code except204 No Content and 429 Too Many Requests (which return empty body).
End-to-end with curl
A complete TFHE flow using onlycurl:
/tfhe/eval-session (FHE-blind) and
do encryption/decryption client-side. See Server Mode.
Standard response shape
Successful responses are bare JSON objects:request_id is the single most useful thing to include in support tickets.
HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | Success, no body |
400 | Validation error — check error.message |
401 | Auth missing or invalid |
402 | Payment required (over plan limit, no overage allowed) |
403 | Auth valid, but role lacks permission |
404 | Resource not found |
409 | Conflict (e.g. session_id reuse) |
413 | Payload too large (eval keys >40 MB, ciphertexts >2 MB) |
422 | Schema parse failed |
429 | Rate limited — retry after Retry-After seconds |
500 | Server error — safe to retry idempotent requests |
502 | Upstream dependency unavailable (Stripe, Redis, etc.) |
503 | Service in maintenance |
Rate limits
Plan limits are enforced at three granularities:| Granularity | Window | Headers |
|---|---|---|
| Per-account daily | 24 h | X-RateLimit-Daily-{Limit,Remaining,Reset} |
| Per-account monthly | 1 calendar month UTC | X-RateLimit-Monthly-{Limit,Remaining,Reset} |
| Per-IP burst | 60 s | X-RateLimit-Burst-{Limit,Remaining,Reset} |
Retry-After seconds and retry. The SDKs do this automatically.
Pagination
List endpoints (/keys, /webhooks, /billing/invoices) use cursor-based
pagination:
limit ranges from 1–100 (default 20). The cursor is opaque base64 — don’t
parse or modify it.
Idempotency
Mutation endpoints (POST /keys/*, POST /tfhe/eval-session) accept an
optional Idempotency-Key header (any string ≤256 chars). Replays within
24 h return the cached response — safe to retry.
Webhooks (vs. polling)
For long-running compute (CKKS deep circuits, batch jobs >30 s), prefer webhooks over polling:CORS
The API allowsAuthorization and Content-Type from any origin
(Access-Control-Allow-Origin: *). However, never embed a wvs_live_* key
in browser source — get a wvs_trial_* key per session, or proxy through
your backend.
OpenAPI spec
Machine-readable schema at:openapi-generator:
Language quickstarts
Next Steps
API Reference
Endpoint-by-endpoint schemas
Webhooks
Async event delivery