RAD Development

Capture screenshots in Pascal/Delphi

Add screenshot and scrolling GIF capabilities to your Pascal and Delphi applications with Indy or Synapse. RAD development, no headless browsers to manage.

Installation

  1. 1Use Indy (included in Delphi) or install Synapse for Free Pascal
  2. 2Get your API key from the dashboard
  3. 3Set the X-KEY header in your requests

Authentication

Include your API key in the X-KEY header with every request:

uses IdHTTP;

var
  HTTP: TIdHTTP;
begin
  HTTP := TIdHTTP.Create(nil);
  HTTP.Request.CustomHeaders.Add('X-KEY: your-api-key');
  // Make request...
end;

Pascal/Delphi Screenshot Example

Capture a screenshot or create a scrolling GIF animation with a simple GET request:

Screenshot
uses IdHTTP, Classes;

var
  HTTP: TIdHTTP;
  Stream: TMemoryStream;
begin
  HTTP := TIdHTTP.Create(nil);
  Stream := TMemoryStream.Create;
  try
    HTTP.Request.CustomHeaders.Add('X-KEY: your-api-key');
    HTTP.Get('https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png', Stream);
    Stream.SaveToFile('screenshot.png');
  finally
    Stream.Free;
    HTTP.Free;
  end;
end;
Animation
uses IdHTTP, Classes;

var
  HTTP: TIdHTTP;
  Stream: TMemoryStream;
begin
  HTTP := TIdHTTP.Create(nil);
  Stream := TMemoryStream.Create;
  try
    HTTP.Request.CustomHeaders.Add('X-KEY: your-api-key');
    HTTP.Get('https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out', Stream);
    Stream.SaveToFile('animation.gif');
  finally
    Stream.Free;
    HTTP.Free;
  end;
end;

Response Format

On success, the API returns the image binary data directly in the response body.

Status Code200 OK
Content-Typeimage/png, image/jpeg, or image/gif
BodyBinary image data (TMemoryStream)
Error ResponseError message with 4xx/5xx status

Key Features

Zero Setup

Use Indy (bundled with Delphi) or Synapse. No browser installations required.

Production Ready

Built on Cloudflare Workers with global edge network. Handles concurrency and browser lifecycle automatically.

Pascal Integration

Works with Delphi, Lazarus, Free Pascal, or any Object Pascal environment.

Rich Features

Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.

Frequently Asked Questions

Do I need to install any browser dependencies for Pascal?

No. Scrnpix runs browsers on our infrastructure. You only need Indy or Synapse for HTTP calls.

Can I use this with Lazarus or Free Pascal?

Yes. Scrnpix works with Delphi, Lazarus, Free Pascal, or any Object Pascal environment with HTTP support.

How do I handle errors in Delphi?

Use try-except blocks for exception handling. Check the HTTP response code for status validation.

What Delphi version is required?

Delphi 7+ with Indy or any Pascal with Synapse. The API is a simple HTTP GET request.

Ready to capture screenshots in Pascal/Delphi?

Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.

Start Free