Upload image

Add an image to your Media Library from a URL, to use on products.

POST https://cotlet.dev/api/v1/printify/images

write

Uploads an image from a public URL to your Printify Media Library and returns its ID, size and type. Reuse the ID on any product. It reaches no customer and you can archive the image later, so it runs without asking first.

Parameters

Parameters: upload_image
NameTypeDescription
file_name string required string Name shown in the Media Library.
url string required string Public URL of the image.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/printify/images \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_name":"file name","url":"https://example.com"}'
Python
result = client.call("printify", "upload_image", {"file_name":"file name","url":"https://example.com"})
Node.js
const result = await cotlet.call('printify', 'upload_image', {"file_name":"file name","url":"https://example.com"});
CLI
cotlet call printify upload_image --data '{"file_name":"file name","url":"https://example.com"}'

Example response

JSON

{
  "image_id": "5d39b159e7c48c000728c89f",
  "file_name": "night-owl.png",
  "width": 4000,
  "height": 4000,
  "mime_type": "image/png"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.