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

# API introduction

> Base URL, authentication, errors, and common response formats.

# API introduction

## What it is

The `agentsfleet` API lets your software create, inspect, and control fleets. Send requests to `https://api.agentsfleet.net`.

The linked OpenAPI file describes every path, request body, response, and status code.

## Why it exists

Use the API when a script or service needs direct access. Use the command-line client for interactive terminal work.

## How it behaves

Most paths accept a bearer token in the `Authorization` header. Tenant API keys start with `agt_t` and are shown once when created.

Interactive users can sign in with `agentsfleet login`. The login flow saves a short-lived JSON Web Token (JWT).

Webhook and connector paths use provider signatures instead of bearer tokens. The OpenAPI security section on each operation states the required method.

`<WORKSPACE_ID>` comes from `agentsfleet workspace list`. Use an obviously fake key in copied examples.

```bash theme={"theme":"vesper"}
curl https://api.agentsfleet.net/v1/workspaces/<WORKSPACE_ID>/fleets -H "Authorization: Bearer af_test_00000000"
```

```text theme={"theme":"vesper"}
{"items":<varies>,"total":<varies>,"cursor":<varies>}
```

Errors use the HTTP problem details format. Each product error includes an `error_code`, a `request_id`, and a documentation URL.

Identifiers use version 7 Universally Unique Identifiers (UUIDs). Timestamps use Unix milliseconds unless an operation states another unit.

## Limits

The request line and headers can use up to 16 KiB. The server refuses larger header blocks before API routing.

Clients may receive HTTP `431` or a closed connection. Reduce credentials, cookies, or forwarding headers before retrying.

Rate limits apply per workspace. A limited request includes `Retry-After`; wait for that delay before retrying.

Streaming activity uses Server-Sent Events (SSE). A stream can return `UZ-API-002` when the service cannot accept another subscriber.

## Related pages

* [OpenAPI 3.1 file](https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json)
* [Authentication scopes](/api-reference/scopes)
* [Error registry](/api-reference/error-codes)
