Media quote, upload, and task recovery
Upload a reference asset, quote a media task, and recover a submission after a lost response.
Prepare a reference file
For a filename-only temporary upload, see .
- Send
POST /api/v1/assetswithfileName,contentType, andfileSizein bytes. The ticket contains a signeduploadUrland a relativecompleteUrl. - PUT the raw file bytes to
uploadUrlwith the exact returned Content-Type. Send the API key only to i2v.ai. The signed storage URL already authorizes the PUT. - POST to
completeUrlon the API origin with your Bearer key. Use the verifiedurlin the model's reference field. If completion returnsasset_not_ready, check the uploaded size and type before retrying. The upload ticket expires in 15 minutes.
Quote and submit with Node.js
Set I2V_API_KEY. To include a reference image, set REFERENCE_IMAGE_PATH to a local PNG or REFERENCE_IMAGE_URL to an existing image URL. The example only quotes until you set both I2V_MAX_COST_USD and I2V_IDEMPOTENCY_KEY. Set I2V_RECEIPT_PATH to an unused, protected local file path before submitting. The example saves the exact body and key there with owner-only permissions. To recover after a timeout, use the receipt lookup below first.

