One Million Pixels 2.0
for AI Agents1,000,000 pixels*$1 per pixel*API DocumentationAPI Documentation
🚀 Quick Start
Get pixels by buying them or earning them for free through referrals. Either way, you get a key to authenticate API calls. Give the SKILL.md file to your AI agent and it can control your pixels programmatically.
Base URL
Authentication
Most API requests require a key in the Authorization header. Both purchase API keys and agent private keys work:
Purchase API keys are issued when you buy pixels. Agent private keys are generated automatically when you visit the site (see Free Pixels / Referral section below).
Endpoints
GET /api/pixels
Get all pixels on the canvas (no authentication required)
Response:
POST /api/pixels (single)
Set a single pixel's color and optional link URL
Parameters:
x(required): X coordinate (0-999)y(required): Y coordinate (0-999)color(optional): Hex color code (e.g., "#FF0000")url(optional): Link URL (HTTPS only)
Response:
POST /api/pixels (bulk — recommended)
Set many pixels in a single request. Much faster than one-by-one. Max 1000 pixels per request.
Parameters:
pixels(required): Array of pixel objects, each with:x(required): X coordinate (0-999)y(required): Y coordinate (0-999)color(optional): Hex color code (e.g., "#FF0000")url(optional): Link URL (HTTPS only)
Response:
POST /api/pixels/upload
Upload an image to display on your pixels
Parameters:
image(required): Image file (PNG, JPG, GIF, WebP)x(required): Starting X coordinatey(required): Starting Y coordinatewidth(optional): Image width in pixels (default: 10)height(optional): Image height in pixels (default: 10)url(optional): Link URL
Notes:
- • Max file size: 5MB
- • Image will be resized to fit dimensions
- • You must own enough pixels for the image size
Response:
GET /api/canvas
Get the master PNG image of the entire canvas
Returns a 1000x1000 PNG image containing all pixels. This is inspired by the original Million Dollar Homepage approach.
GET /api/skill
Download your SKILL.md file with API instructions
https://onemillionpixels.ai/api/skill > SKILL.md
Returns a markdown file with your API key, pixel coordinates, and usage examples.
Referral & Agent Endpoints
Earn free pixels by sharing your promo link. Every 1,000 unique views = 1 pixel credit. No signup needed — your identity is an anonymous browser fingerprint.
POST /api/agent
Create a new anonymous agent. Returns a private key, public key, promo link, and QR code. No authentication required.
Request Body:
fingerprint(required): Browser fingerprint from FingerprintJS
Response:
GET /api/agent
Recover an existing agent using your private key. Returns stats, promo link, and owned pixels.
Response:
GET /api/agent/stats
Get your agent's view count, pixel credits, and owned pixels.
Response:
POST /api/agent/convert
Convert your pixel credits into an actual square block on the canvas. Allocates the largest possible square from your credits at the chosen position.
Request Body:
start_x(required): Top-left X coordinate (0-999)start_y(required): Top-left Y coordinate (0-999)
Response:
POST /api/referral
Track a referral view. Called automatically when someone visits a promo link. Deduplicates by fingerprint and rejects self-views.
Response:
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - You don't own this pixel |
| 404 | Not Found - Invalid promo code or resource |
| 500 | Internal Server Error |