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

# Introduction

> Use the TeamAI REST API to run agents and manage projects from your own applications.

## Base URL

All API requests use the following base URL:

```text theme={null}
https://app.teamai.com/api/v1
```

Every request must be authenticated with an API key. See [Authentication](/api-reference/authentication) for details.

## Response format

All endpoints return JSON. Successful requests return a `200` status code with the result wrapped in a `data` object:

```json theme={null}
{
  "data": {
    "id": "cln8x2k3m0001...",
    "name": "Example resource"
  }
}
```

Failed requests return an error object with a machine-readable `code`, a human-readable `message`, and a `details` object with additional context:

```json theme={null}
{
  "code": "not_found",
  "message": "Project not found",
  "details": {
    "resource_id": "cln8x2k3m0001...",
    "resource_type": "Project"
  }
}
```

## Error codes

| HTTP status | Code                    | Meaning                                                    |
| ----------- | ----------------------- | ---------------------------------------------------------- |
| 400         | `bad_request`           | Request body or parameters failed validation               |
| 401         | `not_authenticated`     | API key missing or invalid                                 |
| 401         | `unauthorized`          | API key valid but not permitted to access this resource    |
| 403         | `forbidden`             | Operation not allowed for this key or plan                 |
| 404         | `not_found`             | Requested resource does not exist or is not visible to key |
| 405         | `method_not_allowed`    | HTTP method not supported by this route                    |
| 500         | `internal_server_error` | Unexpected server error                                    |

<Note>
  Validation errors (`bad_request`) include field-level information in
  `details`, such as a `missing_field` key naming the field that was omitted.
</Note>
