API Documentation
Avatar Generator API Reference
Endpoint
GET https://classyprofile.com/api/avatar
Returns an SVG image (image/svg+xml)
Parameters
emailRequiredEmail address for unique hash generation
nameOptionalDisplay name for initials (default: from email)
sizeOptional20-140px (default: 80)
vOptional1-20 (default: 1) - See available styles below
Examples
Basic usage:
https://classyprofile.com/api/avatar?email=user@example.comWith name and cyberpunk style:
https://classyprofile.com/api/avatar?email=user@example.com&name=John+Doe&v=2&size=100With gradient mesh style:
https://classyprofile.com/api/avatar?email=user@example.com&v=5&size=120HTML 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-20 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:
<img src="https://classyprofile.com/api/avatar?email=user@example.com&v=2" alt="Avatar" />
function Avatar({ email, version = 1 }) {
return (
<img
src={`https://classyprofile.com/api/avatar?email=${encodeURIComponent(email)}&v=${version}`}
alt="Avatar"
className="rounded-full"
/>
);
}
<template>
<img
:src="`https://classyprofile.com/api/avatar?email=${encodeURIComponent(email)}&v=${version}`"
alt="Avatar"
class="rounded-full"
/>
</template>
curl "https://classyprofile.com/api/avatar?email=user@example.com&v=2&size=120" > avatar.svg
Response Codes
Available Styles
Simple geometric shapes with vibrant colors
16x16 pixel art with neon glow effects
Continuous line drawings inspired by Picasso
Classic video game character style
Modern gradients with glass-morphism effects
Text-based avatars using ASCII characters
3D-looking cubic avatars like Minecraft
Organic fluid shapes with smooth curves
Soft watercolor paint effects with organic blending
3D wireframe heads with glowing edges
Byzantine/Roman mosaic style with small tiles
Folded paper art style with visible creases
Comic book/newspaper print style
Cathedral window inspired with lead lines
Digital corruption aesthetic with RGB shifts
Connected star patterns forming faces
Layered paper cutout style with shadows
Mercury/chrome flowing shapes
Composed entirely of emoji characters
PCB traces forming facial features