Skip to content
Docs ·Authentication and API keys

Authentication and API keys

Send your key and set per-key spending limits

For each request, include Bearer followed by your key in the Authorization header. You can also use the x-api-key header with the Anthropic SDK.

curl https://alprouter.com/api/v1/key \
  -H "Authorization: Bearer alp-your-key"

The list of models (/models) and the list of suppliers (/providers) can be viewed without using any keys.

Set limits for each key.

  • When creating keys, or after they’re created, it’s possible to determine the amount of money that can be used with those keys. If the limit is reached, only that key will be stopped from being used, while other keys will continue to function as usual.
  • It’s possible to pause or delete the keys for a while. But you can’t use the deleted keys right away.
  • The amount and limit of the keys can be seen as GET /key.

There’s very little that can be done in terms of Kiro.

On the keyboard screen of the console, it’s possible to set limits for each key. Even if the key is accidentally pressed, the damage will be limited to that range.

RestrictionsExplanation/DescriptionIf it breaks…
Allowed modelsThe names of models should be separated by commas. It’s also possible to use asterisks, like in “antropic”. This option allows for automatic selection and scrolling as well.403 model_not_allowed
Allowed IP addressesPlease enter the address or subnet mask (203.0.113.0/24). If you enter the fixed address of the server, it can’t be used elsewhere.403 ip_not_allowed
Expiration dateAfter this day passes, the key will stop working. It’s better to use a temporary key for now.401 key_expired

Use your keys safely.

  • Keep your API key on the server. Anyone can extract and use a key embedded in a browser or an app.
  • If each key is assigned a separate limit, then even if there’s a breach in the system, the damage will be limited to that limit.
  • If the key is lost, delete it from the console and create a new one. We don’t save keys as such, so we can’t show you a new one again.

It can be called up 120 times per minute. If more help is needed, please let us know at help@alpsoft.io.