Create a key
1
Open Keys
Sign in at platform.trustqai.com and open Keys.
2
Name it and choose an expiry
Give the key a name that says where it is used, such as the application or environment. Choose when it expires: Never expires, 7, 30, 90 or 365 days, or a custom date.
3
Copy the key
The full key is shown once, when you create it. Copy it into your application’s secret store. Afterwards the dashboard shows only its first and last characters.
sk-qai-. Send the key in the Authorization header of every request:
A new key can take up to a minute before the API accepts it. Requests sent sooner return
401.Expiry
A key’s expiry is set when you create it and cannot be changed afterwards. A custom expiry must be at least five minutes in the future. Once a key expires, the API rejects it with401 and the dashboard marks it Expired. To keep an application running, create its replacement before the old key expires.
Revoke a key
Revoke a key from its details on the Keys page when it is no longer needed or may have been exposed. Revoking is permanent: the key never works again, so create a new key for anything that still needs access. The API stops accepting a revoked key within a minute.Keep keys safe
- Store keys in environment variables or a secret manager, never in source code or client-side apps.
- Use a separate key per application or environment, so you can revoke one without affecting the others.
- Revoke a key straight away if it appears somewhere it should not, such as a public repository or a chat message.