Video Upload
Video Upload API
AntCDN supports two upload workflows:
- Direct upload (recommended): request a pre-signed URL, then
PUTbytes directly to storage. - Upload from URL: give AntCDN an HTTPS URL and we fetch it server-side.
All upload requests use the API base https://api.antcdn.net/v1 and require X-Api-Key.
Option A (Recommended): Direct Upload with a Pre-signed URL
1) Request upload URL
/videos/upload-url
Example request:
curl -X POST "https://api.antcdn.net/v1/videos/upload-url" \ -H "X-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileName": "demo.mp4", "allowPublicAccess": true, "videoQuality": "high" }'Example response:
{ "body": { "assetId": "vid_XXX", "signedURL": "https://<storage-provider>/<path>?<signature>", "bucketPath": "<internal-bucket-path>", "expiresAt": 1640995200 }}2) Upload bytes
curl -X PUT "SIGNED_URL_FROM_STEP_1" --data-binary @demo.mp4Tip
Processing starts automatically after the upload finishes. Use assetId to query status and to create Edge Keys for playback.
Option B: Upload from an Accessible URL
/videos/upload
curl -X POST "https://api.antcdn.net/v1/videos/upload" \ -H "X-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileName": "demo.mp4", "videoURL": "https://example.com/demo.mp4", "allowPublicAccess": true, "videoQuality": "high" }'Response:
{ "body": { "assetId": "vid_XXX" }}Next steps
- Check status and metadata:
GET /videos/{assetId} - Create/manage playback Edge Keys: see the “Edge Keys” docs
- Embed:
https://player.antcdn.net/v1/{edgeKey}/master.m3u8