Initials Avatar & Identicon Generator Online
Default profile pictures from a name: initials avatars that read Vietnamese names correctly (Nguyễn Văn An → NA) or identicons, with a stable colour per user.
Result
Press “Run” to see the result.
The avatar API draws a default profile picture for users who have not uploaded one. style=initials (default) writes the initials on a coloured circle, square or rounded square. Vietnamese names put the given name last, so the initials are the first letter of the family name and of the given name (Nguyễn Văn An → NA, Đặng Thị Ánh → ĐÁ, with accents preserved); length=1 keeps only the given name and initials= sets them yourself.
style=identicon draws a symmetric 5×5 pattern, handy for anonymous accounts, API keys or wallet addresses. The colour comes from a hash of the name, so the same user always gets the same avatar on every page, and text switches to dark on light backgrounds for contrast. background and color override the colours.
Initials avatars are SVG (crisp at any size, usable directly in <img src>); identicons are also available as PNG. Use the URL form /v1/avatar/Nguyễn Văn An.svg; responses are cacheable for a week.
Use this in your code
curl "https://apibox.io.vn/v1/avatar?name=Nguyễn Văn An&size=128" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o outputconst res = await fetch('https://apibox.io.vn/v1/avatar?name=Nguyễn Văn An&size=128', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const blob = await res.blob();import requests
res = requests.get(
"https://apibox.io.vn/v1/avatar?name=Nguyễn Văn An&size=128",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
open("output", "wb").write(res.content)<?php
$ch = curl_init('https://apibox.io.vn/v1/avatar?name=Nguyễn Văn An&size=128');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
file_put_contents('output', $response);API documentation → Get a free API key
FAQ
Why “NA” for Nguyễn Văn An?
Vietnamese names are family – middle – given name. Two letters use the family and given names; length=1 shows only the given name (A).
Can I get PNG?
Identicons yes (format=png). Initials are SVG only, because PNG text would need a font renderer; SVG works in all browsers and in <img> tags.
Will the colour change?
No. It is derived from the name (case-insensitive), so it is stable across requests.