Getting Started
Get up and running with API Market in under 5 minutes.
1. Create an Account
Click the Sign in button in the top-right corner and continue with Google to create your account.
2. Get Your API Key
Navigate to Dashboard > API Keys and click "Create API Key". Copy the key immediately — it won't be shown again.
3. Top Up Credits
Go to Dashboard > Billing and purchase credits. 1 credit = $0.005 USD.
4. Make Your First Request
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "A drone shot flying over mountains at sunset, cinematic lighting",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p"
}
}'
You'll receive a response with a task ID:
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cbf6b69d-4f03-4817-8ed7-94c0292184a8"
}
}
5. Get the Result
Polling: Query the task status until it's completed:
curl https://api.aivideoapi.ai/v1/tasks/cbf6b69d-4f03-4817-8ed7-94c0292184a8 \
-H "Authorization: Bearer sk-your-api-key"
Callback: Or pass callback_url in the request body to receive automatic notifications when the task completes or fails. See Callback for details.
Historical task content
Task inputs and outputs are retained online for a rolling 60 days. Older content is cleared in batches once task processing, callback delivery, and settlement have safely ended. Task status, credits consumed, and creation and completion times remain available. Tasks that still need processing or review retain their content.
The web task details show when inputs and outputs have been cleared under the 60-day policy. For a successful task whose content has been cleared, GET /v1/tasks/{taskId} still returns status: "completed", with output: null. Cleanup does not rerun the task or charge credits again. Cleared content cannot be recovered, so save generated results promptly. Content previously marked as archived remains retrievable by an administrator using the existing archive tools.
Quick Integration with AI
Click the Copy Markdown button in the top-right corner of any doc page, then paste it into an AI coding assistant along with your requirements. The AI can generate ready-to-use integration code for you in seconds.
Next Steps
- Authentication — API key security features
- Credits Query — Check your balance via API
- Video Generation — Overview and available models
- Seedance 2.0 — Multi-modal video generation guide
- Pricing — Understand the credit system