文档目录

Quickstart

Get your first CAPI generation running in under 5 minutes.

1 分钟阅读

此页正文目前仅提供英文版本,我们正在陆续补充中文翻译。界面与导航已完成中文化。

Step 1: Get an API Key

Create a CAPI account, select a workspace, and generate a key from the dashboard. Keys are scoped per workspace, so you can rotate or revoke one without touching the rest of your setup.

Add workspace credit by redeeming a code from your CAPI provider. A CAPI administrator can issue and manage redeem codes.

Step 2: Create Your First Video Task

Video generation is asynchronous. Choose an enabled video model from the catalog, submit once with an Idempotency-Key, then use the returned task identifier to retrieve the result.

SHELL
curl -X POST https://capi.minapp.xin/api/v1/videos \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Idempotency-Key: demo-video-001" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_VIDEO_MODEL",
    "prompt": "A paper kite flying above a quiet coastal town at sunrise"
  }'

Step 3: Check the Result

Poll GET /api/v1/tasks/{id}. Completed tasks contain a provider result URL; failed tasks release their reservation, while unknown tasks remain held for reconciliation.

What's Next?