> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alura.io/llms.txt
> Use this file to discover all available pages before exploring further.

# browser_refused

> API keys are refused from browsers. HTTP 403, not retryable.

**HTTP 403: API keys are refused from browsers.** Retrying the same request gives the same error. Errors never cost API credits.

A request carried an API key together with an `Origin` or `Sec-Fetch-*` header, which browsers send. Call the API from a server or a script, and rotate a key that was shipped in a web page.

**What to do:** Call the API from a server or script, and keep the key out of web pages.

```json Response theme={null}
{
  "type": "https://docs.alura.io/errors/browser_refused",
  "title": "API keys are refused from browsers",
  "status": 403,
  "code": "browser_refused",
  "detail": "API keys are refused from browsers",
  "suggestion": "Call the API from a server or script, and keep the key out of web pages.",
  "retryable": false,
  "request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}
```

The response is `application/problem+json` (RFC 9457) and has a `Request-Id` header with the same `request_id`. See [all errors](/api-reference/errors).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.