Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (24 sloc) 827 Bytes
Converting HTML/CSS to an Image from the command line with cURL.


Here you can generate an image using cURL. Run this command in your terminal.

Example code

{% code-tabs %} {% code-tabs-item title="curl_example" %}

curl -X POST -u 'UserID:APIKey' -d html="<div class='ping'>Pong ✅</div>" -d css=".ping { padding: 20px; font-family: 'sans-serif'; }"

{% endcode-tabs-item %} {% endcode-tabs %}


The API will return a json payload with the URL to your new image.

{% code-tabs %} {% code-tabs-item title="response.json" %}

{ "url":"" }

{% endcode-tabs-item %} {% endcode-tabs %}

More examples

For more advanced examples, take a look here.