Hatz AI REST API

Explore Hatz AI's API reference. Hatz AI provides software tools and libraries to accelerate development.

The API provides access to all models on the Hatz AI platform and includes two main LLM interface patterns:

  • Hatz-native Chat Completions (/v1/chat/completions) with the Hatz harness, recursive tool calling, and server-side tools.
  • OpenAI-compatible Responses (/v1/openai/responses) for clients that expect OpenAI Responses wire format.

For OpenCode and other OpenAI-provider clients, start with OpenAI Responses.

We also do have a TypeScript SDK, where you can contact the Hatz Team for access.

Base URL

The base URL for all API requests is:

https://ai.hatz.ai/v1

Authentication

The Hatz API uses API Keys for authentication. You would need to set the X-API-Key header in your requests.

Each API Key is scoped to a specific user, so users can make their own API Key. The API Key should provide access to the apps the user has access to.

You can generate API Keys on the platform on the Hatz Admin Dashboard by navigating to the settings tab, however you can contact the Hatz team at help@hatz.ai to request an API Key for your user.

Example curl command:

curl 'https://ai.hatz.ai/v1/chat/models' \
  -H "X-API-Key: $HATZ_API_KEY"