API Documentation

Avatar Generator API Reference

Endpoint

GET https://classyprofile.com/api/avatar

Returns an SVG image (image/svg+xml)

Parameters

email
Required
Email address for unique hash generation
name
Optional
Display name for initials (default: from email)
size
Optional
20-140px (default: 80)
v
Optional
1-20 (default: 1) - See available styles below

Examples

Basic usage:

https://classyprofile.com/api/avatar?email=user@example.com

With name and cyberpunk style:

https://classyprofile.com/api/avatar?email=user@example.com&name=John+Doe&v=2&size=100

With gradient mesh style:

https://classyprofile.com/api/avatar?email=user@example.com&v=5&size=120

HTML implementation:

<img src="https://classyprofile.com/api/avatar?email=user@example.com"
     alt="User Avatar" width="80" height="80" />

React implementation:

function UserAvatar({ email, name, style = "1" }) {
  const params = new URLSearchParams({
    email,
    ...(name && { name }),
    v: style, // 1-8 for different styles
    size: "100"
  });

  return (
    <img
      src={`https://classyprofile.com/api/avatar?${params}`}
      alt="User Avatar"
      width={100}
      height={100}
    />
  );
}

Easy Integration

Quick examples for popular frameworks and tools:

HTML
<img src="https://classyprofile.com/api/avatar?email=user@example.com&v=2" alt="Avatar" />

Response Codes

200
Success - Returns SVG image
400
Bad Request - Invalid parameters

Available Styles

v1
Classic Geometric

Simple geometric shapes with vibrant colors

Classic Geometric
v2
Cyberpunk Pixel

16x16 pixel art with neon glow effects

Cyberpunk Pixel
v3
Minimalist Line Art

Continuous line drawings inspired by Picasso

Minimalist Line Art
v4
Retro 8-bit Sprites

Classic video game character style

Retro 8-bit Sprites
v5
Gradient Mesh

Modern gradients with glass-morphism effects

Gradient Mesh
v6
ASCII Art Portraits

Text-based avatars using ASCII characters

ASCII Art Portraits
v7
Isometric Voxel

3D-looking cubic avatars like Minecraft

Isometric Voxel
v8
Abstract Blob Shapes

Organic fluid shapes with smooth curves

Abstract Blob Shapes
v9
Watercolor Splash

Soft watercolor paint effects with organic blending

Watercolor Splash
v10
Neon Wireframe

3D wireframe heads with glowing edges

Neon Wireframe
v11
Mosaic Tiles

Byzantine/Roman mosaic style with small tiles

Mosaic Tiles
v12
Origami Paper

Folded paper art style with visible creases

Origami Paper
v13
Halftone Dots

Comic book/newspaper print style

Halftone Dots
v14
Stained Glass

Cathedral window inspired with lead lines

Stained Glass
v15
Glitch Art

Digital corruption aesthetic with RGB shifts

Glitch Art
v16
Constellation Map

Connected star patterns forming faces

Constellation Map
v17
Paper Cut Shadow

Layered paper cutout style with shadows

Paper Cut Shadow
v18
Liquid Metal

Mercury/chrome flowing shapes

Liquid Metal
v19
Emoji Mosaic

Composed entirely of emoji characters

Emoji Mosaic
v20
Circuit Board

PCB traces forming facial features

Circuit Board