Skip to main content
The SDK authenticates with a VectorShift API key. Generate one at Account → API Keys.

Set the API key

The SDK reads VECTORSHIFT_API_KEY at import time. Set it once in your shell or secrets manager:

Per-organization keys

If you belong to multiple organizations, generate the key from inside the org you want the SDK to act on. The key carries the org context — there’s no separate org_id parameter.

Rotating keys

1

Generate

Create a new key in the platform.
2

Update

Roll out the new key to your environment / secret store.
3

Revoke

Delete the old key in the platform once nothing depends on it.
Old keys keep working until you delete them, so there’s no hard cutover.

Errors

AuthenticationError
exception
Raised when the key is missing or invalid.
PermissionDeniedError
exception
Raised when the key is valid but lacks scope for the requested operation.
See Errors for the full exception hierarchy.

Common causes of a 401

  • Wrong prefix. Keys start with sk_. Copy the whole key from Account → API Keys.
  • Key set too late. The env var is read at import — export it before import vectorshift, or set vectorshift.api_key before your first API call (see the Programmatic tab).
  • Wrong org. A key only acts on the org it was generated in — see Per-organization keys.

What’s next

Quickstart

Ship your first pipeline in 60 seconds.

Pipeline overview

Your first pipeline in five lines.

Errors

Full exception hierarchy.