API

API overview

Preview overview

Paste into an AI assistant to help with integration. Documentation and examples only; no real credentials.

Preview overview

API overview

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

  1. Identify the desired task, inputs, and outputs. Ask for missing requirements when necessary.
  2. Use the capability map and workflows below to choose candidates, then consult the complete endpoint index.
  3. 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.
  4. Check current model availability, supported endpoints, account permissions, and prices. Provider model catalogs do not guarantee availability on this site or for this account.
  5. Keep submission, polling, and results within the same protocol. WebSocket, SSE, and ordinary JSON are not interchangeable. Acceptance does not mean generation has completed.
  6. 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 needCapabilities and guides
Chat, writing, coding, text reasoningGuide · text
Generate or edit imagesGuide · images
Interpretation and musicGuide · realtime / music
Knowledge bases and embeddingsGuide · retrieval
Tool use and application orchestrationGuide · 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

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 docsMethod, path, transportAuthenticationPurpose
Anthropic Messages · AIPOST /v1/messages · jsonInference API keyAnthropic Messages
Gemini Generate Content · AIPOST /v1beta/models/{model}:generateContent · jsonInference API keyGemini Generate Content
OpenAI Chat Completions · AIPOST /v1/chat/completions · jsonInference API keyOpenAI Chat Completions
OpenAI Responses · AIPOST /v1/responses · jsonInference API keyOpenAI Responses

Images (9)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Asynchronous image generation · AIPOST /v1/videos · jsonInference API keyGateway 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 · AIPOST /flux/v1/flux-3-image · jsonInference API keyGateway FLUX native compatibility route, restricted to flux-3-image. Use the listed model protocols for other FLUX models.
Gemini Image Generation · AIPOST /v1beta/models/{model}:generateContent · jsonInference API keyGenerate images through Gemini generateContent; responses may contain both text and image parts.
Image Generation · AIPOST /v1/images/generations · jsonInference API keyImage Generation
Midjourney U1 button upscale · AIPOST /mj/submit/action · jsonInference API keyUpscale 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 · AIPOST /mj/submit/action · jsonInference API keyUse the mj_high_variation action through this gateway; no model field is required.
Midjourney imagine · AIPOST /mj/submit/imagine · jsonInference API keyUse the mj_imagine action through this gateway; no model field is required.
Midjourney pan · AIPOST /mj/submit/action · jsonInference API keyUse the mj_pan action through this gateway; no model field is required.
OpenAI Image Edit · AIPOST /v1/images/edits · multipartInference API keyOpenAI Image Edit

Realtime (1)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Interpretation WebSocket · AIGET /v1/realtime?model={model} · websocketInference API keySimultaneous interpretation over Protobuf binary WebSocket frames.

Music and sound (3)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Legacy Suno music · AIPOST /suno/submit/music · jsonInference API keyLegacy Suno music; requires a configured legacy Suno channel.
Suno feed batch lookup · AIPOST /v1/suno/feed · jsonInference API keySuno feed batch lookup; requires a configured legacy Suno channel.
Suno feed lookup · AIGET /v1/suno/feed · jsonInference API keySuno feed lookup; requires a configured legacy Suno channel.

Embeddings and retrieval (1)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Embeddings · AIPOST /v1/embeddings · jsonInference API keyEmbeddings

Available models (4)

Endpoint and docsMethod, path, transportAuthenticationPurpose
List callable models · AIGET /v1/models · jsonInference API keyList callable models. Fields and permissions follow this gateway implementation.
List models in Gemini format · AIGET /v1beta/models · jsonInference API keyList models in Gemini format within the current credential scope.
List models through the Gemini compatible endpoint · AIGET /v1beta/openai/models · jsonInference API keyList models through the Gemini compatible endpoint within the current credential scope.
Retrieve model metadata · AIGET /v1/models/{model} · jsonInference API keyList callable models. Fields and permissions follow this gateway implementation.

Image and video tasks (6)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Download video task content · AIGET /v1/videos/{task_id}/content · jsonInference API keyDownload video task content. The following is this gateway’s public contract.
Retrieve Midjourney tasks in a batch · AIPOST /mj/task/list-by-condition · jsonInference API keyRetrieve Midjourney tasks in a batch; the contract below follows this gateway implementation.
Retrieve a Midjourney task · AIGET /mj/task/{task_id}/fetch · jsonInference API keyRetrieve a Midjourney task. The following is this gateway’s public contract.
Retrieve a native FLUX image task · AIGET /flux/v1/get_result · jsonInference API keyRetrieve a native FLUX image task. The following is this gateway’s public contract.
Retrieve a unified video or image task · AIGET /v1/videos/{task_id} · jsonInference API keyRetrieve a unified video or image task. The following is this gateway’s public contract.
Retrieve image results by request ID · AIGET /v1/images/generations/result · jsonInference API keyRetrieve image results by request ID. The following is this gateway’s public contract.

Music tasks (2)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Batch retrieve legacy Suno tasks · AIPOST /suno/fetch · jsonInference API keyBatch retrieve legacy Suno tasks; requires a configured legacy Suno channel.
Retrieve a legacy Suno task · AIGET /suno/fetch/{task_id} · jsonInference API keyRetrieve a legacy Suno task; requires a configured legacy Suno channel.

Other tasks and results (1)

Endpoint and docsMethod, path, transportAuthenticationPurpose
List current account task records · AIGET /api/task/self · jsonSystem token + user ID, or sessionList current account task records within the current credential scope.

Account (8)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Bootstrap account identity · AIGET /api/user/self/bootstrap · jsonAccount system token onlyCall this first when you have a system token but do not know the account ID.
Get current account · AIGET /api/user/self · jsonSystem token + user ID, or sessionGet current account. Fields and permissions follow this gateway implementation.
List account groups and multipliers · AIGET /api/user/self/groups · jsonSystem token + user ID, or sessionList account groups and multipliers within the current credential scope.
List account model choices · AIGET /api/user/models · jsonSystem token + user ID, or sessionList account model choices within the current credential scope.
Patch the current profile · AIPATCH /api/user/self · jsonSystem token + user ID, or sessionPatch the current profile. The following is this gateway’s public contract.
Read current system token · AIGET /api/user/token/current · jsonSystem token + user ID, or sessionRead current system token. Returns data visible to the current account.
Retrieve account level limits · AIGET /api/user/self/level_limits · jsonSystem token + user ID, or sessionRetrieve account level limits within the current credential scope.
Rotate system token · AIGET /api/user/token · jsonSystem token + user ID, or sessionRotate system token. Returns data visible to the current account.

API keys (15)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Create API keys in a batch · AIPOST /api/token/batch/create · jsonSystem token + user ID, or sessionCreate an API key. Fields and permissions follow this gateway implementation.
Create an API key · AIPOST /api/token/ · jsonSystem token + user ID, or sessionCreate an API key. Fields and permissions follow this gateway implementation.
Delete API keys in a batch · AIPOST /api/token/batch · jsonSystem token + user ID, or sessionDelete API keys in a batch within the current credential scope.
Delete an API key · AIDELETE /api/token/{id} · jsonSystem token + user ID, or sessionDelete an API key. Fields and permissions follow this gateway implementation.
Get API key details · AIGET /api/token/{id} · jsonSystem token + user ID, or sessionGet API key details. Fields and permissions follow this gateway implementation.
Get current key usage · AIGET /api/usage/token/ · jsonInference API keyGet current key usage. Fields and permissions follow this gateway implementation.
Legacy usage lookup by key · AIGET /api/token/key/{key} · jsonAPI key in path + owner user IDLegacy usage lookup by key; the contract below follows this gateway implementation.
List API keys · AIGET /api/token/ · jsonSystem token + user ID, or sessionList API keys. Fields and permissions follow this gateway implementation.
List assignable API key groups · AIGET /api/token/group · jsonSystem token + user ID, or sessionList assignable API key groups. The following is this gateway’s public contract.
Patch an API key · AIPATCH /api/token/{id} · jsonSystem token + user ID, or sessionOnly explicitly supplied fields are updated. Omitted fields stay unchanged; 0 and false are preserved.
Reveal API keys in a batch · AIPOST /api/token/batch/keys · jsonSystem token + user ID, or sessionReveal API keys in a batch within the current credential scope.
Reveal an API key · AIPOST /api/token/{id}/key · jsonSystem token + user ID, or sessionReveal an API key. Fields and permissions follow this gateway implementation.
Search API keys · AIGET /api/token/search · jsonSystem token + user ID, or sessionList API keys. Fields and permissions follow this gateway implementation.
Update API keys in a batch · AIPOST /api/token/batch/update · jsonSystem token + user ID, or sessionUpdate API keys in a batch within the current credential scope.
Update an API key · AIPUT /api/token/ · jsonSystem token + user ID, or sessionUpdate an API key. Fields and permissions follow this gateway implementation.

Usage and logs (17)

Endpoint and docsMethod, path, transportAuthenticationPurpose
Compatible cumulative usage · AIGET /v1/dashboard/billing/usage · jsonInference API keyCompatible cumulative usage. Read-only compatibility for legacy clients.
Compatible quota information · AIGET /v1/dashboard/billing/subscription · jsonInference API keyCompatible quota information. Read-only compatibility for legacy clients.
Export account task records as CSV · AIGET /api/task/self/export · jsonSystem token + user ID, or sessionExport account task records as CSV. Returns data visible to the current account.
Export account usage CSV · AIGET /api/log/self/export · jsonSystem token + user ID, or sessionExport account usage CSV within the current credential scope.
Export current key usage CSV · AIGET /api/log/token/export · jsonInference API keyExport current key usage CSV within the current credential scope.
Get account dashboard consumption statistics · AIGET /api/data/dashboard_consumption_stats · jsonSystem token + user ID, or sessionGet account dashboard consumption statistics. Returns data visible to the current account.
Get account logs by request ID · AIGET /api/log/self/request/{request_id} · jsonSystem token + user ID, or sessionGet account logs by request ID. Returns data visible to the current account.
Get account quota history · AIGET /api/data/self · jsonSystem token + user ID, or sessionGet account quota history. Returns data visible to the current account.
Get consumption statistics by source · AIGET /api/data/consumption_stats · jsonSystem token + user ID, or sessionGet consumption statistics by source. Returns data visible to the current account.
Get detailed account usage statistics · AIGET /api/log/self/advanced_stat · jsonSystem token + user ID, or sessionGet detailed account usage statistics. Returns data visible to the current account.
Get usage statistics · AIGET /api/log/self/stat · jsonSystem token + user ID, or sessionGet usage statistics. Fields and permissions follow this gateway implementation.
Get usage summary · AIGET /api/log/self/stat · jsonSystem token + user ID, or sessionAggregate the current account’s recorded requests, errors, tokens and quota.
Legacy log search (deprecated) · AIGET /api/log/self/search · jsonSystem token + user ID, or sessionDeprecated endpoint; do not use for new integrations.
List account Midjourney task records · AIGET /api/mj/self · jsonSystem token + user ID, or sessionList account Midjourney task records. Returns data visible to the current account.
List usage logs · AIGET /api/log/self · jsonSystem token + user ID, or sessionList usage logs. Fields and permissions follow this gateway implementation.
Retrieve request image or task results · AIGET /api/log/get-request · jsonInference API keyRetrieve image results by request ID. The following is this gateway’s public contract.
Retrieve usage logs for the current API key · AIGET /api/log/token · jsonInference API keyList 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.

Official sources

  1. new-api · QuantumNous Official