Note If you plan to self-manage this service on your own infrastructure network. This source code is available at here.

Documentation

Here is the documentation to use our service.


Contents

A. Wihout API Service

  1. Using URL Parameter

B. With API Service

  1. Authentication
  2. Generate Token
  3. Generate Image URL
  4. Generate Image URL Multiple
  5. Purge Cache
  6. Error Response

Without API Service

You are able to cdnify your image directly by using our url parameter. But using this won't hide your original image link.
If you want to hide or proxify your original image link, you should generate your image url by using our API Service.

1. Using URL Parameter

https://cdn.imgproxify.com/image?url=[YOUR_IMAGE_LINK]&referer=[OPTIONAL]&mime=[OPTIONAL]
Description:
  • url : Your image url must be already url_encoded.
  • referer : Use this if you want to bypass hotlink protection. [Optional]
  • mime : Use this if your image url using dynamic url (no extention). [Optional]

Back to top

With API Service

By using our API service, of course you will get all features here.

  1. Unlimited / No Rate Limit request (at this time).
  2. Permanent / Lifetime of use API.

1. Authentication

To use all API service here, you required to have an api key.
To get your api key, you have to make some donation to us.
For more details about make donation, please contact us at here.

Back to top

2. Generate Token

To use all API service here, you have to Generate Token.

MethodUrlHeaderBody
POSThttps://imgproxify.com/api/generate-tokenx-auth-key: [api_key]N/A

Example Response:


{
  "message": "Generate token success",
  "statusCode": 200,
  "data": {
    "token": "9f72356958bbf3b7e...",
    "expire": 1602663919373
  }
}
Description:
  • You have to replace [api_key] with your api key.

Back to top

3. Generate Image URL

Use this API for Single Image URL request.

MethodUrlHeaderBody
POSThttps://imgproxify.com/api/generatecontent-type: application/json{ "url": "https://example.com/300/09f/fff.png", "referer": "", "mime": "", "token": "9f72356958bbf3b7e..." }

Example Response:


{
  "message": "Generate image url success",
  "statusCode": 200,
  "data": {
    "url": "https://cdn.imgproxify.com/image?url=https://example.com/300/09f/fff.png",
    "secure": "https://cdn.imgproxify.com/img/8d9e6cedb5a9666.png"
  }
}
Description:
  • url {string} : This is your image url.
  • referer {string} : Use this if you want to bypass hotlink protection. [Optional]
  • mime {string} : Use this if your image url using dynamic url (no extention). [Optional]
  • token {string} : This is your authentication to use all API service.

Back to top

4. Generate Image URL Multiple

Use this API for Multiple Image URL request.

MethodUrlHeaderBody
POSThttps://imgproxify.com/api/generate-multiplecontent-type: application/json{ "images": [ { "url": "https://example.com/300/09f/fff", "referer": "https://example.com", "mime": "png" } ], "token": "9f72356958bbf3b7e..." }

Example Response:


{
  "message": "Generate image url multiple success",
  "statusCode": 200,
  "data": [
    {
      "image": {
        "url": "https://cdn.imgproxify.com/image?url=https://example.com/300/09f/fff&referer=https://example.com&mime=png",
        "secure": "https://cdn.imgproxify.com/img/8d9e6cedb5a9666.png?referer=8d9e6cedb5a9666&mime=png"
      },
      "success": true,
      "error": ""
    }
  ]
}
Description:
  • images {array object} : This is your image url in array which is contains object:
    • url {string} : This is your image url.
    • referer {string} : Use this if you want to bypass hotlink protection. [Optional]
    • mime {string} : Use this if your image url using dynamic url (no extention). [Optional]
  • token {string} : This is your authentication to use all API service.

Back to top

5. Purge Cache

Use this API for Purge Cache your cdn image url.

MethodUrlHeaderBody
POSThttps://imgproxify.com/api/purge-cachecontent-type: application/json{ "files": [ "https://cdn.imgproxify.com/img/xxx.png", "https://cdn.imgproxify.com/img/abcdef.png", ], "token": "9f72356958bbf3b7e..." }

Example Response:


{
  "message": "Request purge cache success",
  "statusCode": 200,
  "data": {
    "id": "9bf382d639b255667ddf0..."
  }
}
Description:
  • files {array string} : This is your cdn image url in array string. You can input urls up to 30 at this time.
  • token {string} : This is your authentication to use all API service.

Back to top

6. Error Response

We have standard to return all error response with using this json structure.

Example Error Response:


{
  "message": "Wrong authentication method!",
  "error": "Bad Request",
  "statusCode": 400
}
Description:
  • message {string} : This is the error message.
  • error {string} : This is the detail of error.
  • statusCode {number} : This is the status code of error.

Back to top