Create destination

Registers a bucket Mynth can deliver finished media to. The secret is write-only: it is stored encrypted and never returned by any endpoint. name is the slug you reference from a task's destination field, and it cannot be changed afterwards.

POST/destinations
AuthAPI keyorOAuth tokenHow to send it

A destination is storage of yours that Mynth writes finished images into, so url on the result points at your own domain. Name it on a generation request with its name, not its id.

The secret is write-only: it is stored in a vault and no endpoint returns it. name cannot be changed later. Destinations covers the path and URL templates, which is where most of the configuration is.

Request body#

configobjectrequired
path_templatestringrequired
≤ 2048 characters
url_templatestring

URL template used to create an image URL. It must include a {path} which is a resolved path to file from path_template.

Example:

path_template -> "/images/{id}"

On upload path becomes /images/img_si1EywtFZMvDArkcVSSsN759VFNbHtE_.webp

url_template: "https://my-cdn.my-domain.com/{path}"

The url in the response will be: "https://my-cdn.my-domain.com/images/img_si1EywtFZMvDArkcVSSsN759VFNbHtE_.webp"

Note: The double // are automatically removed and replaced with single slash.

namestringrequired

Destination slug. Immutable after creation. Matches /^[a-z0-9-]+$/.

≥ 1 characters≤ 64 characters
providerobjectrequired
account_idstringrequired
bucketstringrequired
id"r2"required
jurisdictionstring
"default""eu""fedramp"
secretobjectrequired
access_key_idstringrequired
secret_access_keystringrequired

Response#

201Destination created

dataobjectrequired
configjson | nullrequired
createdAtanyrequired
idstringrequired
namestringrequired
providerjson | nullrequired
updatedAtanyrequired

Errors#

A failed call names what went wrong in code, with a sentence in message. The codes, which of them are worth retrying, and how to read a validation failure are on Errors.