Finish and check a video upload
Finish and check a video upload with the Wavegrain Posting API: POST /api/v1/media/{id}/complete. Parameters, responses and an example request.
POST /api/v1/media/{id}/complete is part of the Posting API. Every call needs an access key: see Authentication.
Needs the write permission.
Joins the parts and checks the file by its bytes: an MP4 or MOV with H.264 or HEVC video. It then answers its length, size and frame rate, and for each network whether it takes the video and, if not, which rule it breaks.
Limits per network: TikTok up to 10 minutes and 4 GB, 23 to 60 frames a second; Instagram 3 seconds to 15 minutes, 300 MB, at most 1920 px wide, AAC audio, the index at the start of the file; Facebook 3 to 90 seconds, at least 540 x 960, AAC audio; Threads up to 5 minutes and 1 GB; YouTube up to 15 minutes and 2 GB. Networks: tiktok, instagram, facebook, threads, youtube.
A file no network takes, or that is not a video, is rejected and deleted. Calling it again answers the same result.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string | yes |
Example request
curl -X POST https://wavegrain.com/api/v1/media/ID/complete \
-H "Authorization: Bearer $WAVEGRAIN_KEY"
Responses
| Status | Meaning |
|---|---|
| 200 | The checked video: ready, or rejected with the problem. |
| 401 | No access key, or an unknown, revoked or expired one |
| 403 | The key lacks the permission, or the account has no active plan |
| 404 | No such video, or not yours. |
| 409 | A part is missing or the wrong size (details names it), or another call is checking the video. |
| 429 | Too many requests for the key or the account |
| 500 | Something went wrong on Wavegrain's side; try again, and send the request id if it keeps failing. |
A successful answer:
{
"id": "video_Pq3Lx9",
"kind": "video",
"status": "ready",
"mime": "video/mp4",
"bytes": 48211340,
"expiresAt": "2026-11-14T08:10:00.000Z",
"video": {
"durationMs": 21500,
"width": 1080,
"height": 1920,
"fps": 30,
"videoCodec": "h264",
"audioCodec": "aac",
"faststart": true
},
"networks": {
"tiktok": {
"accepted": true,
"reason": null
},
"instagram": {
"accepted": true,
"reason": null
},
"youtube": {
"accepted": true,
"reason": null
}
},
"problem": null,
"upload": null
}
More in the Posting API
- List brands, groups and connected accounts:
GET /api/v1/accounts - List posts:
GET /api/v1/posts - Create a post:
POST /api/v1/posts - Get a post:
GET /api/v1/posts/{id} - Cancel a post:
DELETE /api/v1/posts/{id} - Start an image or video upload:
POST /api/v1/media - Get an upload:
GET /api/v1/media/{id} - Delete a video:
DELETE /api/v1/media/{id} - Write captions:
POST /api/v1/captions - All endpoints
Something wrong or missing? Write to support@wavegrain.com.