Generate user avatars with customizable initials, colors, and styles.
Default
/api/avatar
Blue Background
/api/avatar?background=0D8ABC&color=fff
Random Background
/api/avatar?background=random
Rounded Large
/api/avatar?size=128&rounded=true
Single Initial Bold
/api/avatar?name=Elon+Musk&length=1&bold=true
Lowercase
/api/avatar?name=different+Case&uppercase=false
Custom Style
/api/avatar?name=Jane+Smith&size=100&fontSize=0.8&bold=true&rounded=true&background=FF6B6B
PNG Format
/api/avatar?name=Alice+Wonder&format=png
| Parameter | Description | Default | Example |
|---|---|---|---|
| name | Name to generate initials | John Doe | ?name=Jane+Smith |
| size | Image size (16-512) | 64 | ?size=128 |
| fontSize | Font size percentage (0.1-1) | 0.5 | ?fontSize=0.33 |
| length | Initials length | 2 | ?length=1 |
| rounded | Circle shape | false | ?rounded=true |
| bold | Bold font | false | ?bold=true |
| background | Hex color without # or 'random' | ddd | ?background=0D8ABC |
| color | Font hex color without # | 222 | ?color=fff |
| uppercase | Uppercase initials | true | ?uppercase=false |
| format | Image format (svg or png) | svg | ?format=png |