401/screenshot, /animate

Unauthorized

How to fix the Scrnpix API 401 Unauthorized error when the X-KEY header is missing from your screenshot or animate request.

When Does This Happen?

This error occurs when you send a request to the /screenshot or /animate endpoint without including the X-KEY header. All capture requests require authentication via an API key passed in this header.

Reproduce This Error

curl "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com"
Unauthorized

How to Fix

  1. 1Add the X-KEY header with your API key to the request
  2. 2Get your API key from the Scrnpix dashboard at scrnpix.com/dashboard
  3. 3Ensure the header name is exactly X-KEY (case-sensitive)

Correct Request

curl -H "X-KEY: your-api-key" \
  "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com" \
  --output screenshot.png
200 OK — returns the screenshot as a PNG image

Related Errors

Frequently Asked Questions

Where do I find my API key?

Log in to the Scrnpix dashboard at scrnpix.com/dashboard and navigate to the API Keys section. You can create new keys and view existing key prefixes there.

Can I use Bearer token authentication instead?

No. The /screenshot and /animate endpoints require the API key in the X-KEY header specifically. Bearer tokens are not supported for these endpoints.

Still Having Issues?

Check your API key and subscription status in the dashboard, or explore our language guides for integration examples.

Go to Dashboard