Docs | imagemash.io
DashboardSign up for Free
  • 🎉imagemash.io
  • 🚀Getting Started
    • Simple CDN Link Usage
  • 💽Sources
    • IM Cloud Storage
    • Image URL
    • Storage Providers
      • Amazon S3
      • Google Cloud
      • S3 Compatible Storage
    • Web Folder
  • 🖼️Image Transform
    • Transform Options
      • Quality
      • Width
      • Height
      • Scale
      • Crop
      • Gravity
      • Background
      • Border
      • Round
      • Output Format
      • Angle (Rotate)
      • Flip
      • Helpers
        • x, y
      • Filters
        • Tint
        • Flatten
        • Grayscale
        • Blur
        • Sharpen
        • Median
        • Threshold
        • Negative
    • Transform Cheat Sheet
    • Named Transforms
  • 🛠️API
    • API - Good to knows
    • API Methods
      • Account
        • Named Transforms
          • Get named transforms
          • Add named transform
          • Remove named transform
        • Image URL Restriction
          • Get keyword list
          • Add keyword to list
          • Remove keyword from list
          • Change keyword list usage
      • Storage
        • Upload file
        • Get and search files
        • Delete files
        • Add new tags to files
        • Set tags of files
        • Remove tags from files
        • Purge Cache
      • Optimize / Transform
  • ❓How it works?
    • Custom Domain
    • Bandwidth
    • Cloud Storage
    • Caching
    • Purge Cache
    • Limits
  • Contact Us
Powered by GitBook
On this page
  • Postman Collection
  • Authentication
  • Content Type
  • Handling Rate Limits
  1. API

API - Good to knows

PreviousNamed TransformsNextAPI Methods

Last updated 2 years ago

Postman Collection

All current API methods are collected in a Postman Collection. You can import them via the button below. apikey is assigned to a collection variable so you don't need to write your API key to the header in every request. Don't forget to write your own apikey in the collection variables section by clicking the header of our collection.

Authentication

You must provide your apikey in the header for all API requests.

Content Type

In most request libraries, you won't need to add a content-type header. In case of need, you can find supported content types below.

All API endpoints support both:

  • application/x-www-form-urlencoded
  • application/json

Upload file and Optimize / Transform endpoints also support extra

  • multipart/form-data

Handling Rate Limits

  • CDN Link has no rate limit when fetching files from caches. Both from the global cache and internal cache.

  • API calls are rate limited.

Rate limits are different for each endpoint. Imagemash.io sends 2 rate-limit headers for every API call response.

rl-remain: x (x requests/points left to stay below the rate limit)

rl-ttl: y (After y seconds your rate limit will be reset)

The logic is fairly simple; when your x is 0, sleep for y seconds.

If you continue sending requests after your rl-remain is 0, you will get (429) Too Many Requests response.

It is recommended to implement a simple middleware function that checks response headers for your API calls. Otherwise, your requests may be blocked for a couple of minutes.

Some API Calls may have reduced limits for free accounts depending on the load in servers and may have less process priority.

🛠️
Run in Postman