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

# UnauthorizedResponseError

Unauthorized - Authentication required or invalid credentials

## Fields

| Field                 | Type                                                                                        | Required             | Description                         | Example                                                                     |
| --------------------- | ------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- | --------------------------------------------------------------------------- |
| `error`               | [components.UnauthorizedResponseErrorData](../components/unauthorizedresponseerrordata.mdx) | :heavy\_check\_mark: | Error data for UnauthorizedResponse | \{<br />"code": 401,<br />"message": "Missing Authentication header"<br />} |
| `openrouter_metadata` | Dict\[str, *Nullable\[Any]*]                                                                | :heavy\_minus\_sign: | N/A                                 |                                                                             |
| `user_id`             | *OptionalNullable\[str]*                                                                    | :heavy\_minus\_sign: | N/A                                 |                                                                             |
