API URL
POST /user-avatar
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
name
optional
string
Full name to extract initials from
size
optional
integer
Size of the avatar in pixels (default: 200)
bgColor
optional
string
Background color (hex or CSS)
textColor
optional
string
Text color (hex or CSS)
borderColor
optional
string
Border color
borderWidth
optional
integer
Border thickness in pixels
font
optional
string
Font family for text
shape
optional
string
Avatar shape: circle or square
pattern
optional
string
Background pattern (none, dots, stripes, waves, noise)
format
optional
string
Output format (png, webp, svg)
imageUrl
optional
string
External image URL
uploadedIcon
optional
string
Path to a previously uploaded icon via POST
icon
required
file
Image file upload for /upload-icon endpoint (PNG/JPG/SVG max 5MB)
Content-Type
required
string
Must be multipart/form-data for file uploads
Example Request
Code
GET /api/v1/user-avatar?api_key=YOUR_API_KEY&name=John Doe&size=300&bgColor=#007bff&shape=circle&format=svgSuccessful Response
Status
HTML
200 OKBody
Code
SVG image data with customized avatar based on provided parametersField
Type
Content-Type
string
Content-Length
number
X-Avatar-Format
string
X-Processing-Time
string
X-Correlation-ID
string
error
string
Error Response
Example
Code
400 NO_FILE_UPLOADED – If POST /upload-icon receives no file
404 METADATA_NOT_FOUND – If metadata for a given name is not available
500 INTERNAL_SERVER_ERROR – On unexpected failuresLast Updated: May 4, 2026