ImgCake API


This documentation is designed for people familiar with any web scripting language such as PHP, Ruby, Java, C# etc, HTML and URL concepts. You should also be familiar with adding images to a webpage.

Obtaining an API and your Private Key

You can obtain your API key along with Private key from your members area. Here are quick overview on what these keys does

API Key Private key
API key uniquely identifies you and register requests you sent through to ImgCake under your account. API keys starts with letters IC Private key signs your request, you create a request token using this key and we validate this request at our end before returning any data. This key start with letters SK

So how to request a webshot

Here is what webshot request to ImgCake will look like

And how exactly we create a request token?

Simple formulae to create a request token is shown below REQUEST_TOKEN = md5("url=" + PRIVATEKEY) Points to note

what other settings are available?

Parameters are case sensitive.

Lets not make it too complicated for you.

Parameter Meaning Default Value

Sets window dimensions. passed as viewport=wxh

i.e. &viewport=1024x768 etc, This is exactly equivalent to resizing your browser window.
1280x800, maximum 2400x1920, any larger value will be adjusted to default value

Constrain webshot based on width.

i.e. &thumbnail_width=500

We will make an attempt to render full webpage.


If you would like to override default language request headers. Use W3C Internationalization Checker to check what default Accept-Language header value is for a website.

&accept_languages=en-gb;, Please url encode this value

Pass a custom user user agent

&user_agent=value, Please url encode this value

Current timestamp of your server to this parameter


Got a custom CSS rules, pass on reference file

&inject_css=, Please url encode this value
Maximum 500 characters

We cache webshot for 30 days. You can override this default.

&ttl=2. If supplied ttl is greater than 30, then value is adjusted to 30

JPEG compression quality

. Value range 20%-100%. Applies if requested image format is JPEG

How about a code samples

checkout our getting started guide