API Reference
Hanzo Chat API
REST API for Hanzo Chat, an AI chat interface with multi-model support,
REST API for Hanzo Chat, an AI chat interface with multi-model support,
All Hanzo APIs share one bearer credential and common error and pagination conventions. See API conventions.
curl -H "Authorization: Bearer $HANZO_API_KEY" https://hanzo.chat
| Method | Endpoint | Description |
|---|
GET | /v1/chat/api-keys | List agent API keys |
POST | /v1/chat/api-keys | Create an agent API key |
GET | /v1/chat/api-keys/{id} | Get an API key by ID |
DELETE | /v1/chat/api-keys/{id} | Delete an API key |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/agents/actions | List agent actions |
POST | /v1/chat/agents/actions/{agent_id} | Add or update actions for an agent |
DELETE | /v1/chat/agents/actions/{agent_id}/{action_id} | Delete an agent action |
POST | /v1/chat/assistants/v1/actions/{assistant_id} | Add or update actions for an assistant (v1) |
DELETE | /v1/chat/assistants/v1/actions/{assistant_id}/{action_id}/{model} | Delete an assistant action (v1) |
POST | /v1/chat/assistants/v2/actions/{assistant_id} | Add or update actions for an assistant (v2) |
DELETE | /v1/chat/assistants/v2/actions/{assistant_id}/{action_id}/{model} | Delete an assistant action (v2) |
POST | /v1/chat/actions/{action_id}/oauth/bind | Set CSRF cookie for action OAuth flow |
GET | /v1/chat/actions/{action_id}/oauth/callback | Action OAuth callback |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/admin/login/local | Admin local login |
GET | /v1/chat/admin/verify | Verify admin session |
GET | /v1/chat/admin/oauth/openid/check | Check if OpenID is configured for admin |
GET | /v1/chat/admin/oauth/openid | Initiate admin OpenID login |
GET | /v1/chat/admin/oauth/openid/callback | Admin OpenID callback |
POST | /v1/chat/admin/oauth/exchange | Exchange OAuth code for admin tokens |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/agents | List agents |
POST | /v1/chat/agents | Create an agent |
GET | /v1/chat/agents/categories | Get agent categories with counts |
GET | /v1/chat/agents/{id} | Get an agent (basic info) |
PATCH | /v1/chat/agents/{id} | Update an agent |
DELETE | /v1/chat/agents/{id} | Delete an agent |
GET | /v1/chat/agents/{id}/expanded | Get agent with full configuration details |
POST | /v1/chat/agents/{id}/duplicate | Duplicate an agent |
POST | /v1/chat/agents/{id}/revert | Revert agent to a previous version |
GET | /v1/chat/agents/tools | List available agent tools |
GET | /v1/chat/agents/tools/calls | Get tool call history |
GET | /v1/chat/agents/tools/{toolId}/auth | Verify tool authentication |
POST | /v1/chat/agents/tools/{toolId}/call | Execute a tool call |
POST | /v1/chat/agents/chat | Chat with an agent |
POST | /v1/chat/agents/chat/{endpoint} | Chat with an ephemeral agent |
POST | /v1/chat/agents/chat/abort | Abort an ongoing agent generation |
GET | /v1/chat/agents/chat/stream/{streamId} | Subscribe to a generation stream |
GET | /v1/chat/agents/chat/active | Get active generation job IDs |
GET | /v1/chat/agents/chat/status/{conversationId} | Check generation status for a conversation |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/agents/v1/responses | Create a response |
GET | /v1/chat/agents/v1/responses/models | List agents as models |
GET | /v1/chat/agents/v1/responses/{id} | Get a stored response |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/agents/v1/chat/completions | OpenAI-compatible chat completions |
GET | /v1/chat/agents/v1/models | List agents as models |
GET | /v1/chat/agents/v1/models/{model} | Get agent/model details |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/assistants/v1 | List assistants (v1) |
POST | /v1/chat/assistants/v1 | Create an assistant (v1) |
GET | /v1/chat/assistants/v1/{id} | Retrieve an assistant (v1) |
PATCH | /v1/chat/assistants/v1/{id} | Modify an assistant (v1) |
DELETE | /v1/chat/assistants/v1/{id} | Delete an assistant (v1) |
GET | /v1/chat/assistants/v1/documents | Get assistant documents |
GET | /v1/chat/assistants/v1/tools | List available assistant tools |
POST | /v1/chat/assistants/v1/chat | Chat with an assistant (v1) |
POST | /v1/chat/assistants/v1/chat/abort | Abort assistant chat (v1) |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/assistants/v2 | List assistants (v2) |
POST | /v1/chat/assistants/v2 | Create an assistant (v2) |
GET | /v1/chat/assistants/v2/{id} | Retrieve an assistant (v2) |
PATCH | /v1/chat/assistants/v2/{id} | Modify an assistant (v2) |
DELETE | /v1/chat/assistants/v2/{id} | Delete an assistant (v2) |
GET | /v1/chat/assistants/v2/documents | Get assistant documents (v2) |
GET | /v1/chat/assistants/v2/tools | List available assistant tools (v2) |
POST | /v1/chat/assistants/v2/chat | Chat with an assistant (v2) |
POST | /v1/chat/assistants/v2/chat/abort | Abort assistant chat (v2) |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/auth/login | Login |
POST | /v1/chat/auth/logout | Logout |
POST | /v1/chat/auth/refresh | Refresh token |
POST | /v1/chat/auth/register | Register a new user |
POST | /v1/chat/auth/requestPasswordReset | Request password reset email |
POST | /v1/chat/auth/resetPassword | Reset password with token |
GET | /v1/chat/auth/2fa/enable | Enable 2FA |
POST | /v1/chat/auth/2fa/verify | Verify 2FA setup |
POST | /v1/chat/auth/2fa/verify-temp | Verify 2FA with temporary token |
POST | /v1/chat/auth/2fa/confirm | Confirm 2FA activation |
POST | /v1/chat/auth/2fa/disable | Disable 2FA |
POST | /v1/chat/auth/2fa/backup/regenerate | Regenerate 2FA backup codes |
GET | /v1/chat/auth/graph-token | Get Microsoft Graph token |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/assistants/v2/avatar/{assistant_id} | Upload assistant avatar (v2) |
POST | /v1/chat/files/images/avatar | Upload user avatar |
POST | /v1/chat/files/images/agents/{agent_id}/avatar | Upload agent avatar |
POST | /v1/chat/files/images/assistants/{assistant_id}/avatar | Upload assistant avatar (v1) |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/balance | Get user token balance |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/banner | Get server announcement banner |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/categories | Get all categories |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/config | Get startup configuration |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/convos | List conversations |
DELETE | /v1/chat/convos | Delete a conversation |
GET | /v1/chat/convos/{conversationId} | Get a conversation |
GET | /v1/chat/convos/gen_title/{conversationId} | Get generated title for conversation |
DELETE | /v1/chat/convos/all | Delete all conversations |
POST | /v1/chat/convos/archive | Archive or unarchive a conversation |
POST | /v1/chat/convos/update | Update a conversation title |
POST | /v1/chat/convos/import | Import conversations from JSON file |
POST | /v1/chat/convos/fork | Fork a conversation |
POST | /v1/chat/convos/duplicate | Duplicate a conversation |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/endpoints | Get configured endpoints |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/files | List user files |
POST | /v1/chat/files | Upload a file |
DELETE | /v1/chat/files | Delete files |
GET | /v1/chat/files/config | Get file upload configuration |
GET | /v1/chat/files/agent/{agent_id} | Get files for an agent |
GET | /v1/chat/files/download/{userId}/{file_id} | Download a file |
GET | /v1/chat/files/code/download/{session_id}/{fileId} | Download code execution output |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/files/images | Upload an image |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/keys | Get user key expiry info |
PUT | /v1/chat/keys | Create or update a user API key |
DELETE | /v1/chat/keys | Delete all user keys |
DELETE | /v1/chat/keys/{name} | Delete a user key by name |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/mcp/tools | Get all available MCP tools |
GET | /v1/chat/mcp/connection/status | Get connection status for all MCP servers |
GET | /v1/chat/mcp/connection/status/{serverName} | Get connection status for a specific MCP server |
GET | /v1/chat/mcp/{serverName}/auth-values | Check which auth values exist for an MCP server |
POST | /v1/chat/mcp/{serverName}/reinitialize | Reinitialize an MCP server |
GET | /v1/chat/mcp/{serverName}/oauth/initiate | Initiate MCP OAuth flow |
GET | /v1/chat/mcp/{serverName}/oauth/callback | MCP OAuth callback |
POST | /v1/chat/mcp/{serverName}/oauth/bind | Set CSRF binding cookie for MCP OAuth |
GET | /v1/chat/mcp/oauth/tokens/{flowId} | Get OAuth tokens for a completed flow |
GET | /v1/chat/mcp/oauth/status/{flowId} | Check OAuth flow status |
POST | /v1/chat/mcp/oauth/cancel/{serverName} | Cancel an OAuth flow |
GET | /v1/chat/mcp/servers | List user-managed MCP servers |
POST | /v1/chat/mcp/servers | Create a user-managed MCP server |
GET | /v1/chat/mcp/servers/{serverName} | Get an MCP server by name |
PATCH | /v1/chat/mcp/servers/{serverName} | Update an MCP server |
DELETE | /v1/chat/mcp/servers/{serverName} | Delete an MCP server |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/memories | Get all user memories |
POST | /v1/chat/memories | Create a memory |
PATCH | /v1/chat/memories/preferences | Update memory preferences |
PATCH | /v1/chat/memories/{key} | Update a memory |
DELETE | /v1/chat/memories/{key} | Delete a memory |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/messages | Query messages |
POST | /v1/chat/messages/branch | Create a branch message |
POST | /v1/chat/messages/artifact/{messageId} | Edit artifact content in a message |
GET | /v1/chat/messages/{conversationId} | Get all messages in a conversation |
POST | /v1/chat/messages/{conversationId} | Save a message to a conversation |
GET | /v1/chat/messages/{conversationId}/{messageId} | Get a specific message |
PUT | /v1/chat/messages/{conversationId}/{messageId} | Update a message |
DELETE | /v1/chat/messages/{conversationId}/{messageId} | Delete a message |
PUT | /v1/chat/messages/{conversationId}/{messageId}/feedback | Update message feedback |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/models | List available models |
| Method | Endpoint | Description |
|---|
GET | /oauth/google | Initiate Google OAuth |
GET | /oauth/google/callback | Google OAuth callback |
GET | /oauth/facebook | Initiate Facebook OAuth |
GET | /oauth/facebook/callback | Facebook OAuth callback |
GET | /oauth/openid | Initiate OpenID Connect login |
GET | /oauth/openid/callback | OpenID Connect callback |
GET | /oauth/github | Initiate GitHub OAuth |
GET | /oauth/github/callback | GitHub OAuth callback |
GET | /oauth/discord | Initiate Discord OAuth |
GET | /oauth/discord/callback | Discord OAuth callback |
GET | /oauth/apple | Initiate Apple OAuth |
POST | /oauth/apple/callback | Apple OAuth callback |
GET | /oauth/saml | Initiate SAML login |
POST | /oauth/saml/callback | SAML callback |
GET | /oauth/error | OAuth error handler |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/permissions/search-principals | Search for users and groups to grant permissions |
GET | /v1/chat/permissions/{resourceType}/roles | Get available roles for a resource type |
GET | /v1/chat/permissions/{resourceType}/effective/all | Get effective permissions for all accessible resources |
GET | /v1/chat/permissions/{resourceType}/{resourceId} | Get all permissions for a resource |
PUT | /v1/chat/permissions/{resourceType}/{resourceId} | Bulk update permissions for a resource |
GET | /v1/chat/permissions/{resourceType}/{resourceId}/effective | Get effective permissions for a specific resource |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/presets | List user presets |
POST | /v1/chat/presets | Create or update a preset |
POST | /v1/chat/presets/delete | Delete a preset |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/prompts | List user prompts |
POST | /v1/chat/prompts | Create a new prompt group with initial prompt |
GET | /v1/chat/prompts/all | Get all prompt groups (ACL-aware) |
GET | /v1/chat/prompts/groups | List prompt groups (paginated) |
GET | /v1/chat/prompts/groups/{groupId} | Get a prompt group by ID |
PATCH | /v1/chat/prompts/groups/{groupId} | Update a prompt group |
DELETE | /v1/chat/prompts/groups/{groupId} | Delete a prompt group |
POST | /v1/chat/prompts/groups/{groupId}/prompts | Add a prompt to an existing group |
GET | /v1/chat/prompts/{promptId} | Get a prompt |
DELETE | /v1/chat/prompts/{promptId} | Delete a prompt |
PATCH | /v1/chat/prompts/{promptId}/tags/production | Make a prompt the production version |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/roles/{roleName} | Get a role by name |
PUT | /v1/chat/roles/{roleName}/prompts | Update prompt permissions for a role |
PUT | /v1/chat/roles/{roleName}/agents | Update agent permissions for a role |
PUT | /v1/chat/roles/{roleName}/memories | Update memory permissions for a role |
PUT | /v1/chat/roles/{roleName}/people-picker | Update people picker permissions for a role |
PUT | /v1/chat/roles/{roleName}/mcp-servers | Update MCP servers permissions for a role |
PUT | /v1/chat/roles/{roleName}/marketplace | Update marketplace permissions for a role |
PUT | /v1/chat/roles/{roleName}/remote-agents | Update remote agents permissions for a role |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/search/enable | Check if search is enabled |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/user/settings/favorites | Get user favorites |
POST | /v1/chat/user/settings/favorites | Update user favorites |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/share | List shared links |
GET | /v1/chat/share/{shareId} | Get shared conversation messages |
PATCH | /v1/chat/share/{shareId} | Update a shared link |
DELETE | /v1/chat/share/{shareId} | Delete a shared link |
GET | /v1/chat/share/link/{conversationId} | Get shared link for a conversation |
POST | /v1/chat/share/{conversationId} | Create a shared link |
| Method | Endpoint | Description |
|---|
POST | /v1/chat/files/speech/stt | Speech to text |
POST | /v1/chat/files/speech/tts | Stream text to speech |
POST | /v1/chat/files/speech/tts/manual | Manual text to speech |
GET | /v1/chat/files/speech/tts/voices | Get available TTS voices |
GET | /v1/chat/files/speech/config/get | Get custom speech configuration |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/tags | Get all conversation tags |
POST | /v1/chat/tags | Create a conversation tag |
PUT | /v1/chat/tags/{tag} | Update a conversation tag |
DELETE | /v1/chat/tags/{tag} | Delete a conversation tag |
PUT | /v1/chat/tags/convo/{conversationId} | Update tags for a conversation |
| Method | Endpoint | Description |
|---|
GET | /v1/chat/user | Get current user |
GET | /v1/chat/user/terms | Get terms acceptance status |
POST | /v1/chat/user/terms/accept | Accept terms of service |
POST | /v1/chat/user/plugins | Update user plugins |
DELETE | /v1/chat/user/delete | Delete user account |
POST | /v1/chat/user/verify | Verify email with token |
POST | /v1/chat/user/verify/resend | Resend verification email |
Hanzo Chat API guide · All Hanzo APIs · OpenAPI spec
How is this guide?