> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/api-documentation/api-reference/ox-api-authentication.md). Agents can also search and read this documentation through its [MCP server](https://docs.ox.security/~gitbook/mcp).

# OX API Authentication

To start using OX API, you need to get a new API token. After that you can start sending requests.

OX API requests are subject to rate limits per API key.

| Limit type | Requests allowed        |
| ---------- | ----------------------- |
| Hourly     | 1,000 requests per hour |
| Daily      | 15,000 requests per day |

If a limit is reached, additional requests are blocked until the time window resets. For example, if you have fewer remaining daily requests than hourly requests, the daily limit becomes the active limit.

OX API responses include headers that indicate your current rate limit status.

| Header                | Description                                                                            |
| --------------------- | -------------------------------------------------------------------------------------- |
| `RateLimit-HourLimit` | Maximum number of requests allowed per hour.                                           |
| `RateLimit-DayLimit`  | Maximum number of requests allowed per day.                                            |
| `RateLimit-Limit`     | The active rate limit. This is the limit that will be reached first (hourly or daily). |
| `RateLimit-Remaining` | Number of remaining requests for the active limit.                                     |
| `RateLimit-Reset`     | Number of seconds until the active limit resets.                                       |

The active limit is determined by the most restrictive constraint at the time of the request.

### On-prem API URL

If your OX deployment is hosted on-prem, use your organization’s OX domain as the API base URL.

Use the following format:

`https://<CustomerDomain>/api/apollo-gateway`

Replace `<CustomerDomain>` with the domain of your on-prem OX environment.

The API path remains the same for both SaaS and on-prem deployments. Only the domain changes.

### API compatibility

To help avoid breaking existing integrations, OX does not introduce breaking changes to existing queries or mutations.

New APIs and fields may be added over time. Older APIs or fields may be marked as deprecated before they are retired.

If a breaking change is ever required, customers should be notified in advance.

## [**Step 1: Create a new API key \[OX\]**](https://docs.ox.security/admin-settings/creating-api-keys.md)

## Step 2: Send an authenticated request \[Postman]

1. In the **Postman**, add the collection and then:

* Select request method `Post`.
* Use the API URL:
  * SaaS: `https://api.cloud.ox.security/api/apollo-gateway`
  * On-prem: `https://<CustomerDomain>/api/apollo-gateway`
* In **Headers** > **Authorization**, add the OX API key.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-b7c3ca22e3ddca2bf11d051a6297f592f86ca731%2F5b.png?alt=media" alt=""><figcaption></figcaption></figure>

2. In the **Body** section, add query and click **Send**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-745e32827e5186b18f8bb4c01b51420a3d59d97d%2F6a%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ox.security/api-documentation/api-reference/ox-api-authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
