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

# API endpoints and request conventions

> Find the AntiRouter base URL and endpoint paths, authentication requirements, error formats, request identifiers, and asynchronous retry behavior.

The AntiRouter API base URL is `https://anti.rs`. Append a complete path from the table below. Do not add `/docs` or duplicate a `/v1` prefix.

## Endpoints

| Method | Path | Purpose | Authentication |
| - | - | - | - |
| `POST` | `/api/v1/services/aigc/video-generation/video-synthesis` | Create a video task | Inference key |
| `GET` | `/api/v1/tasks/{task_id}` | Query a video task | Inference key |
| `GET` | `/v1/models` | List enabled model IDs | Inference key |
| `GET` | `/compatible-mode/v1/models` | Alternative model-list path | Inference key |
| `GET` | `/api/v1/catalog` | Public catalog and prices | None |
| `GET` | `/user/billing/balance` | Read available credits | Account key |
| `GET` | `/user/billing/usage` | Read account usage | Account key |

All Wan3.0 variants share the video generation path. Select a variant with the request's `model` field.

## Request conventions

* Use HTTPS and pass the appropriate key as `Authorization: Bearer <API_KEY>`.
* Send POST bodies as UTF-8 JSON with `Content-Type: application/json`.
* Successful generation and task-query requests return HTTP `200`. No additional asynchronous-request header is required.
* The response's `request_id` and `X-Request-ID` header identify the platform generation request. Use `output.task_id` for task queries. Store both IDs separately.

## HTTP errors

Error responses contain `error` and `message`, for example:

```json 402 theme={null}
{
  "error": "insufficient_balance",
  "message": "insufficient available balance"
}
```

| HTTP status | Typical error | Next action |
| - | - | - |
| `400` | Parameter or media validation error | Correct the request using `error` and `message`. |
| `401` | `unauthorized` | Check key type, status, and IP allowlist. |
| `402` | `insufficient_balance` | Add available credits. |
| `404` | `not_found` | Check the model or task ID and the account that owns the task. |
| `502` | `upstream_unavailable` | Retry queries later; check task history before resubmitting a generation. |
| `503` | `metering_unavailable` | Pricing or usage cannot currently be confirmed; retry later. |
| `500` | `internal_error` | Keep the request time and any request ID for troubleshooting. |

## Retries and task states

HTTP `200` means this HTTP request succeeded, not that the video is complete. A query response may still contain `PENDING`, `RUNNING`, `FAILED`, or `CANCELED`. Handle these using the [task-state reference](https://docs.anti.rs/en/api-reference/wan3/query-task.md).

Generation requests can incur charges. After a timeout or connection failure, check [task history](https://anti.rs/app/tasks) before submitting again. The generation endpoint does not provide a client idempotency key; repeated POST requests may create separately billed tasks. If you have a task ID, continue querying that task.


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