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

# Introduction

> The Clicks Agents API is a small REST API: JSON in, JSON out.

The Clicks Agents API is a small REST API: JSON in, JSON out.

## Base URL

All requests use the US production environment:

```text theme={null}
https://app.us.goclicks.ai/v1
```

## Authentication

Send your API key as a Bearer token on every request: `Authorization: Bearer ak_…`. If the `Authorization` header is missing or isn't a Bearer credential, the API also accepts the key in an `X-API-Key` header; when a request includes both, the Bearer token wins. Keys are created on an agent's **API access** tab — see [Authentication](/authentication) for key management.

## Errors

The API uses standard HTTP status codes. Failures return `{"detail": "<reason>"}`; request-validation errors return `422` with a list of issues. For every status and its retry guidance, see [Errors and retries](/api/errors).

## Endpoints

| Method | Endpoint                                        | Path                    |
| ------ | ----------------------------------------------- | ----------------------- |
| `POST` | [Create an agent run](/api/create-an-agent-run) | `/v1/agents`            |
| `GET`  | [Get an agent run](/api/get-an-agent-run)       | `/v1/agents/{agent_id}` |

Every endpoint page includes an interactive playground — requests go directly from your browser to the API.

## Versioning

The `/v1` API is stable: we make only additive changes, such as new endpoints, new optional request fields, and new response fields. Ignore response fields you don't recognize. Any breaking change ships under a new path prefix. Nothing inside `/v1` breaks.

## OpenAPI schema

An OpenAPI 3.1 document describes the API, and this reference renders from that same file. Use it to generate typed clients: [Download openapi.public.json](https://app.us.goclicks.ai/v1/openapi.json).
