Base URL and regions
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 on each region’s host.
The SDKs and the CLI default to EU. To target the US, see Region.
Authentication
Send your API key as a bearer token on every request. No key yet? Create one.401. The SDKs read the key from HAI_API_KEY (Authenticate). A few session reads also work without a key once the session is shared.
Requests and responses
- Request bodies are JSON, sent with
Content-Type: application/json. - Responses are JSON, except
204 No Contenton deletes and on achangespoll with nothing new, and a302redirect on file downloads. - Timestamps are ISO 8601 strings.
Pagination
List endpoints use one of two styles. Each list page documents its defaults, its cap, and itssort options.
Page and size
Sessions, session events, agents, environments, skills, schedules, schedule runs, webhooks, and every revision list takepage (1-based, default 1) and size, and return a page envelope:
Page envelope
size, so track it yourself: there are more pages while page * size < total.
Limit and offset
Vaults, vault items, and browser profiles takelimit and offset (default 0), and return total, limit, offset, and a named array: vaults, items, or profiles. There are more pages while offset + limit < total.
Idempotency
Create a session takes an optionalIdempotency-Key header, 1 to 255 characters. Retry with the same key within 24 hours and you get the original session back instead of a second one.
Revisions and concurrency
Agents, environments, and skills keep a revision history. Retrieve, create, update, patch, and restore return the revision number in theETag header, for example "3". A create returns "1".
Send that value back as If-Match on update, patch, delete, or restore to write only if nobody changed the resource since you read it:
An agent read with
resolve=true returns no ETag, since it also reflects the environments, skills, and subagents it expands.
Shared sessions
Once you share a session, these endpoints answer for it without a key:- Retrieve a session (
runnerreadsnull) - Get session status
- Get session changes
- List session events
- Download a session resource
Errors
Errors carry amessage and a detail array, one entry per problem:
Error envelope
detail string instead, except on 422. Requests rejected before they reach the API, such as a 401, may carry only a message.
Each endpoint page lists its own causes. Retry rules, quota details, and session failure codes: Errors.