https://api.zarkai.xyz. All requests require authentication via the x-api-key header.
Endpoints
Chat
Send messages to Zark with automatic tool selection, file references, and streaming
Images
Generate images from text prompts or edit existing images
Videos
Generate videos from text, animate images, or edit existing video
Files
Upload, list, retrieve, and delete files in your Space
Authentication
All API requests require an API key passed in thex-api-key header:
| Header | Value |
|---|---|
x-api-key | Your API key |
Content-Type | application/json |
Streaming
The Chat endpoint supports Server-Sent Events (SSE) whenstream: true is set. Events are delivered as they’re generated:
| Event | Description |
|---|---|
ai_chunk | Incremental text content |
ai_complete | Final complete response |
media_item | Generated image or video file reference |
file_search_results | Matching files from a file query |
table | Data table with rows and columns |
Errors
All errors return a JSON object witherror and code fields:
| Status | Description |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — invalid or missing API key |
404 | Not found — resource doesn’t exist |
429 | Rate limited — too many requests |