> ## Documentation Index
> Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 生成 API 參考：介面、引數和錯誤碼

> 使用 APIXO 代 API 端點提交模型任務、檢查狀態、接收 Webhooks 以及處理共用參數和錯誤

當您準備好提交映像、影片或音訊產生任務、輪詢結果、接收 Webhook 回呼或檢查帳戶狀態時，請使用此參考。

## Base URL

```text theme={null}
https://api.apixo.ai/api/v1
```

## 核心端點

| 方法 | 端點 | 說明 |
| - | - | - |
| `POST` | `/generateTask/{model}` | 送出生成任務 |
| `GET` | `/statusTask/{model}?taskId={id}` | 查詢任務狀態 |
| `POST` | 提供者特定的 Webhook 回呼 URL | 當`request_type`為`callback`時接收完成事件 |
| `GET` | `/apikeys/current-balance` | 取得剩餘餘額 |

## 快速參考

> [card] [生成任務](https://apixo.ai/docs/zh-hant/api-reference/generate-task.md)
>
> 向影像、影片或音訊模型送出生成任務。

> [card] [查詢任務狀態](https://apixo.ai/docs/zh-hant/api-reference/status-task.md)
>
> 查詢任務狀態並取得最終結果 URL。

> [card] [Webhook](https://apixo.ai/docs/zh-hant/api-reference/webhooks.md)
>
> 接收完成回呼而不是輪詢。

> [card] [參數規格](https://apixo.ai/docs/zh-hant/api-reference/parameters.md)
>
> 比較跨世代模型的常見請求欄位。

> [card] [系統API](https://apixo.ai/docs/zh-hant/api-reference/system.md)
>
> 檢查餘額和帳戶相關的系統端點。

> [card] [錯誤](https://apixo.ai/docs/zh-hant/api-reference/errors.md)
>
> 了解 API 錯誤、重試行為和提供者故障。

## 請求模式

1. 從 [生成 API 概述](https://apixo.ai/docs/zh-hant/models.md) 或側欄中選擇模型。
2. 使用 [`POST /generateTask/{model}`](https://apixo.ai/docs/zh-hant/api-reference/generate-task) 送出任務。
3. 輪詢 [`GET /statusTask/{model}`](https://apixo.ai/docs/zh-hant/api-reference/status-task)，或使用 [Webhooks](https://apixo.ai/docs/zh-hant/api-reference/webhooks.md) 進行回呼傳遞。
4. 解析 `resultJson` 並儲存應用程式需要保留的產生的媒體 URL。

## 驗證

所有端點都需要 Bearer 令牌。有關詳細信息，請參閱[身分驗證](https://apixo.ai/docs/zh-hant/concepts/authentication.md)。

```text theme={null}
Authorization: Bearer YOUR_API_KEY
```

> [!NOTE]
>
> 定價和帳戶限制可能因型號和帳戶設定而異。使用 APIXO 儀表板和 [定價](https://apixo.ai/pricing/api) 頁面作為事實來源。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.