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

# Introduction

> Understand general concepts, response codes, and authentication strategies.

### Base URL

The Cortex API is built on **REST** principles. We enforce **HTTPS** in every request to improve data security, integrity, and privacy. The API does not support **HTTP**.

All requests contain the following base URL:

```
https://api.withcortex.ai
```

### Authentication

To authenticate, you need to add an Authorization header with the contents being `Bearer YOUR_API_KEY`.

```
Authorization: Bearer YOUR_API_KEY
```

Go to the [API Keys page](https://withcortex.ai/c/settings/api-keys) and create a new API key.

### Response codes

Cortex uses standard HTTP codes to indicate the success or failure of your requests.

In general, `2xx` HTTP codes correspond to success, `4xx` codes are for user-related failures, and `5xx` codes are for infrastructure issues.

| Status | Description                             |
| ------ | --------------------------------------- |
| `200`  | Successful request.                     |
| `400`  | Check that the parameters were correct. |
| `401`  | Check that the API key is correct.      |
| `404`  | The resource was not found.             |
| `429`  | The rate limit was exceeded.            |
| `5xx`  | Indicates an error with Cortex servers. |

### Rate limits

Cortex enforces rate limits to ensure fair usage of the API. If you exceed the rate limit, you will receive a `429` status code.

The rate limit is currently set at **500 requests per minute per IP address**.

<Info>We are working on a more flexible rate limit system.</Info>
