Authentication and API keys
Choose the credential for the API you are calling, and rotate it without interrupting your application.
Create a model API key
- Sign in and open API keys. Create a key and name it for the application or environment that will use it.
- Copy the key when it appears. Store it in a server-side secret store. The console shows only its prefix after you close it.
- Send it in the Authorization header using the Bearer scheme when calling https://alignworlds.com/v1. GET /v1/models lists the models available to the key.
Use a Terrarium API key for runs
Your organization’s Terrarium key starts with tk_ and authenticates requests at https://api.alignworlds.com/api/v1. Request run access from Align Worlds if your workspace has no engine credentials. A model key starts with aw- and is issued separately.
Supply the Terrarium key as a bearer token. Check GET /api/v1/account to confirm the organization and balance before starting a run.
Rotate or revoke a key
Create a replacement first. Put it in your application’s secret store, deploy it and make a successful authenticated request. Revoke the old model key on API keys. Revocation takes effect immediately. If a key is exposed, revoke it as soon as possible.
For a Terrarium key, ask Align Worlds to issue a second key for the same organization. Move the integration, check the account endpoint with the new key and ask support to revoke the old one. Give support the key name, never its value. Keep keys out of browser code, URLs, screenshots and support messages. Use the key name or prefix when asking for help.