Request Body
File name of the artifact being uploaded. Can handle files up to 5GB.
Type of artifact being uploaded. Must be one of: video, audio, or subtitles.
Response
Unique identifier for the created artifact.
Presigned URL for uploading the entire file.
ISO timestamp when the upload URL expires.
curl -X POST \
https://studio.dubformer.ai/api/v1/artifacts \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "source_video.mp4",
"type": "video"
}'
{
"artifactId": "1a2b3c4d5e6f7g8h9i0j",
"uploadUrl": "https://storage.dubformer.ai/uploads/1a2b3c4d5e6f7g8h9i0j?signed=...",
"expiresAt": "2023-12-31T23:59:59Z"
}
Upload the file
After receiving the response with the presigned URL, upload your file using a PUT request:
curl -X PUT \
"https://storage.dubformer.ai/uploads/1a2b3c4d5e6f7g8h9i0j?signed=..." \
-H 'Content-Type: application/octet-stream' \
--data-binary '@/path/to/your/source_video.mp4'
The upload URL is valid only for the specified time in the expiresAt field.
Make sure to complete your upload before this time expires.