Quickstart
Take your first screenshot in under two minutes.
1. Get an API key
Sign up at api.nightglass.xyz/dashboard and grab your API key from the dashboard. You get 50 free screenshots to start.
2. Take a screenshot
curlcurl -X POST https://api.nightglass.xyz/api/v1/screenshot \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://example.com"}' \
--output screenshot.png
That's it. The response is a PNG image. Save it, display it, pipe it — it's just bytes.
3. Try mockup mode
Want the screenshot wrapped in a browser frame? Add "style": "mockup":
curl -X POST https://api.nightglass.xyz/api/v1/screenshot \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://example.com", "style": "mockup"}' \
--output mockup.png
For AI agents: You don't need an API key at all. Just call the endpoint without an auth header — you'll get a 402 response with x402 payment details. Pay with USDC on Base, and you get your screenshot. See agent payments.
What next?
- Full endpoint reference — all parameters, formats, and options
- Authentication deep dive — API keys vs x402
- Code examples — Python, Node.js, Go, and more