Skip to main content

Authentication

The SDK authenticates using an API key issued from your Decrackle dashboard.


Getting an API key

  1. Log in at dashboard.decrackle.io
  2. Go to Settings → API Keys
  3. Click Create Key and select the appropriate scope

Key prefixes

PrefixScope
decrackle_sdk_Standard SDK access (transcription, denoising)
decrackle_api_Full API access
decrackle_svc_Service-to-service access

The SDK validates the key format on initialization and throws immediately if the prefix is unrecognised.


Passing the key

Option 1 — Constructor (explicit)

import { Decrackle } from '@decrackle/sdk';

const client = new Decrackle({ apiKey: 'decrackle_sdk_...' });

Option 2 — Environment variable (recommended for production)

Set DECRACKLE_API_KEY in your environment and omit apiKey from the constructor:

export DECRACKLE_API_KEY=decrackle_sdk_...
const client = new Decrackle(); // picks up DECRACKLE_API_KEY automatically

Security guidelines

warning

Never hardcode API keys in source files or commit them to version control.

  • Use environment variables or a secrets manager (AWS Secrets Manager, GCP Secret Manager, Vault).
  • Rotate keys immediately if they are accidentally exposed.
  • Give each service its own key so you can revoke one without affecting others.