> For the complete documentation index, see [llms.txt](https://docs.infraon.io/infraon-infinity-api-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infraon.io/infraon-infinity-api-guide/welcome/authorization.md).

# Authorization

All API requests to Infraon Infinity must be **authenticated** to ensure secure access and data protection. We use **API key-based authentication** via the `Authorization` header.

## Authentication Method

```http
httpCopyEditType: ApiKeyAuth
Location: header
Header Name: Authorization
```

### **Example Format:**

```
makefileCopyEditAuthorization: ApiKey YOUR_API_KEY
```

You must include this header in every request to access secured endpoints.

***

## Authorizing via Swagger UI

You can easily test and authorize API requests through the Swagger UI interface.

> **Tip:** Use the Authorize button to quickly apply your API key for all endpoints in the Swagger UI.

### **Steps to Authorize:**

1. Click the **🔐 Authorize** button at the top-right of the Swagger page.
2. In the dialog, you'll see:
   * **Name:** `Authorization`
   * **In:** `header`
   * **Type:** `apiKey`
3. Paste your API key into the **Value** field.
4. Click **Authorize**.

***

## Authorizing Specific Endpoints

You can authorize individual endpoints for more granular control:

1. Click the **lock icon** next to any endpoint in the Swagger UI.
2. Choose **ApiKeyAuth (apiKey)**.
3. Click **Authorize** to apply authentication to that endpoint.

***

## Once Authorized, You Can:

* Execute secured API calls directly from Swagger
* View detailed responses, payloads, and headers
* Test various scenarios using your API key’s access level

***

## Logging Out

To remove your credentials:

* Click the **Authorize** button again
* Select **Logout**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.infraon.io/infraon-infinity-api-guide/welcome/authorization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
