Skip to Content
Vatis TechAPI docs

Authentication and API keys

Every request carries your API key, and a web page uses a single-use token instead.

Every request carries an API key of your workspace in the Authorization header, the WebSocket handshake included. Only /ping needs no key. A web page never holds a key: it uses a single-use token.

Send your key

Send it as a bearer token. The examples read it from VATIS_KEY (Quickstart shows how to set it).

curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/models

API keys

Make one key per application, on the console's API keys page (the workspace's owners and admins can) or from code with an Admin key. A new workspace has no keys: verify your email, then create the first one.

  • Shown once. A key starts with vatis_sk_ and is shown only when it is made. The API keeps only its hash and a readable prefix, so keys can be told apart in the list. A lost key cannot be shown again: make a new one and revoke the old one.
  • Name. 1 to 64 letters, digits, dots, dashes or underscores. No two active keys of a workspace share a name.
  • Expiry. A key can stop on a day you choose (the last UTC day it works). Without one, it has no end.
  • Revoked or expired. A revoked key, and every token made with it, is refused from the next request on. So is a key whose last day has passed. What the key already started goes on: a live session already open runs until it ends, and a file already accepted is still transcribed. Nothing is deleted: Usage and Activity still name the key.

Roles

A key is a Member key unless it was made an Admin key. The API enforces the difference, whoever holds the key:

Admin keyMember key
Transcribe files, live sessionsyesyes
Usage and Activity (Usage)the whole workspaceits own work
Transcripts: list, read, export, deleteevery key'sthose its own key made
Webhooksmanage themno, but its files can be delivered to one by its id
Vocabularies (Vocabularies)manage themlist and read them, and its live sessions and files can use one by its id
/v1/keysyesno

A request a Member key may not make is 403 admin_only. A transcript of another key answers as one that does not exist: 404 not_found. An Admin key sees only its own workspace.

Refused keys

No key, a wrong key, a revoked or an expired one is 401 unauthorized, with the header WWW-Authenticate: Bearer; a live session gets an error unauthorized and close code 1008. After more than 10 refused keys or tokens from one address within a minute, the API answers that address's further refusals 2 seconds late. A valid key is never delayed.

Keep your key safe

  • Keep keys on servers. Read them from the environment or a secret store. Never put a key in a web page, a URL, your source code or a command line. A web page uses a single-use token instead.
  • Keep it out of your shell history. export VATIS_KEY=... with the key on the line stays in the history. read -rs does not: paste the key, then press Enter (it is not shown).
read -rs VATIS_KEY && export VATIS_KEY
  • On a shared machine, keep it off the command line. Other users of the machine can see command lines (with ps), and -H "Authorization: Bearer $VATIS_KEY" puts the key on curl's. Give curl the header on its standard input instead:
printf 'Authorization: Bearer %s\n' "$VATIS_KEY" | curl -sS -H @- https://api.eu.vatis.tech/v1/models

A key got out?

Revoke it on the API keys page at once, then make a new one for that application. Its Activity shows what it was used for.

Tokens for web pages

A browser cannot set headers on a WebSocket, and an API key must never reach a browser. So your server makes a single-use token with its key and hands it to the page, which puts it in the address as token. A program on a server needs no token: it uses its key.

POST/v1/tokens

Body {"type": "realtime"} for one live session, or {"type": "batch"} for one file.

curl -sS -H "Authorization: Bearer $VATIS_KEY" -H "Content-Type: application/json" \
  -d '{"type": "realtime"}' https://api.eu.vatis.tech/v1/tokens

Expected result: 200 and the token (shortened here).

{"token": "vatis_tk_...", "type": "realtime", "expires_at": "2026-11-12T09:29:03Z"}

The page then uses it instead of the key, once, within 15 minutes:

ForThe address
A live sessionwss://api.eu.vatis.tech/v1/speech-to-text/realtime?model_id=vatis_ro_v9_realtime&token=<token>
One file (a batch token)POST https://api.eu.vatis.tech/v1/speech-to-text?token=<token>
  • One use, 15 minutes. Make a new token for every session. A used, expired or wrong-type token is refused as unauthorized; a wrong-type token is not used up.
  • It acts for its key, with the role the key has when the token is used. Revoking the key cancels its tokens. A token cannot make a token, and it never opens /v1/keys.
  • With both a key and a token, the key is used and the token is kept. On the WebSocket, a wrong key in the header is refused even with a good token.
  • Refused requests: 400 missing_parameter without type, 400 invalid_parameter for another type or another field, 400 invalid_request for a body that is not a JSON object, 413 request_too_large over 64 KB.

Call the REST endpoints from your server, never from a web page, which would need your key. Browsers give the microphone only to secure pages: HTTPS, or http://localhost. A whole page with live text: Real-time transcription.

Which key is this

GET/v1/me

The key this request carries: its id, name and role. Any key.

curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/me
{"id": "key_3f9c1a2b7d4e", "name": "crm-backend", "role": "member"}

Manage keys from code

An Admin key lists, makes, changes and revokes the keys of its workspace. These are the same keys as on the console's API keys page: a key made in one place shows in the other.

A key, as every answer below gives it (never the key itself, except once when it is made):

{"id": "key_3f9c1a2b7d4e", "name": "crm-backend", "prefix": "vatis_sk_AbCdEf", "role": "member", "state": "active",
 "created_at": "2026-11-12T09:14:03Z", "last_used_at": "2026-11-12T10:01:44Z", "expires_at": null, "revoked_at": null}
FieldIs
idThe key's id: key_ and 12 hex digits.
nameIts name.
prefixThe key's first characters, to tell it apart.
roleadmin or member (Roles).
stateactive, expired or revoked.
created_atWhen it was made; last_used_at when it last made a request (null: never).
expires_atWhen it stops: the start of the day after its last day, in UTC. null: no end.
revoked_atWhen it was revoked, or null.

List the keys

GET/v1/keys

{"keys": [<key>, ...]}, oldest first. Revoked keys only with ?include_revoked=true.

curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/keys

Make a key

POST/v1/keys

Body name (required), role (admin or member, default member), expires_on (YYYY-MM-DD, the last UTC day it works; default none).

curl -sS -H "Authorization: Bearer $VATIS_KEY" -H "Content-Type: application/json" \
  -d '{"name": "crm-backend", "expires_on": "2027-01-31"}' https://api.eu.vatis.tech/v1/keys

201: the key object plus key, the key itself (vatis_sk_...), the only time it is shown. The answer has Cache-Control: no-store. Hand the key to its application through a channel you trust.

Change a key's role

PATCH/v1/keys/{id}

Body {"role": "admin"} or {"role": "member"}. It applies at once, to the key's open tokens too. 200: the key as it is now.

Revoke a key

DELETE/v1/keys/{id}

Revokes the key and its open tokens: 204, also when it was revoked already. New requests with it are refused at once; what it started goes on.

When a change is refused

StatusCodeWhy
400missing_parameterNo name (make), no role (change).
400invalid_parameterA field that is unknown or not valid, a day that has passed: param names it.
400invalid_requestA body that is not a JSON object.
403admin_onlyA Member key.
404not_foundNo key of this workspace has that id.
409name_takenAn active key has that name: revoke it first, or pick another name.
409key_revokedA change to a revoked key.
409last_adminThe workspace's last active Admin key cannot be revoked or made a Member from code: make another key Admin first.
413request_too_largeA JSON body over 64 KB.

The console's API keys page can revoke any key, the last Admin key too: the console is the way back when no Admin key is left. Every code: Errors.

On this page