canonical: https://jentic.com/apis/hatz.ai/hatz-ai

# Hatz AI API

Hatz AI provides an AI inference gateway aimed at managed service providers and small businesses, exposing chat completion endpoints that follow the OpenAI request shape. The API offers a /chat/completions endpoint for standard chat workloads, an /openai/responses endpoint for the newer Responses API pattern, and a /chat/models endpoint for listing the language models available on the account. Teams use it to embed conversational AI in helpdesks, ticket triage, and customer-facing assistants without running their own model infrastructure.

## For AI agents

Generate chat completions and responses through Hatz AI's OpenAI-compatible gateway, and list available models for routing.

## Scope

Does not handle model fine-tuning, embeddings, or audio transcription - use for chat completion and Responses-style inference only.

## Capabilities

- Generate chat completions through /chat/completions using an OpenAI-compatible request body
- Run multi-turn responses through /openai/responses with the newer Responses API shape
- List available language models on the account via /chat/models for routing decisions
- Authenticate with either an X-API-Key header or a bearer token, matching existing OpenAI client setups
- Drop into MSP toolchains and helpdesk integrations as a managed inference layer

## Use cases

### MSP Helpdesk Assistant

Managed service providers wire Hatz AI into ticketing tools to draft first-response messages and summarize ticket history. The /chat/completions endpoint accepts the same JSON shape as OpenAI, so existing helpdesk plugins work after only changing the base URL and key. This shortens response time on common L1 tickets without retraining staff on a new SDK.

Example prompt: Send a chat completion request to /chat/completions with a system prompt summarizing a ticket and return a draft reply

### Model Routing for Cost Control

Call /chat/models at startup to discover which models the account is entitled to, then route requests by cost or capability. A small business can keep cheap models for autoresponders and switch to a stronger model for escalations without hardcoding model IDs. Refreshing the list periodically also picks up newly enabled models without a redeploy.

Example prompt: Call GET /chat/models, parse the response, and select the model with the lowest pricing tag for a draft email task

### Responses API Pattern for Multi-Turn Workflows

Use /openai/responses for stateful conversations where you want to pass tool results back into the model on the next turn. The Responses shape simplifies tool-call handling compared with manually threading messages on /chat/completions. Teams adopt it for agent-style workflows that mix retrieval and generation steps.

Example prompt: POST a responses request to /openai/responses with a tool definition and verify the response contains a tool_calls block

### AI Agent Inference via Jentic

Agents search Jentic for 'generate a chat completion' and Jentic surfaces Hatz AI's /chat/completions operation alongside other inference providers. The agent picks Hatz AI when an MSP customer needs vendor-specific routing, executes the call with credentials drawn from the vault, and never sees the raw API key. This makes Hatz AI a swappable inference backend in a multi-provider toolkit.

Example prompt: Use Jentic search 'generate a chat completion' to load /chat/completions for hatz.ai and execute with a 3-message conversation

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /chat/completions | Create a chat completion |
| GET | /chat/models | List available models |
| POST | /openai/responses | Create a response in the OpenAI Responses shape |

## Key resources

- **Chat Completions** — OpenAI-compatible chat completion via /chat/completions
- **Responses** — Multi-turn Responses-API style calls via /openai/responses
- **Models** — Discover available models via /chat/models

## Why Jentic

- **Setup:** Wiring Hatz AI by hand means picking between an X-API-Key header and a bearer token and attaching the right one on every inference call. Through Jentic you install once, import the Hatz AI API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Hatz AI sends its target in the request body across a few inference endpoints (/chat/completions, /openai/responses, /chat/models), so limit the agent to the operations it needs, such as generating a chat completion or listing models. You choose the operations it may call, so anything beyond that set is not included unless you add it.
- **Credential handling:** Your Hatz AI key or bearer token is stored once, encrypted, by your own Jentic One instance and injected as the right header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a chat completion' or 'list available models', and Jentic returns the matching Hatz AI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenAI API** — OpenAI provides the original Chat Completions and Responses APIs that Hatz AI is compatible with
- **Anthropic Messages API** — Anthropic exposes Claude models through a Messages API; Hatz AI follows the OpenAI pattern instead
- **Mistral AI API** — Mistral exposes hosted Mistral models through a similar chat-completion interface

## FAQ

### What authentication does the Hatz AI API use?

The API accepts either an X-API-Key header (apiKey scheme) or a standard Authorization: Bearer token. Jentic stores the credential in the vault and attaches the header automatically at execution time.

### Can I list the models available on my Hatz AI account?

Yes. Call GET /chat/models with your credentials and the response lists each model id you can pass into /chat/completions or /openai/responses requests.

### Is the Hatz AI API OpenAI-compatible?

The /chat/completions and /openai/responses endpoints follow the OpenAI request and response shapes, so existing OpenAI client libraries work by changing the base URL to https://ai.hatz.ai/v1 and swapping the key.

### What are the rate limits for the Hatz AI API?

Hatz AI does not publish public per-endpoint rate limits in the spec; limits are tied to your plan and model tier. Check the Hatz AI dashboard at api-docs.hatz.ai for the limits attached to your account.

### How do I send a chat completion through Jentic?

Search Jentic for 'generate a chat completion', load the /chat/completions operation for hatz.ai, and execute with your messages array. Jentic injects the X-API-Key header from the vault so the request runs without your code touching the secret.

### Does Hatz AI support tool calling?

The /openai/responses endpoint accepts tool definitions and returns tool_calls in the response, mirroring the OpenAI Responses pattern. Use this endpoint for agent-style workflows that need structured tool invocations rather than free-form text.

### Can I limit what my agent is allowed to do with the Hatz AI API?

Yes. Because Jentic One is self-hosted on your own instance, you decide which Hatz AI operations your agent may call, so you can grant only what a task needs, such as generating a chat completion via /chat/completions or listing models via /chat/models. If you do not add an operation like /openai/responses, the agent cannot call it. The credential you store is attached at execution time only for the operations you have allowed, so the agent never gains access beyond that set.
