Quickstart
Follow these steps to start using the WayinVideo API in minutes.
1. Obtain Your API Key
- Log in to your WayinVideo API Dashboard
- Click Create API Key to generate a new key
- Copy and securely store your API key
Important: Keep your API key secret. Don't expose it in client-side code or public repositories.
2. Submit a Clipping Task
Send a video URL to submit an AI clipping task:
curl -X POST https://wayinvideo-api.wayin.ai/open/v2/clips \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-wayinvideo-api-version: v2" \
-d '{
"video_url": "https://www.youtube.com/watch?v=example",
"enable_export": false
}'
Response:
{
"code": "0",
"data": {
"id": "proj_abc123",
"name": "sample project name",
"status": "CREATED"
},
"message": "success"
}
3. Poll for Results
Poll the task status until it reaches SUCCEEDED. We recommend polling every 30 seconds.
curl -X GET https://wayinvideo-api.wayin.ai/open/v2/clips/results/proj_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-wayinvideo-api-version: v2"
When complete, the response includes your clips:
{
"code": "0",
"data": {
"id": "proj_abc123",
"name": "sample project name",
"status": "SUCCEEDED",
"clips": [
{
"idx": 0,
"title": "sample title",
"begin_ms": "15000",
"end_ms": "75000",
"thumbnail": "https://cdn.example.com/thumb/clip_001.jpg",
"tags": ["insight", "analysis"],
"desc": "sample description"
}
]
},
"message": "success"
}
Note: When submitting a Clipping task, you can set
enable_export = trueso that the service renders and exports the video and returns export links. Because rendering and export require additional processing time, completion will take longer than when export is disabled.
4. Next Steps
- AI Clipping — Get viral clips from long videos
- Find Moments — Find moments in videos using natural-language queries
- Video Summarization — Get overviews and timeline highlights from videos
- Video Transcription — Extract transcripts with speaker identification