Skip to main content
Materials are uploaded directly to CDN/object storage via presigned URLs, then registered with the VMEG API. Bytes do not pass through the API gateway. Every upload-related POST in this flow requires X-Idempotency-Key.
Early steps (gen-upload-url or multipart initiate) may already return a materialId. That ID is only for continuing the upload. Do not pass it to create-async or other product APIs until the full upload finishes — single-file complete, multipart complete, or an instant-upload / dedup response that already includes a registered material.

Choose an upload mode

Request and response fields: Generate presigned upload URL, Complete single-file upload, and other Assets - Materials → upload operations in API reference.

Single-file upload

1

Get presigned URL

POST /openapi/v1/assets/material/upload/gen-upload-url with fileHash (MD5) and fileName.
2

PUT file to CDN

If the response includes data.material, the file was deduplicated — skip PUT. Otherwise upload bytes to data.uploadUrl.
3

Complete upload

POST /openapi/v1/assets/material/upload/complete with s3Uri, materialId, fileHash, and fileName from the gen-upload-url step.

Example

The Java example uses Jackson (ObjectMapper) for JSON. Add com.fasterxml.jackson.core:jackson-databind to your project, or parse responses with your preferred JSON library.

Multipart upload

For large files:
  1. POST .../multipart/initiate
  2. POST .../multipart/presign-parts — presigned URL per part
  3. PUT each part to CDN and record each part ETag
  4. POST .../multipart/complete — finalize and get materialId
  5. On failure: POST .../multipart/abort
Use recommendedPartSize from the initiate response (S3 minimum part size is typically 5 MB except the last part).

Example

After upload

Only after the full upload flow succeeds, use the registered materialId in source.materialId for media translation. Manage assets via Materials.