API
API overview
Give this link to an AI with browsing access. If it cannot reach this site, copy the guide instead.
Preview overview
Paste into an AI assistant to help with integration. Documentation and examples only; no real credentials.
Updated · Reviewed
Give this guide or its AI reading link to an assistant to find capabilities, endpoints, authentication, and detailed integration instructions for your task.
This guide covers published inference, account, API key, task-result, and usage interfaces. Choose a protocol and read its reference before integrating. Instructions and examples awaiting acceptance are not published.
Generated from this site's published reference catalog: 71 reference entries. Different protocol uses of one path may have separate entries. This is not a guarantee of runtime availability or successful upstream testing.
API base URL: https://api.tu-zi.com
Guide updated: 2026-11-09
Stable AI reading link: https://api.tu-zi.com/en/docs/api/overview.md
How to use this guide for a user's task
- Identify the desired task, inputs, and outputs. Ask for missing requirements when necessary.
- Use the capability map and workflows below to choose candidates, then consult the complete endpoint index.
- Read the candidate's AI reference link for authentication, parameters, examples, responses, errors, and constraints before writing code. The index is not a complete request schema; do not invent fields.
- Check current model availability, supported endpoints, account permissions, and prices. Provider model catalogs do not guarantee availability on this site or for this account.
- Keep submission, polling, and results within the same protocol. WebSocket, SSE, and ordinary JSON are not interchangeable. Acceptance does not mean generation has completed.
- If you cannot browse or access a reference, say so and ask the user to copy that endpoint's integration guide. Do not claim to have read inaccessible content.
This is documentation and examples only. Confirm the user's intent before performing paid generation or key mutations. Use environment variables in examples rather than asking for credentials in chat.
Capability map
| User need | Capabilities and guides |
|---|---|
| Chat, writing, coding, text reasoning | Guide · text |
| Generate or edit images | Guide · images |
| Interpretation and music | Guide · realtime / music |
| Knowledge bases and embeddings | Guide · retrieval |
| Tool use and application orchestration | Guide · text |
Applications still compose these capabilities: a knowledge base needs data processing and retrieval orchestration. Account, key, and usage interfaces are indexed below; check prices in the model marketplace.
Connect ChatGPT through MCP: read documentation and account data, then approve model calls. Requires MCP to be enabled on this site.
Integration and authentication
Current gateway workflows · Legacy Apifox compatibility and migration · Model-specific scenarios and limits: check prerequisites, fields and current support boundaries first.
- Inference calls use inference API keys; account management uses account system tokens. Do not interchange them. Read each reference for exact headers and exceptions.
- With a system token, bootstrap identity to obtain the user ID; subsequent account endpoints usually also require New-Api-User. Bootstrap does not accept inference keys or browser cookies instead of a system token.
- Anonymous endpoints may return different data when authenticated. Check model access, groups, and prices for the actual account.
- JSON, multipart, and WebSocket in the index describe request transport. Read details for streaming responses and asynchronous completion.
Common workflows
- Integrate chat or text generation:List callable models → OpenAI Chat Completions
- Asynchronous images: submit, poll, download:Asynchronous image generation → Retrieve a unified video or image task → Download video task content
- Generate music and retrieve results:Legacy Suno music → Retrieve a legacy Suno task
- Bootstrap identity, create an inference key, inspect usage:Bootstrap account identity → Create an API key → List usage logs
Do not mix task IDs, polling paths, or result fields across providers. Read the chosen reference for image input formats, models, task states, and polling intervals.
Complete endpoint index
Text generation (4)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Anthropic Messages · AI | POST /v1/messages · json | Inference API key | Anthropic Messages |
| Gemini Generate Content · AI | POST /v1beta/models/{model}:generateContent · json | Inference API key | Gemini Generate Content |
| OpenAI Chat Completions · AI | POST /v1/chat/completions · json | Inference API key | OpenAI Chat Completions |
| OpenAI Responses · AI | POST /v1/responses · json | Inference API key | OpenAI Responses |
Images (9)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Asynchronous image generation · AI | POST /v1/videos · json | Inference API key | Gateway asynchronous image extension: create a task with image parameters, then poll for the image. The /v1/videos path does not make this a video task. |
| Black Forest Labs FLUX · AI | POST /flux/v1/flux-3-image · json | Inference API key | Gateway FLUX native compatibility route, restricted to flux-3-image. Use the listed model protocols for other FLUX models. |
| Gemini Image Generation · AI | POST /v1beta/models/{model}:generateContent · json | Inference API key | Generate images through Gemini generateContent; responses may contain both text and image parts. |
| Image Generation · AI | POST /v1/images/generations · json | Inference API key | Image Generation |
| Midjourney U1 button upscale · AI | POST /mj/submit/action · json | Inference API key | Upscale the first image using the actual U1 button from a successful source task via /submit/action; requires a source channel that supports button actions. |
| Midjourney high variation · AI | POST /mj/submit/action · json | Inference API key | Use the mj_high_variation action through this gateway; no model field is required. |
| Midjourney imagine · AI | POST /mj/submit/imagine · json | Inference API key | Use the mj_imagine action through this gateway; no model field is required. |
| Midjourney pan · AI | POST /mj/submit/action · json | Inference API key | Use the mj_pan action through this gateway; no model field is required. |
| OpenAI Image Edit · AI | POST /v1/images/edits · multipart | Inference API key | OpenAI Image Edit |
Realtime (1)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Interpretation WebSocket · AI | GET /v1/realtime?model={model} · websocket | Inference API key | Simultaneous interpretation over Protobuf binary WebSocket frames. |
Music and sound (3)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Legacy Suno music · AI | POST /suno/submit/music · json | Inference API key | Legacy Suno music; requires a configured legacy Suno channel. |
| Suno feed batch lookup · AI | POST /v1/suno/feed · json | Inference API key | Suno feed batch lookup; requires a configured legacy Suno channel. |
| Suno feed lookup · AI | GET /v1/suno/feed · json | Inference API key | Suno feed lookup; requires a configured legacy Suno channel. |
Embeddings and retrieval (1)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Embeddings · AI | POST /v1/embeddings · json | Inference API key | Embeddings |
Available models (4)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| List callable models · AI | GET /v1/models · json | Inference API key | List callable models. Fields and permissions follow this gateway implementation. |
| List models in Gemini format · AI | GET /v1beta/models · json | Inference API key | List models in Gemini format within the current credential scope. |
| List models through the Gemini compatible endpoint · AI | GET /v1beta/openai/models · json | Inference API key | List models through the Gemini compatible endpoint within the current credential scope. |
| Retrieve model metadata · AI | GET /v1/models/{model} · json | Inference API key | List callable models. Fields and permissions follow this gateway implementation. |
Image and video tasks (6)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Download video task content · AI | GET /v1/videos/{task_id}/content · json | Inference API key | Download video task content. The following is this gateway’s public contract. |
| Retrieve Midjourney tasks in a batch · AI | POST /mj/task/list-by-condition · json | Inference API key | Retrieve Midjourney tasks in a batch; the contract below follows this gateway implementation. |
| Retrieve a Midjourney task · AI | GET /mj/task/{task_id}/fetch · json | Inference API key | Retrieve a Midjourney task. The following is this gateway’s public contract. |
| Retrieve a native FLUX image task · AI | GET /flux/v1/get_result · json | Inference API key | Retrieve a native FLUX image task. The following is this gateway’s public contract. |
| Retrieve a unified video or image task · AI | GET /v1/videos/{task_id} · json | Inference API key | Retrieve a unified video or image task. The following is this gateway’s public contract. |
| Retrieve image results by request ID · AI | GET /v1/images/generations/result · json | Inference API key | Retrieve image results by request ID. The following is this gateway’s public contract. |
Music tasks (2)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Batch retrieve legacy Suno tasks · AI | POST /suno/fetch · json | Inference API key | Batch retrieve legacy Suno tasks; requires a configured legacy Suno channel. |
| Retrieve a legacy Suno task · AI | GET /suno/fetch/{task_id} · json | Inference API key | Retrieve a legacy Suno task; requires a configured legacy Suno channel. |
Other tasks and results (1)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| List current account task records · AI | GET /api/task/self · json | System token + user ID, or session | List current account task records within the current credential scope. |
Account (8)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Bootstrap account identity · AI | GET /api/user/self/bootstrap · json | Account system token only | Call this first when you have a system token but do not know the account ID. |
| Get current account · AI | GET /api/user/self · json | System token + user ID, or session | Get current account. Fields and permissions follow this gateway implementation. |
| List account groups and multipliers · AI | GET /api/user/self/groups · json | System token + user ID, or session | List account groups and multipliers within the current credential scope. |
| List account model choices · AI | GET /api/user/models · json | System token + user ID, or session | List account model choices within the current credential scope. |
| Patch the current profile · AI | PATCH /api/user/self · json | System token + user ID, or session | Patch the current profile. The following is this gateway’s public contract. |
| Read current system token · AI | GET /api/user/token/current · json | System token + user ID, or session | Read current system token. Returns data visible to the current account. |
| Retrieve account level limits · AI | GET /api/user/self/level_limits · json | System token + user ID, or session | Retrieve account level limits within the current credential scope. |
| Rotate system token · AI | GET /api/user/token · json | System token + user ID, or session | Rotate system token. Returns data visible to the current account. |
API keys (15)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Create API keys in a batch · AI | POST /api/token/batch/create · json | System token + user ID, or session | Create an API key. Fields and permissions follow this gateway implementation. |
| Create an API key · AI | POST /api/token/ · json | System token + user ID, or session | Create an API key. Fields and permissions follow this gateway implementation. |
| Delete API keys in a batch · AI | POST /api/token/batch · json | System token + user ID, or session | Delete API keys in a batch within the current credential scope. |
| Delete an API key · AI | DELETE /api/token/{id} · json | System token + user ID, or session | Delete an API key. Fields and permissions follow this gateway implementation. |
| Get API key details · AI | GET /api/token/{id} · json | System token + user ID, or session | Get API key details. Fields and permissions follow this gateway implementation. |
| Get current key usage · AI | GET /api/usage/token/ · json | Inference API key | Get current key usage. Fields and permissions follow this gateway implementation. |
| Legacy usage lookup by key · AI | GET /api/token/key/{key} · json | API key in path + owner user ID | Legacy usage lookup by key; the contract below follows this gateway implementation. |
| List API keys · AI | GET /api/token/ · json | System token + user ID, or session | List API keys. Fields and permissions follow this gateway implementation. |
| List assignable API key groups · AI | GET /api/token/group · json | System token + user ID, or session | List assignable API key groups. The following is this gateway’s public contract. |
| Patch an API key · AI | PATCH /api/token/{id} · json | System token + user ID, or session | Only explicitly supplied fields are updated. Omitted fields stay unchanged; 0 and false are preserved. |
| Reveal API keys in a batch · AI | POST /api/token/batch/keys · json | System token + user ID, or session | Reveal API keys in a batch within the current credential scope. |
| Reveal an API key · AI | POST /api/token/{id}/key · json | System token + user ID, or session | Reveal an API key. Fields and permissions follow this gateway implementation. |
| Search API keys · AI | GET /api/token/search · json | System token + user ID, or session | List API keys. Fields and permissions follow this gateway implementation. |
| Update API keys in a batch · AI | POST /api/token/batch/update · json | System token + user ID, or session | Update API keys in a batch within the current credential scope. |
| Update an API key · AI | PUT /api/token/ · json | System token + user ID, or session | Update an API key. Fields and permissions follow this gateway implementation. |
Usage and logs (17)
| Endpoint and docs | Method, path, transport | Authentication | Purpose |
|---|---|---|---|
| Compatible cumulative usage · AI | GET /v1/dashboard/billing/usage · json | Inference API key | Compatible cumulative usage. Read-only compatibility for legacy clients. |
| Compatible quota information · AI | GET /v1/dashboard/billing/subscription · json | Inference API key | Compatible quota information. Read-only compatibility for legacy clients. |
| Export account task records as CSV · AI | GET /api/task/self/export · json | System token + user ID, or session | Export account task records as CSV. Returns data visible to the current account. |
| Export account usage CSV · AI | GET /api/log/self/export · json | System token + user ID, or session | Export account usage CSV within the current credential scope. |
| Export current key usage CSV · AI | GET /api/log/token/export · json | Inference API key | Export current key usage CSV within the current credential scope. |
| Get account dashboard consumption statistics · AI | GET /api/data/dashboard_consumption_stats · json | System token + user ID, or session | Get account dashboard consumption statistics. Returns data visible to the current account. |
| Get account logs by request ID · AI | GET /api/log/self/request/{request_id} · json | System token + user ID, or session | Get account logs by request ID. Returns data visible to the current account. |
| Get account quota history · AI | GET /api/data/self · json | System token + user ID, or session | Get account quota history. Returns data visible to the current account. |
| Get consumption statistics by source · AI | GET /api/data/consumption_stats · json | System token + user ID, or session | Get consumption statistics by source. Returns data visible to the current account. |
| Get detailed account usage statistics · AI | GET /api/log/self/advanced_stat · json | System token + user ID, or session | Get detailed account usage statistics. Returns data visible to the current account. |
| Get usage statistics · AI | GET /api/log/self/stat · json | System token + user ID, or session | Get usage statistics. Fields and permissions follow this gateway implementation. |
| Get usage summary · AI | GET /api/log/self/stat · json | System token + user ID, or session | Aggregate the current account’s recorded requests, errors, tokens and quota. |
| Legacy log search (deprecated) · AI | GET /api/log/self/search · json | System token + user ID, or session | Deprecated endpoint; do not use for new integrations. |
| List account Midjourney task records · AI | GET /api/mj/self · json | System token + user ID, or session | List account Midjourney task records. Returns data visible to the current account. |
| List usage logs · AI | GET /api/log/self · json | System token + user ID, or session | List usage logs. Fields and permissions follow this gateway implementation. |
| Retrieve request image or task results · AI | GET /api/log/get-request · json | Inference API key | Retrieve image results by request ID. The following is this gateway’s public contract. |
| Retrieve usage logs for the current API key · AI | GET /api/log/token · json | Inference API key | List usage logs. Fields and permissions follow this gateway implementation. |
Models, pricing, and errors
- Model marketplace: check model IDs, endpoints, and displayed prices; authenticated queries determine account access.
- Getting started, protocol and endpoint selection, troubleshooting.
- Check HTTP status and protocol-specific business status. Back off on 429; do not blindly retry paid generation, task creation, or key mutations.
- This index only covers published integration references. It does not expose internal admin routes, real credentials, account data, or user requests.
- AI reading links require network access and permission to view this site. External assistants usually cannot reach private test addresses; copy the overview and the relevant endpoint guide instead.
Content revision: cd75882e37dcef7b715d9d3ad5d0fcd40d59c2c02f4abc0c5e241ba9d202592f
Use cases
- Choose endpoints for a task
- AI-assisted integration
API protocols
/docs/api/overview.md
FAQ
What should I give an AI?
Copy the overview text or give its AI reading link to an assistant with browsing access, then read the relevant endpoint references for integration.
Does documentation guarantee availability?
No. Availability depends on configured channels, models, account permissions, and balance. Check live lists and endpoint requirements.
What if the AI cannot open a link?
Copy the overview, then copy the integration guide from the chosen endpoint page. Do not share real credentials with the assistant.
Related guides
Official sources
- new-api · QuantumNous Official
兔子API