Complete REST API for accessing all 10,000 CryptoPunks, individual traits, and generating custom punk combinations with pixel-perfect rendering
Base URL: https://punks.art/api
💡 This API powers PunkMaker - Want to generate custom punks with a visual interface?Try the interactive app →
🙏 Building something cool? If you use this API in your app or project, a credit to punks.art
would be awesome (but totally optional)! No strings attached - just spreading the punk love. ✨
Get all available traits with basic info (id, slug, category)
category
- Filter by trait category (Background, Eyewear, etc.)gender
- Filter by gender (Male, Female, Unisex)search
- Search traits by name or categorylimit
- Limit number of resultsoffset
- Offset for paginationextended
- Include extended traits (unisex versions of originally gender-specific traits like hoodie)groupByCategory
- Group results by categorymohawkdark
regularshades
normalbeard
cigarette
earring
cowboyhat
tiara
wildhair
Get data for a single trait or combine multiple traits using dash-separated slugs/IDs
format
- Output format: json, pixels, svg, png, ascii, ansi (default: json)size
- Square size in pixels for PNG format (default: 24 or 32 for naked mode)background
- Solid color (red, ff0000), gradient (red-blue), or image URL (https://example.com/image.jpg)ribbon
- Add green corner ribbon overlay (PNG only, min size 48px): ribbon=yesalien + shades + hair
v1 (purple) bg
zombie + 3D glasses
v2 (classic) bg
female + tiara + earring
royalblue-lavender bg
male + cowboy + beard
orange-purple bg
Get list of all CryptoPunks with their token IDs and traits
limit
- Limit number of resultsoffset
- Offset for paginationincludeTraits=false
- Exclude trait data for lighter response#1
#100
#500
#1000
#2113
#5000
#7804
#9999
Get specific CryptoPunk by token ID with multiple output formats
format
- Output format: json, pixels, svg, png, ascii, ansi (default: json)size
- Square size in pixels for PNG format (default: 24 or 32 for naked mode)background
- Solid color (red, ff0000), gradient (red-blue), or image URL (https://example.com/image.jpg)ribbon
- Add green corner ribbon overlay (PNG only, min size 48px): ribbon=yesAll endpoints return JSON with a consistent structure:
Use the background
parameter for solid colors, vertical gradients (multiple colors separated by dashes), or image URLs in PNG and SVG outputs. Images scale to cover the entire square while maintaining aspect ratio, with excess cropped out, and use pixelated rendering for crisp pixel art.
background=red
- Solid color backgroundbackground=red-blue
- Simple two-color gradientbackground=forsale
- For sale brown presetbackground=bids
- Bids purple presetbackground=wrapped1-wrapped2
- Wrapped green gradientbackground=v1-forsale-bids
- Three punk presets gradientbackground=ff0000-00ff00-0000ff
- RGB gradient with hex codesbackground=https://example.com/bg.jpg
- Image background with cover scaling and pixelated renderingHere are some examples of punks generated with different backgrounds and combinations, showcasing the punk-specific preset colors:
Punk #2113
Rainbow gradient
Punk #7804
forsale brown
Punk #3100
bids purple
Punk #8857
wrapped gradient
Custom combo
v1-forsale gradient
Custom combo
bids-wrapped1 gradient
/api/punks/2113?format=png&background=5078C0-B081BC-E45197-E48384-FF8442-FFC54F
/api/punks/7804?format=png&background=forsale
/api/punks/3100?format=png&background=bids
/api/punks/8857?format=png&background=wrapped1-wrapped2
/api/traits/alien-regularshades-wildhair?format=png&background=v1-forsale
/api/traits/male3-cowboyhat-normalbeard?format=png&background=bids-wrapped1
Add a green corner ribbon overlay to PNG images using the ribbon
parameter. This feature was originally created for "wrapped" punks as part of the CryptoPunks ecosystem lore, where wrapped punks displayed with a distinctive green ribbon indicator.
Simply add ribbon=yes
to any PNG request to enable the green ribbon overlay. Requires PNG format and minimum 48px size.
Punk #2113
with ribbon
Alien + Shades
with ribbon
Punk #7804
with ribbon
Zombie + 3D
with ribbon
Generate text-based pixel art representations of CryptoPunks using format=ascii
(monochrome) or format=ansi
(colored with ANSI escape codes).
██
for black pixels (outlines)░░
for darkest non-black color▒▒
▓▓
for other colorsAll available colors for the background
parameter, organized by category.
Custom colors designed specifically for CryptoPunks theming:
punk
#638696
Classic punk blue
v1
#A89CFF
Purple preset
v2
#638696
Classic (same as punk)
forsale
#95554F
For sale brown
bids
#8E6FB6
Bids purple
wrapped1
#C8DFCA
Wrapped light green
wrapped2
#67A670
Wrapped dark green
All standard CSS color names are supported. Here are some popular examples:
red
blue
green
yellow
purple
orange
pink
cyan
magenta
lime
gold
silver
crimson
coral
indigo
violet
teal
navy
maroon
olive
Complete list includes: All 147 CSS named colors including variations like lightblue, darkblue, mediumblue; lightgreen, darkgreen, mediumseagreen; purple, mediumpurple, rebeccapurple; and many more. See the W3Schools CSS Colors Reference for the complete list with visual examples.
Use any 6-digit or 3-digit hex color code (with or without #):
ff0000
or #ff0000
→ Red00ff00
or #00ff00
→ Green0000ff
or #0000ff
→ Blue638696
or #638696
→ Punk Bluef0f
or #f0f
→ Magenta (3-digit)background=punk
→ Classic punk bluebackground=v1
→ Purple presetbackground=forsale
→ For sale brownbackground=crimson
→ CSS crimson redbackground=A89CFF
→ Custom hex purplebackground=punk-white
→ Gradient from punk blue to whitebackground=v1-forsale-bids
→ Three-color gradientAdd anatomically correct bodies to your punks using the naked
parameter. Since CryptoPunks are normally just heads and necks, this feature expands the canvas from 24x24 to 32x32 pixels and generates a full naked body beneath the punk's head.
size
parameter still works for larger rendersnaked=yes
(or true
, 1
) - Add a naked body to the punk (normally just head/neck)dingdong=on
(or yes
, true
, 1
) - Add anatomical details, or tripod
for variantsocks=on
(or yes
, true
, 1
) - Add gender-appropriate socks (requires naked=yes)Punk #2113
naked mode
Punk #507
with dingdong
Punk #2113
tripod variant
Punk #507
with socks
Female + Tiara
with socks
Punk #2113
tripod + socks
Extended traits are unisex versions of traits that were originally gender-specific in the original CryptoPunks collection. For example, the "hoodie" trait was only available for male punks, but i have created unisex versions to enable more creative combinations.
Note: Extended traits are excluded by default from /api/traits
to maintain compatibility with the original CryptoPunks trait set. Use extended=true
to include them.
All endpoints support CORS for browser usage
Generate endpoint limited to 50 punks per request
Responses are cached for optimal performance
Pixel data includes x, y coordinates and hex colors
🚀 Using this API in your project?
Consider giving punks.art
a shoutout! It helps others discover this free resource. No obligations though - build amazing things! 🎨
Made with ❤️ by gwendall