Skip to content

Why does the H3 reference upload reject my multipart request?

Send multipart/form-data with a binary file field and kind set to photo or reference. Let your HTTP library set the Content-Type boundary. JSON containing a path, a manually incomplete multipart header or the wrong kind will not perform an owned upload. Inspect the upload error before attempting generation with an invalid or missing file ID.

BUILD WITH MINIMAX H3AISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Check request construction; Check field meaning; Use only confirmed responses.
Workflow diagram: Check request construction → Check field meaning → Use only confirmed responses. Read the article for evidence and limits.

The envelope and the media each have limits

The API limits the multipart request to under 22 MB including form data, while individual supported photos are limited to 8 MB and reference MP4 files to 20 MB. Passing the overall envelope check does not make an unsupported file valid. H3 scope and private-storage readiness are additional requirements.

What to do next

  1. 01

    Check request construction

    Use the client's form-data API and attach the actual file bytes. Do not manually set application/json or omit the boundary while sending a multipart body.

  2. 02

    Check field meaning

    Use kind=photo for the replacement image and kind=reference for the short MP4. Verify format, size and the reference's measured 4–10-second runtime before uploading.

  3. 03

    Use only confirmed responses

    Accept the owned ID only from a successful upload response. Retain safe error details and correct the underlying issue rather than passing a placeholder identifier to /videos.

A concrete example

Illustrative cURL setup: use form fields for file=@portrait.jpg and kind=photo while sending the bearer header. Do not add a bare Content-Type: multipart/form-data header that prevents the client from constructing its normal boundary.

Before you call it ready

  • The form includes both required fields.
  • The file is valid within its own limit.
  • Only a confirmed upload ID reaches generation.

When to stop or choose another method

If the upload remains rejected, diagnose the exact envelope or file error. Creating paid jobs with a guessed reference ID cannot repair an unsuccessful transfer.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation