HTML CSS To Image is a powerful tool that converts HTML and CSS into high-quality images, enabling developers to automate image generation for web content. Relevance AI enhances this functionality by introducing AI Agents that can intelligently manage and optimize your image creation workflows.



HTML CSS To Image allows for the conversion of HTML and CSS into high-quality images. With Relevance AI, you can leverage this capability to create intelligent, automated image generation processes that adapt and respond to your needs.
Visual Communication Mastery
Transform text-based interactions into compelling visual content instantly, enabling the agent to communicate more effectively through images.
Brand Consistency Automation
Maintain perfect visual brand alignment across all generated content through templated design systems and style guidelines.
Template-Driven Intelligence
Leverage smart template systems to create contextually relevant visual content based on user needs and preferences.
Relevance AI seamlessly integrates with HTML CSS To Image to enhance your workflows with dynamic image generation.
What you’ll need
You don't need to be a developer to set up this integration. Follow this simple guide to get started:
- A Relevance AI account
- An Airtable account with access to the base and table you'd like to use
- Authorization (you'll connect securely using OAuth—no sensitive info stored manually)
Security & Reliability
HTML CSS To Image (HCTI) integration allows you to programmatically convert HTML and CSS into high-quality images. This integration enables developers to generate images from HTML/CSS code, create screenshots from URLs, automate image generation for web content, and maintain consistent visual rendering across platforms.
To get started, ensure you have an HTML CSS To Image account with API access and the necessary OAuth credentials configured for authentication. Additionally, if you are using the Pipedream integration, a Pipedream account is required.
Your environment must support HTTPS and REST API calls, and be able to handle JSON responses. Make sure you have the required permissions, including the `pipedream-html-css-to-image-read-write` OAuth scope and API access enabled on your HCTI account.
For authentication setup, use the following code snippet:
const config = { oauth_account_id: "YOUR_HCTI_OAUTH_ACCOUNT_ID", oauth_permission_type: "pipedream-html-css-to-image-read-write" }
Next, configure the base settings:
const baseConfig = { base_url: "https://hcti.io", headers: { "Content-Type": "application/json" } }
To create an image from HTML/CSS, use the following example:
const createImageFromHTML = { method: "POST", path: "/v1/image", body: { html: "<div>Hello World!</div>", css: ".div { color: blue; }" }, oauth_account_id: "YOUR_OAUTH_ACCOUNT_ID" }
The expected response will include a URL to the generated image:
{ response_body: { url: "https://hcti.io/v1/image/example-hash", id: "example-hash" }, status: 200 }
For creating an image from a URL, you can use the following code:
const createImageFromURL = { method: "POST", path: "/v1/image/url", body: { url: "https://example.com" }, oauth_account_id: "YOUR_OAUTH_ACCOUNT_ID" }
For advanced usage, you can customize headers in your requests:
const customRequest = { method: "POST", path: "/v1/image", headers: { "User-Agent": "Custom Application", "Accept": "application/json" }, body: { html: "<div>Custom Content</div>" } }
In case of troubleshooting, here are some common issues and their solutions:
- Authentication Errors (401): Verify OAuth account ID, ensure permissions are configured, and check if the access token is expired.
- Invalid Request Format (400): Verify HTML/CSS syntax, ensure URL encoding, and check content-type headers.
- Rate Limiting (429): Implement request throttling, check account limits, and add retry logic for failed requests.
- Timeout Issues: Reduce HTML/CSS complexity, check network connectivity, and implement appropriate timeout handling.
For best practices, consider the following:
- Performance Optimization: Minimize HTML/CSS content, cache frequently used images, and use appropriate image dimensions.
- Error Handling: Use try-catch blocks to manage errors effectively.
- try { const response = await makeHCTIRequest(config); if (response.status !== 200) { handleError(response); } } catch (error) { console.error("HCTI Request failed:", error); }
- Security: Never expose OAuth credentials in client-side code, validate input HTML/CSS, and implement proper access controls.
Be aware of resource limits, including a maximum HTML and CSS size of 50MB, a request timeout of 30 seconds, and rate limits that vary by plan.
For support resources, refer to the API documentation at https://hcti.io/docs, contact support via email at [email protected], or check the status page at https://status.hcti.io.
Remember to replace placeholder values (YOUR_OAUTH_ACCOUNT_ID, etc.) with your actual credentials when implementing the integration.
No training on your data
Your data remains private and is never utilized for model training purposes.
Security first
We never store anything we don’t need to. The inputs or outputs of your tools are never stored.

To get the most out of the HTML CSS To Image + Relevance AI integration without writing code:
- Start with clean HTML/CSS: Ensure your HTML and CSS are well-structured and free of errors for optimal image generation.
- Use templates: Create reusable HTML/CSS templates for consistent image outputs, making it easier to generate images for various content.
- Connect carefully: Verify your OAuth credentials and permissions are correctly configured to avoid authentication issues.
- Test before scaling: Generate images with sample HTML/CSS to ensure everything works as expected before applying it to larger datasets.
- Monitor resource limits: Be aware of the maximum HTML/CSS sizes and request timeouts to prevent errors during image generation.