Asset Generation API

Generate highly customizable placeholders, layouts, and code-based images directly via URL parameters. Built exclusively for modern developers.

imgPX Live Developer Demo

API Reference

GET /api/?dimensions={width}x{height}
ENDPOINT
Parameter Type Default Description
dimensions (Req) string - Image bounds. Format: 800x600 or 800 (square).
format string png Export format: png, jpeg, or webp.
bgcolor string white Background color. Use transparent for alpha layers. Encode hex as %23000.
gradient string - Comma-separated colors (red,blue). Overrides bgcolor.
direction string horizontal Gradient direction: horizontal, vertical, radial.
text string dimensions Custom typography string. (URL encode spaces as %20).
textcolor string rgba(0,0,0,0.5) Foreground text color code.
pos string center Alignment: center, top, bottom, left, right, topleft, bottomright.
font string sans-serif Typeface family (e.g., monospace, Arial, sans-serif).
fontsize number Auto Absolute font size (px). Defaults to responsive scaling.
opacity number 1 Background opacity (0.0 to 1.0). Requires format=png or webp.

Examples & Capabilities

Transparent Demo

Alpha Channel Exports

Output true PNGs with completely empty backgrounds. Great for overlays.

?dimensions=800x600&bgcolor=transparent&font=monospace View Render
Custom Font Demo

Bug-Free Font Rendering

Counter rendering bugs (filled A, P, R letters) are fully resolved using fallback matrices.

?dimensions=800x600&bgcolor=%23000&text=API_BUG_FIXED View Render
Positioning Demo

Dynamic Positioning

Smart padding snaps text cleanly to any corner or edge, safely.

?dimensions=800x600&bgcolor=%23111&pos=bottomleft View Render
Radial Gradient Demo

Radial Backgrounds

Generate smooth circular spotlight color transitions for hero components.

?dimensions=800x600&gradient=%23222,%23000&direction=radial View Render
Horizontal Gradient Demo

Linear Gradients

High quality multi-color horizontal and vertical canvas rendering.

?dimensions=800x600&gradient=%236366f1,%23a855f7 View Render
Opacity Demo

Opacity Control

Render semi-transparent asset layers dynamically over web layouts.

?dimensions=800x600&bgcolor=%23fff&opacity=0.15 View Render