Documentation

ScreenCraft Documentation

Welcome to ScreenCraft! Our API makes it easy to capture screenshots and generate PDFs from any URL or HTML content. Get started in minutes with our simple REST API.

Base URL

All API requests should be made to:

https://api.screencraft.dev/v2

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

HTTP Header
Authorization: Bearer sk_live_your_api_key_here

You can generate API keys in your dashboard. Keep your keys secure and never expose them in client-side code.

Request Format

The API accepts JSON-encoded request bodies. Set the Content-Type header to application/json for all requests.

Response Format

All responses are JSON-encoded and follow a consistent structure:

Success Response
{
  "success": true,
  "data": {
    "url": "https://cdn.screencraft.dev/abc123.png",
    "width": 1920,
    "height": 1080,
    "format": "png"
  }
}
Error Response
{
  "success": false,
  "error": {
    "code": "INVALID_URL",
    "message": "The provided URL is not accessible",
    "details": { "url": "https://example.com/404" }
  }
}

Rate Limits

Rate limits vary by plan. Check the X-RateLimit-* headers in responses:

Header Description
X-RateLimit-Limit Maximum requests per minute
X-RateLimit-Remaining Requests remaining in current window
X-RateLimit-Reset Unix timestamp when the limit resets

SDKs & Libraries

Official SDKs are available for popular languages:

Need Help?

If you have questions or need assistance: