Skip to main content
Use an API key to authenticate the Antigen SDK from scripts, CI pipelines, and applications.

Create an API key

Create an API key in the Antigen platform, then store it as ANTIGEN_API_KEY in your environment. For CI pipelines and hosted applications, use your environment’s secret store. Use a separate key for each application so you can replace or revoke one without affecting the others.

Initialize the SDK

Pass the key when creating the client. The SDK includes it with subsequent API requests.
Keep your key out of source control and browser code. If you’re building a frontend, make authenticated requests to Antigen from your application’s backend.

Replace or revoke a key

To replace a key, create a new one, update the applications that use it, and revoke the old key in the platform. If a key is exposed, revoke it and update the affected applications with a new key.