Capture screenshots in Scheme
Add screenshot and scrolling GIF capabilities to your Scheme applications with HTTP client libraries. Elegant, minimal, no headless browsers to manage.
Installation
- 1Use your Scheme's HTTP library (e.g., Guile's (web client))
- 2Get your API key from the dashboard
- 3Set the X-KEY header in your requests
Authentication
Include your API key in the X-KEY header with every request:
(use-modules (web client) (web uri))
(define-values (response body)
(http-get (string->uri url)
#:headers '((X-KEY . "your-api-key"))))Scheme Screenshot Example
Capture a screenshot or create a scrolling GIF animation with a simple GET request:
(use-modules (web client) (ice-9 binary-ports))
(define response
(http-get "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png"
#:headers '((X-KEY . "your-api-key"))))
(call-with-output-file "screenshot.png"
(lambda (port)
(put-bytevector port (cdr response)))
#:binary #t)(use-modules (web client) (ice-9 binary-ports))
(define response
(http-get "https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out"
#:headers '((X-KEY . "your-api-key"))))
(call-with-output-file "animation.gif"
(lambda (port)
(put-bytevector port (cdr response)))
#:binary #t)Response Format
On success, the API returns the image binary data directly in the response body.
| Status Code | 200 OK |
| Content-Type | image/png, image/jpeg, or image/gif |
| Body | Binary image data (bytevector) |
| Error Response | Error message with 4xx/5xx status |
Key Features
Zero Setup
Use your Scheme implementation's HTTP library. No browser installations required.
Production Ready
Built on Cloudflare Workers with global edge network. Handles concurrency and browser lifecycle automatically.
Scheme Integration
Works with Guile, Chez Scheme, Chicken, Racket (R6RS mode), or any Scheme with HTTP support.
Rich Features
Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.
Frequently Asked Questions
Which Scheme implementation should I use?
Any Scheme with HTTP client support works — Guile, Chez Scheme, Chicken, MIT Scheme, or Gambit.
Do I need to install browser dependencies?
No. Scrnpix runs browsers on our infrastructure. You only need an HTTP client library for your Scheme.
How do I handle errors in Scheme?
Check the response status code. Use your Scheme's exception handling (guard, with-exception-handler, etc.).
What Scheme standard is required?
R6RS or R7RS with HTTP library support. The API is a simple HTTP GET request.
Ready to capture screenshots in Scheme?
Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.
Start Free