Skip to main content
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 under /mcp on each region’s host. The SDKs and CLI default to the EU host; see Client configuration to switch.

Authentication

Create a key at platform.hcompany.ai/settings/api-keys. It is shown once and scoped to your organization, so store it server-side. Send it as a bearer token on every request:
The SDKs and CLI read HAI_API_KEY from the environment; see 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 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.
Error envelope
Status codes, the 422 detail shape, and SDK retry behavior are on 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:
Page envelope
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 and browser profiles 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 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.

Resources