Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsTo generate a screenshot from a WordPress site with HTML/CSS to Image (HCTI), send a server-side POST request to https://hcti.io/v1/image using WordPress’s HTTP API. Authenticate with your HCTI API ID and API key via HTTP Basic authentication, then send either HTML or a public page URL. Keep the API key on the server, check the response before displaying its image URL, and avoid generating a new image on every page view unless your workflow requires it.
Choose HTML or a public URL
HCTI accepts one of two rendering inputs: HTML that your WordPress application supplies, or a fully qualified URL for a public webpage. CSS can be included with HTML when you need to control the rendered appearance. Do not send both inputs in one request: the URL takes precedence over HTML.
- Use HTML when WordPress generates the markup and you want to render that content directly.
- Use a URL when the page is already publicly reachable and you want HCTI to capture that page.
HCTI documents PNG, JPG, WebP, and PDF output formats. Check the current API reference for the request parameters and response schema relevant to the format you need: HCTI API documentation.
Keep the HCTI credentials on the server
Get the API ID and API key from your HCTI account. HCTI uses the ID as the HTTP Basic username and the key as the password. Its documentation advises treating the API key like a password and keeping it in a server environment or secret manager; HCTI also supports permission-scoped keys. Use the narrowest permissions suitable for the integration.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- Store credentials in server-side configuration, environment variables, or a suitable secret store.
- Do not put the API key in browser JavaScript, a shortcode attribute, a public theme file, or rendered page HTML.
- Do not log the Authorization header or expose raw vendor errors to visitors.
For a simple WordPress deployment, define the credentials in server-side configuration and read them in PHP. Avoid committing real credentials to a public code repository.
Call HCTI from WordPress PHP
Use WordPress’s wp_remote_post() helper so the authenticated request runs on the server. The example below demonstrates a URL capture. It is an illustrative integration, not a tested plugin; confirm the current endpoint’s accepted body format and JSON response fields against HCTI’s live documentation before deploying it.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
<?php
function mysite_hcti_capture_public_url( $public_page_url ) {
$api_id = getenv( 'HCTI_API_ID' );
$api_key = getenv( 'HCTI_API_KEY' );
if ( ! $api_id || ! $api_key ) {
return new WP_Error( 'hcti_credentials_missing', 'HCTI credentials are not configured.' );
}
// Restrict this argument to an expected, authorized public URL in your application.
$args = array(
'headers' => array(
'Authorization' => 'Basic ' . base64_encode( $api_id . ':' . $api_key ),
'Content-Type' => 'application/json',
),
'body' => wp_json_encode( array(
'url' => $public_page_url,
) ),
'timeout' => 30,
);
$response = wp_remote_post( 'https://hcti.io/v1/image', $args );
if ( is_wp_error( $response ) ) {
// Log a safe diagnostic for administrators; do not log credentials.
return new WP_Error( 'hcti_transport_error', 'The screenshot request could not be completed.' );
}
$status = wp_remote_retrieve_response_code( $response );
$body = wp_remote_retrieve_body( $response );
if ( $status < 200 || $status >= 300 ) {
return new WP_Error( 'hcti_http_error', 'HCTI returned an unsuccessful HTTP status.' );
}
$data = json_decode( $body, true );
if ( ! is_array( $data ) ) {
return new WP_Error( 'hcti_invalid_response', 'HCTI returned an unexpected response.' );
}
// Replace 'url' below with the image URL field confirmed in HCTI's current schema.
if ( empty( $data['url'] ) || ! is_string( $data['url'] ) ) {
return new WP_Error( 'hcti_image_url_missing', 'The response did not contain the expected image URL.' );
}
return esc_url_raw( $data['url'] );
}
WordPress’s HTTP API provides wp_remote_post() for the request and helpers such as wp_remote_retrieve_response_code() and wp_remote_retrieve_body() to inspect the result. See the WordPress HTTP API guide and function reference.
If you generate HTML rather than capture a URL, construct the request body with an html field and, where needed, a CSS field, instead of the url field. The endpoint accepts one rendering input, so do not include both.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Display the returned image or import it into WordPress
HCTI returns a URL for the generated image. Once the response schema is verified and the URL has been validated, you can use it as the src of an image in a WordPress template or block. HCTI says the URL remains available while the account is active and is cached and optimized through Cloudflare; treat that availability as subject to account activity and the service’s terms.
Displaying the remote image and creating a local Media Library attachment are different workflows. A Media Library import requires downloading the image and creating an attachment in WordPress; it is not accomplished merely by printing HCTI’s URL. WordPress’s media REST resource is documented at the Media endpoint reference, but the reviewed material does not establish a complete upload recipe.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Control when screenshots are generated
Choose the trigger that matches the job. A one-time administrator action, an on-demand feature, and a scheduled batch have different costs and failure patterns. Avoid calling HCTI on every ordinary page view if the screenshot can be reused.
- Cache or deduplicate repeated requests for unchanged content where appropriate. HCTI documents caching and request deduplication; verify current parameters and behavior in its API reference.
- Use a bounded timeout and handle transport errors separately from HTTP failures and malformed JSON.
- Limit request frequency for batch or front-end workflows, and decide how the site should behave if the image cannot be generated.
- Validate target URLs before a server-side request. If visitors can influence the destination, restrict accepted hosts and paths to prevent your server from being used to request unintended addresses.
Capture pages that require authorization
HCTI’s URL capture is intended for public webpages and does not automate an interactive login flow. For a page your application is authorized to access, HCTI’s documentation describes using short-lived session cookies or authorization tokens in allowed headers. Do not use this as a way to access pages without permission, and avoid sending long-lived user credentials when a short-lived token will work.
Recommended Free Tools
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Troubleshoot common failures
| Symptom | Likely cause | What to check |
|---|---|---|
| WordPress returns a transport error | The outbound request could not complete, for example because of a network, DNS, TLS, or timeout issue. | Check server connectivity and the configured timeout. Log a safe diagnostic, without the API key or Authorization header. |
| HCTI responds with an unsuccessful HTTP status | Credentials, request fields, permissions, or another API requirement may be wrong. | Check the API ID/key pair, the endpoint, and the current request documentation. Do not publish an unreviewed raw error body. |
| The JSON cannot be decoded or contains no expected image URL | The response may differ from the assumed schema, or the request may have failed in a way the code did not account for. | Inspect a safely redacted response in an administrator-only context and update the field handling to match HCTI’s current schema. |
| The captured page is blank or incomplete | The target may not be publicly reachable, may depend on interactive authentication, or may not have finished rendering as expected. | Confirm the page is public or use an authorized supported header approach. Review HCTI’s current rendering options for waits or other page-specific needs. |
| The key appears in browser tools or page source | The request was made from frontend code or the secret was embedded in markup. | Move the request to server-side PHP, remove the exposed key, and rotate it in HCTI if it was disclosed. |
HCTI plans and India-specific checks
HCTI’s pricing page listed the following vendor-published USD prices when accessed on 2026-10-03. Prices, allowances, plan names, and features can change; verify the live page before purchase. These are not India-specific tax-inclusive quotes.
| Plan | Vendor-published price or allowance | Relevant note |
|---|---|---|
| Free | 50 images per month | Dynamic Open Graph images are not included in Free, according to the pricing page. |
| Basic | $14 per month | Confirm current limits and features on the pricing page. |
| Pro | $149 per month | Confirm current limits and features on the pricing page. |
| Scale | $749 per month | Confirm current limits and features on the pricing page. |
For a site operated in India, the reviewed vendor information does not establish Indian GST or other tax treatment, billing currency or exchange-rate handling, data residency, or India-specific support terms. Check those points directly with HCTI before budgeting or deploying for a regulated workload. See HCTI pricing.
Or skip the browser setup
ScreenshotNeo is another way to request a website screenshot: it offers a one-call API and an MCP server for AI agents. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. It includes 1,000 screenshots per month free with no card, and paid plans start at $5 for 3,000. Details and options are in the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Learn more at ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Can HCTI capture a WordPress page that visitors cannot access?
Not through an automated interactive login flow. Use an authorized, supported short-lived cookie or token approach only when you have permission to access the page.
Does this example save the screenshot in the WordPress Media Library?
No. It handles the returned image URL; importing a file into Media Library is a separate download-and-attachment workflow.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

