Visnea API

Authentication

Every /v1 request is authorized with an API key in the sk-visnea-… format. One key covers generation, chat and the editor plugins — all on one balance.

API keys

Keys are created in the cabinet: Account or Plugins → the API keys card. The secret is shown once at creation — afterwards only the prefix is visible.

  • You can have several keys — one per integration (CLI, backend, plugin).
  • Any key can be revoked in the cabinet; a revoked key stops working immediately.
  • A key inherits your account's access and balance — there are no separate scopes.
Create or revoke keys: the Visnea cabinet.

Response without a key

A request without a key (or with a revoked one) returns 401 with the error envelope:

401 · response
{  "error": "auth required",  "code": "unauthorized"}

Security

  • Keep the key server-side (environment variable, secret manager). Never embed it in client code, mobile apps or repositories.
  • If a key leaks, revoke it in the cabinet immediately and create a new one.
  • Use separate keys per environment (dev/prod) — rotation gets much easier.