| description | 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.
{% code title="curl_example" %}
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' -d html="<div class='ping'>Pong ✅</div>" -d css=".ping { padding: 20px; font-family: 'sans-serif'; }"{% endcode %}
The API will return a json payload with the URL to your new image.
{% code title="response.json" %}
{ "url":"https://hcti.io/v1/image/1eecf460-e2e5-4db1-9db6-cf862c34a744" }{% endcode %}
For more advanced examples, take a look here.