Skip to content

Authentication

All requests to the Bastyn Public API require an API key passed in the Authorization header.

API Key format

Authorization: Bearer bastyn_sk_your_key_here

Creating an API key

  1. Log in to app.bastyn.ai
  2. Go to Settings → Environments
  3. Enter a name (e.g. CI/CD Pipeline, Production)
  4. Click Create API Key
  5. Copy the key immediately — it is shown only once

Revoking a key

Go to Settings → Environments and click the trash icon next to the key. Revocation takes effect immediately.

Security best practices

  • Store keys in environment variables or CI/CD secrets — never in source code
  • Create one key per environment (local, staging, production)
  • Rotate keys periodically and after any suspected exposure