# Authentication

Send your API key with every request.

Every request to `https://api.ewest.ai/v1` carries your API key in the `Authorization` header as `Bearer sk-…`. Clients built for the Anthropic API can send it in the `x-api-key` header instead.

## API keys

> Keep your key on your server. Never put it in browser code, a mobile app or a public repository: anyone who finds it can spend your budget. Call eWest from your backend and have your web or mobile client call that instead.

- Create keys in the console under [API keys](https://ewest.ai/keys). A key is shown once, so copy it right away.
- Keep keys in an environment variable such as `EWEST_KEY` or in your platform's secret store. If a key leaks, revoke it in the console and create a new one.
- A key can have a budget and a list of allowed models. Going over the budget returns `402`, a model the key may not use returns `403` (see [Errors](https://ewest.ai/docs/errors)).
- A missing, invalid, expired or blocked key returns `401`.

Source: https://ewest.ai/docs/authentication
