zinn-agents
POST /v1/agent-gateway/chat/completions
OpenAI-compatible chat completions for an agent app, metered on Zinn® AI credit.
Authentication
This endpoint is public. It takes no credential and no organisation — it is what our own marketing site and AI answer engines read.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/agent-gateway/chat/completions \
-H "Content-Type: application/json" \
-d '{ "messages": <object[]> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Called by the agent apps themselves with their per-agent key (Authorization: Bearer zak_…), never by a person. model = zinn-default resolves per call to the cheapest verified model; any model id from /v1/agent-gateway/models may be named. Refused BEFORE any spend when the agent is paused, its plan is not in good standing, its monthly cap is reached, or the organisation has no Zinn® AI credit and no own key — errors use the OpenAI error envelope with a zinn_failure class. stream: true is answered as server-sent events.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
model | string | No | — |
messages | object[] | Yes | — |
tools | object[] | No | — |
tool_choice | object | No | — |
max_tokens | integer | No | — |
max_completion_tokens | integer | No | — |
temperature | number | No | — |
stream | boolean | No | — |
Errors this endpoint can return
400 · 401 · 402 · 403 · 502