Cross-Platform UI

Capture screenshots in Flutter

Add screenshot and scrolling GIF capabilities to your Flutter applications with the http package. Single codebase for mobile, web, and desktop.

Installation

  1. 1Add http package: flutter pub add http
  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:

import 'package:http/http.dart' as http;

final response = await http.get(
  Uri.parse(url),
  headers: {'X-KEY': 'your-api-key'},
);
final bytes = response.bodyBytes;

Flutter Screenshot Example

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

Screenshot
import 'dart:io';
import 'package:http/http.dart' as http;

final response = await http.get(
  Uri.parse('https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png'),
  headers: {'X-KEY': 'your-api-key'},
);

// Display with Image.memory(response.bodyBytes)
// Or save to file system
Animation
import 'dart:io';
import 'package:http/http.dart' as http;

final response = await http.get(
  Uri.parse('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'},
);

// Display or save response.bodyBytes

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 (Uint8List)
Error ResponseError message with 4xx/5xx status

Key Features

Zero Setup

Just add the http package. No platform-specific setup or WebView required.

Production Ready

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

Flutter Integration

Display with Image.memory() widget. Works on iOS, Android, web, Windows, macOS, and Linux.

Rich Features

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

Frequently Asked Questions

Do I need platform-specific code?

No. The http package works across all Flutter platforms. Just use Image.memory(bytes) to display.

Does this work on Flutter Web?

Yes. Scrnpix works with Flutter on all platforms — iOS, Android, web, Windows, macOS, and Linux.

How do I display the screenshot in Flutter?

Use Image.memory(response.bodyBytes) to display the image directly from the response bytes.

What Flutter version is required?

Flutter 2.0+ with null safety. The API is a simple HTTP GET request.

Ready to capture screenshots in Flutter?

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

Start Free