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

> ## Agent Instructions
> H Platform has four products: the Agents API (managed computer-use agents, base URL https://agp.eu.hcompany.ai/api/v2 or https://agp.hcompany.ai/api/v2 for the US), the Models API (OpenAI-compatible Holo vision-language models at https://api.hcompany.ai/v1), HoloDesktop CLI (Holo on the user's own desktop), and HoloTab (a free no-code Chrome extension that runs Holo in the user's browser, with recordable routines and schedules).
> Authenticate with a bearer API key from the HAI_API_KEY environment variable. SDKs: `pip install hai-agents` (Python, `from hai_agents import Client`) and `npm install hai-agents` (TypeScript, `import { HaiAgentsClient } from "hai-agents"`). CLI: `hai`.
> Agents do work in a browser or on a desktop; describe the task as an imperative instruction. To run a task quickly, prefer the pre-built agent `h/web-surfer-flash`. Read results from the session's `latest_answer` after it reaches a terminal status.
> Sessions are the unit of work; wait for a terminal status (completed, failed, timed_out, interrupted) before reading the answer. Use webhooks or the `changes` long-poll endpoint to follow progress.

# API reference

> Agents API base URLs per region, bearer authentication, JSON conventions, error envelope, pagination, idempotency, limits, and resources.

The Agents API is a JSON REST API. Every resource (agents, environments, sessions, skills, vaults, schedules, webhooks) has its own reference pages; this page holds the conventions they share.

## Base URL

H runs isolated EU and US regions. Requests stay in-region: an EU key only ever reaches EU infrastructure. The REST API lives under `/api/v2` and the [MCP server](/agents-api/mcp) under `/mcp` on each region's host.

| Region       | Host                         |
| ------------ | ---------------------------- |
| EU (default) | `https://agp.eu.hcompany.ai` |
| US           | `https://agp.hcompany.ai`    |

The SDKs and CLI default to the EU host; see [Client configuration](/agents-api/sdks#client-configuration) to switch.

## Authentication

Create a key at [platform.hcompany.ai/settings/api-keys](https://platform.hcompany.ai/settings/api-keys?product=computeruseagents\&source=docs). It is shown once and scoped to your organization, so store it server-side. Send it as a bearer token on every request:

```bash theme={"system"}
curl https://agp.eu.hcompany.ai/api/v2/sessions \
  -H "Authorization: Bearer $HAI_API_KEY"
```

The SDKs and CLI read `HAI_API_KEY` from the environment; see [Authenticate](/agents-api/sdks#authenticate).

## Request and response format

Request bodies are JSON with `Content-Type: application/json`. Responses are JSON, except `204 No Content` on deletes and on a [`changes`](/agents-api/sessions/changes) poll with nothing new. Timestamps are ISO 8601 strings.

## Errors

Non-2xx responses carry one envelope: `message` summarizes the problem, `detail` lists one entry per problem.

```json Error envelope theme={"system"}
{
  "message": "Session not found.",
  "detail": [
    { "type": "not_found", "message": "Session not found." }
  ]
}
```

Status codes, the `422` detail shape, and SDK retry behavior are on [Errors](/agents-api/errors).

## Pagination

List endpoints for sessions, agents, environments, skills, schedules, and webhooks take `page` (1-based, default `1`) and `size` (default `10`) and return a page envelope:

```json Page envelope theme={"system"}
{
  "items": [],
  "page": 1,
  "total": 47
}
```

`items` holds the resources, `page` echoes the page you asked for, and `total` counts all matches. Responses do not echo `size`, so track it yourself: there are more pages while `page * size < total`. Each list page documents its `size` cap and `sort` options.

[Vaults](/agents-api/vaults/list) and [browser profiles](/agents-api/browser-profiles/list) use offset pagination: `limit` and `offset` in, `total`, `limit`, `offset`, and a named array out.

## Idempotency

`POST /sessions` accepts an `Idempotency-Key` header so a retried create returns the original session. See [Create a session](/agents-api/sessions/create#header-idempotency-key) for the key rules and the `409` / `422` responses.

## Limits

There are no request-rate limits. Your plan caps tokens per billing period and concurrent sessions; both are readable from the API. See [Plans and limits](/agents-api/plans-and-limits).

## Resources

| Resource                                          | What it is                                                                                                | Path                   |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------- |
| [Agents](/agents-api/agents/overview)             | Reusable configurations: model, instructions, environments, skills, tools                                 | `/api/v2/agents`       |
| [Environments](/agents-api/environments/overview) | The surfaces an agent perceives and acts on: a cloud browser, or a browser or desktop on your own machine | `/api/v2/environments` |
| [Sessions](/agents-api/sessions/overview)         | One run of an agent on a task                                                                             | `/api/v2/sessions`     |
| [Skills](/agents-api/skills/overview)             | Reusable instruction fragments attached to agents                                                         | `/api/v2/skills`       |
| [Vaults](/agents-api/vaults/overview)             | Site logins the agent uses, without secrets passing through the API                                       | `/api/v2/vaults`       |
| [Schedules](/agents-api/schedules/overview)       | Sessions created on a recurring cron cadence                                                              | `/api/v2/schedules`    |
| [Webhooks](/agents-api/webhooks/overview)         | Signed HTTP notifications when sessions change status                                                     | `/api/v2/webhooks`     |
