No browser runtime to maintain
Keep the deployment as a small Go service instead of adding Chrome and a browser-controller process to the runtime.
URL to JPEG with GoLang
No browser management required
Capture public webpages from GoLang without installing Chrome, running chromedp or Rod, or maintaining screenshot storage and delivery.
GoLang workflow
Choose the URL and browser state here, then use the GoLang example below instead of rebuilding the screenshot workflow locally.
Managed screenshots
Keep the application code focused on the request and response while HCTI manages Chromium, page loading, render isolation, retries, and hosted output.
Keep the deployment as a small Go service instead of adding Chrome and a browser-controller process to the runtime.
Set the viewport, full-page mode, selector, timing, color scheme, and browser state as request parameters instead of browser scripts.
Receive the hosted .jpeg result without building a separate pipeline for temporary files, uploads, storage, and delivery.
URL screenshot API
POST the webpage URL, capture settings, and format from GoLang. HCTI handles the browser lifecycle and returns the generated .jpeg URL.
Send the URL to load, including webpages whose final state depends on browser-rendered JavaScript.
Set format to jpeg and use the hosted .jpeg URL returned by the API.
Set viewport dimensions, capture the full page, or crop the result to a CSS selector.
Choose color scheme, timezone, mobile behavior, timing, and other page-loading controls.
How it works
Submit a public URL with format set to jpeg and any viewport, selector, or browser settings.
The API runs the webpage, styles, fonts, images, and JavaScript in a managed browser environment.
Embed the hosted result, download the file, or save it in your own storage and application records.
Output formats
Keep the same URL and capture settings. Choose lossless detail, compact compatibility, modern web delivery, or a paginated document.
Looking to convert HTML & CSS to JPEG? Explore HTML to JPEG in GoLangCrisp text, sharp interface details, and transparent page backgrounds.
Explore PNGStrong visual quality with modern compression for web delivery.
Explore WebPPaginated webpage captures with page sizing, margins, backgrounds, and print styles.
Explore PDFExample code
Copy a complete GoLang request. Authentication, the webpage URL, viewport settings, output format, and response handling are shown together.
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"time"
)
func main() {
request := map[string]any{
"url": "https://example.com",
"format": "jpeg",
"viewport_height": 630,
"viewport_width": 1200,
}
body, err := json.Marshal(request)
if err != nil {
panic(err)
}
httpRequest, err := http.NewRequest(http.MethodPost, "https://hcti.io/v1/image", bytes.NewReader(body))
if err != nil {
panic(err)
}
httpRequest.SetBasicAuth(os.Getenv("HCTI_API_ID"), os.Getenv("HCTI_API_KEY"))
httpRequest.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(httpRequest)
if err != nil {
panic(err)
}
defer response.Body.Close()
responseBody, err := io.ReadAll(response.Body)
if err != nil {
panic(err)
}
if response.StatusCode >= http.StatusBadRequest {
panic(fmt.Sprintf("HCTI request failed (%d): %s", response.StatusCode, responseBody))
}
var result struct {
URL string `json:"url"`
}
if err := json.Unmarshal(responseBody, &result); err != nil {
panic(err)
}
fmt.Println(result.URL)
}
Ready to capture?
Send a public URL to the API and receive a hosted .jpeg image without running browser infrastructure.