Dog rates social card with SVG background
Social card with a fun SVG background and highlighted text.
Explore exampleAutogenerated invite graphic for a party.

Interactive example
Change the HTML, CSS, or API options. The browser preview updates as you edit; select Image to render the final output through the API.
Example code
Choose a language and copy a complete request using this example's HTML, CSS, and API options.
# pip install requests
import os
import requests
request = {
"html": """<div class="p-4 background d-block text-center" style="width: 500px">
<span class="tweet-text mb-4">
Join us for Jen's birthday party this Saturday at Golden Gate Park. Starts at 1:30pm. Hope to see you there! 🥳
</span>
<div class="p-4">
</div>
</div>
<!-- Include external CSS, JavaScript or Fonts! -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Yusei+Magic&display=swap" rel="stylesheet">""",
"css": """.background {
background-color: #ff7700;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Cpolygon fill='%23cc0000' points='957 450 539 900 1396 900'/%3E%3Cpolygon fill='%23aa0000' points='957 450 872.9 900 1396 900'/%3E%3Cpolygon fill='%23d6002b' points='-60 900 398 662 816 900'/%3E%3Cpolygon fill='%23b10022' points='337 900 398 662 816 900'/%3E%3Cpolygon fill='%23d9004b' points='1203 546 1552 900 876 900'/%3E%3Cpolygon fill='%23b2003d' points='1203 546 1552 900 1162 900'/%3E%3Cpolygon fill='%23d3006c' points='641 695 886 900 367 900'/%3E%3Cpolygon fill='%23ac0057' points='587 900 641 695 886 900'/%3E%3Cpolygon fill='%23c4008c' points='1710 900 1401 632 1096 900'/%3E%3Cpolygon fill='%239e0071' points='1710 900 1401 632 1365 900'/%3E%3Cpolygon fill='%23aa00aa' points='1210 900 971 687 725 900'/%3E%3Cpolygon fill='%23880088' points='943 900 1210 900 971 687'/%3E%3C/svg%3E");
background-size: cover;
}
.tweet-text {
background-color: #fff2ac;
background-image: linear-gradient(to right, #EF7E31 0%, #C72B4E 100%);
font-weight: bold;
font-size: 32px;
color: #F3EBF1;
font-family: 'Yusei Magic', sans-serif;
margin-bottom: 20px;
padding: px;
}""",
}
response = requests.post(
"https://hcti.io/v1/image",
auth=(os.environ["HCTI_API_ID"], os.environ["HCTI_API_KEY"]),
json=request,
timeout=30,
)
response.raise_for_status()
result = response.json()
print(result["url"])
From code to screenshot
HTML/CSS to Image renders HTML and CSS in hosted Chrome, then captures the result as an image or PDF. Each example combines real source code with the API options used for the render, so it is both a working demo and a starting point for your own request.
Edit the source and options above to test changes in the browser, then render through the API to see the production result.
Yes. Open an example to inspect and edit its complete HTML, CSS, and render options. Use it as a starting point, then send the resulting request from your application.
Examples are complete API requests built from HTML and CSS. Templates are saved, reusable designs created in the visual editor and rendered repeatedly with different variable values.
Yes. HCTI can render HTML and CSS or capture a public webpage as an image, and it can generate PDFs when you need document output instead of a screenshot.
Send the example’s HTML, CSS, and request options from your application.
Use HCTI with MCP-enabled AI tools, Zapier, Make, and other automation platforms.
Start with a visual preset, customize it in the template editor, and render it repeatedly with dynamic values.
Keep exploring
Social card with a fun SVG background and highlighted text.
Explore example