Destinations
Your storage.Your URL.
Name storage once. Pass the name on a request. Mynth writes each image there before the task completes, and url is on your domain.
Path
url
https://cdn.example.com/campaigns/spring/01HZYX4M6K8P2Q9R0T7W3Y5Z8C.webp
mynth_url
https:
- path_template
- campaigns/{meta.campaign}/{ulid}
- destination
- prod-cdn
The date and ids are an example. A real upload uses the time of the upload and a new id per file. mynth_url is Mynth's copy, served for 7 days, and the path template does not change it.
Clear the field and the key is omitted. A missing metadata value is written as the text undefined.
Storage
S3, R2, or Bunny
A destination names one of these. S3 also covers any host that speaks the S3 API.
- s3
bucketandregion. Setendpointfor Backblaze B2, MinIO, Wasabi, or DigitalOcean Spaces, andforce_path_stylewhen the host wants path-style URLs.- r2
account_idandbucket.jurisdictionacceptsdefault,eu, orfedramp.- bunny
storage_zone.regiondefaults tode, and can beuk,ny,la,sg,se,br,jh, orsyd.
The secret is stored apart from the destination, and no endpoint returns it. Create one in the dashboard, then run a test upload before a task depends on it. Destinations has the provider fields and the CLI.
The request
Pass the name, not the id
The field takes the name you created. The rest of the request stays as it was.
- destination
- The name, such as
prod-cdn. 1 to 64 characters, lowercase letters, digits, and dashes. It cannot be changed. A different provider means a new destination. Thedst_id is for managing it. - Default
MYNTH_DESTINATION, ordestinationpassed tonew Mynth(). The field on the request wins over both.- Tasks
image.generate,image.remove_backgroundandimage.upscaleaccept it.video.generatedrops the field and does not error.- Unknown name
- Fails at creation with
VALIDATION_ERROR. The task is not queued.
The result
A completed task has already uploaded
Mynth stores its own copy, then streams that copy into your storage. The task completes after the upload.
- url
- Built from
url_templateby filling{path}. Leave the template unset andurlis null even when the file was stored. - mynth_url
- Set whenever the image succeeds. Served for 7 days. Not built from the path template.
- Upload failed
- The image still succeeds, and
urlis null.image.generateadds no error.image.remove_backgroundandimage.upscaleadd adestinationblock. - task.urls
- The SDK drops images whose
urlis null. ReadgetImages(). - Overwrite
- A template with no per-file token writes the same key for every image in the task. A count of 4 keeps one file. Include
{id}or{ulid}.
Path tokens, retries, and the error codes are in Destinations.
Price
Uploading does not change the price
You pay for the successful image. The upload is not a separate charge. Your storage provider can still bill for the object.
Pricing lists every charge. Delivery is not one of them.