Authentication and accounts
Authenticate Web API requests with a vitna_web_ bearer key or an org key (vitna_key_), relay requests through vitna.ai, activate invitations, and manage client keys.
Authentication and the website relay
The hosted API answers at https://web.vitna.ai. Since 2026-10-07 a browser that opens it, or its /docs, is sent to /apis and this reference on vitna.ai, where the product's pages live: the operator sets VITNA_WEB_PAGE_URL and VITNA_WEB_DOCS_URL, and a self-hosted instance with neither set serves its own reference page.
Web operations use a vitna_web_ bearer key:
curl http://127.0.0.1:8790/v1/read \
-H "Authorization: Bearer $VITNA_WEB_KEY" \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com/","format":"markdown","render":true}'The website can forward requests to the standalone service. Set VITNA_WEB_SERVICE_URL in the website environment, for example to http://127.0.0.1:8790. The relay forwards the caller key and maps /api/web/read to /v1/read. It also supports the job and monitor routes listed below. Every route carries a credential, so the relay sends nothing over plain HTTP except to a literal loopback address (127.0.0.1 or [::1]); any other service URL must be HTTPS, and the relay answers 503 otherwise.
The website relay is mounted as a catch-all route:
GET /api/web/[...path]
POST /api/web/[...path]
DELETE /api/web/[...path]Replace [...path] with the supported operation or job path when making a request, such as read or jobs/JOB_ID.
With no service configured, the relay returns an explicit configuration error. The /apis playground starts with illustrative output; Execute live request sends a real request through the relay. Its password field keeps the key in component memory, with no browser storage.
API accounts and keys
An operator issues each invitation (see issuing invitations). It carries a one-time activation token, which lasts 24 hours by default. Redeem it once, on the account page or directly:
curl http://127.0.0.1:8790/v1/accounts/activate \
-H 'Content-Type: application/json' \
-d '{"activationToken":"REPLACE_WITH_PRIVATE_ACTIVATION_TOKEN","label":"Application"}'The HTTP 201 response contains apiKey, ownerToken, account metadata, and initial key metadata. Save the returned tokens privately; subsequent reads do not return them. API keys use vitna_web_; owner tokens use vitna_web_owner_. The owner token manages the account and keys, while an API key executes the web operations.
| Endpoint | Owner-token operation |
|---|---|
GET /v1/account | Account, key metadata, and accounting status |
POST /v1/account/rotate | Replace the owner token; send an empty JSON object |
GET /v1/keys | List active, expired, and revoked key metadata |
POST /v1/keys | Issue a key with optional label and expiresAt |
POST /v1/keys/:id/rotate | Replace that key, invalidating its previous token |
DELETE /v1/keys/:id | Revoke that key |
GET /v1/invoices/YYYY-MM | Metered monthly usage statement |
Use Authorization: Bearer $VITNA_WEB_OWNER_TOKEN for those routes. Creation and rotation bodies accept optional label and an ISO UTC expiresAt, such as 2026-12-01T00:00:00.000Z. Labels accept up to 80 characters. API keys expire within 366 days; up to 20 keys per account are retained. New requests reject revoked and expired tokens immediately. Owner rotation invalidates the old owner token. Activation requests are limited to 10 per minute per process; owner operations to 60 per minute per account. These management routes use JSON bodies up to 4,096 bytes and do not accept query parameters.
The SQLite store retains account metadata and credential hashes. Replaying the startup invitation configuration cannot redeem a used invitation again or restore a rotated credential. Customer payments are not collected.
Public signup is closed on the hosted pilot, and keys are issued by invitation. GET /v1/accounts/signup reports whether it is open; the operator's switch is described under optional public signup.
A lost owner token cannot be shown again. Ask through the contact form and an operator issues a new one, as described under offline operator recovery.
