Skip to main content
Every request authenticates with an H API key sent as a bearer token. A key is scoped to your organization: the agents, skills, and environments it creates are private to that org, and the reserved h/ namespace holds H’s public ones. The API is served from https://agp.eu.hcompany.ai, and every route lives under /api/v2.

Get an API key

Create a key at platform.eu.hcompany.ai/settings/api-keys: click Create key and give it a name. The key is shown once, so store it securely and keep it server-side. Never commit it to source control or ship it in client code.

Authenticate a request

Send the key in the Authorization header as Bearer $H_API_KEY. Configure the client once and it attaches the key to every call.
export H_API_KEY="hk-..."

curl https://agp.eu.hcompany.ai/api/v2/sessions/quota \
  -H "Authorization: Bearer $H_API_KEY"

Region

The client defaults to the EU host (https://agp.eu.hcompany.ai). To target another region, pass it explicitly:
from hai_agents import Client, HaiAgentsEnvironment

client = Client(api_key="hk-...", environment=HaiAgentsEnvironment.US)

Organization scoping

A key acts as its organization. Resources you create are visible only within that org, and you reference them by the id or name you assign. Names under the h/ prefix are reserved: they are H-maintained, read-only, and available to every organization.
A missing or invalid key returns 401, and a valid key without permission for an operation (such as modifying a reserved h/ resource) returns 403. See Errors for the full list.