Key Scope and Billing
Each key belongs to one user and one organization. You can create one current AI Gateway key per organization you belong to; other members manage their own keys. Usage with your key is billed to that organization’s SaladCloud credit balance. Use a separate key for each organization you want to bill.An AI Gateway key is not your account’s Current API Key. Send the Gateway key in
Authorization: Bearer, not in
the Salad-Api-Key header. Changing your account API key does not rotate your AI Gateway keys.Create a Key
- Sign in to the SaladCloud portal and open the organization you want to bill.
- Select AI Gateway in the organization’s left navigation.
- Click Create API Key for organization name.
Find and Copy a Key
- Select your username in the upper-right corner of the portal, then select API Access.
- Under AI Gateway Keys, find the organization you want to bill.
- Click the copy icon next to that organization’s masked key.
SALAD_AI_GATEWAY_API_KEY or your application’s secret
manager. Never commit it to source control, expose it in browser code, or share it with other users.
Regenerate a Key
Regeneration creates a replacement for your key in the same organization. Use an expiration delay to migrate clients without interrupting new requests during the changeover:- Open the organization’s AI Gateway page, directly or through Manage on the API Access page.
- Choose “Change API Key” for the key you want to regenerate.
- Choose when the previous key should expire, then confirm regeneration. The expiration delay applies to the previous key, not the replacement.
- Copy the replacement key and update every application or secret store that uses the old value.
- Before the delay expires, verify your applications use the replacement key. A test completion consumes tokens and is billed to the organization.
Delete a Key
- Open the organization’s AI Gateway page.
- Choose the key’s delete action and confirm deletion.
- Remove the deleted credential from applications and secret stores that used it.
Organization Membership and Deletion
- If you leave or are removed from an organization, your AI Gateway key for that organization is deleted. Keys for other organizations are unaffected.
- If an organization is deleted, all AI Gateway keys belonging to it are deleted.
- If your user account is deleted, all of your AI Gateway keys are deleted.
Requests Already in Progress
The Gateway checks the key and pay-per-token access conditions when it admits a request, not continuously during generation. Requests already admitted, including streaming responses, are allowed to complete and their token usage is billed to the key’s organization even if:- The key is deleted, revoked, or regenerated while the request is running.
- The previous key’s expiration delay ends while the request is running.
- The organization’s credits run out while the request is running.