Task Management
Uploads an image to the server. Image requirements: aspect ratio must be less than 1:4 or 4:1, file size less than 10MB. Supported formats: "png", "webp", "jpeg", "jpg"
The image upload process consists of three steps:
To initiate the upload, you need to create an upload session. This will return a put_url which is used to upload your image.
Use the provided put_url to upload your image via HTTP PUT method. Make sure to specify the correct Content-Type for your image format. In the response headers, you will find an etag. Record this etag as it is needed in the next step.
curl -v -H "Content-Type: image/png" -X PUT --data-binary '@upload.png' '{put_url_example}' // The response header will contain an etag. Make sure to note this etag. // example * upload completely sent off: 157915 bytes < HTTP/2 200 < content-length: 0 < date: Thu, 05 Sep 2024 03:45:20 GMT < x-amz-expiration: expiry-date="Fri, 13 Sep 2024 00:00:00 GMT", rule-id="delete-for-7-days" < x-amz-server-side-encryption: AES256 < etag: "d035e206b3243107372249559495346c"
Finalize the upload by sending a finish request with the recorded etag. This will provide you with the URI of the uploaded image, which can then be used as an input for creating tasks.