Free placeholder avatar API
Realistic placeholder faces for mockups, demos, seed data and default avatars. 59 AI-generated people who don't exist, any size from 16 to 1024px, same seed = same face. No key, CORS on, cached at the edge.
Quick start
<img src="https://narkis.ai/api/avatar?seed=alice&size=128" width="64" height="64" alt="Alice">Every URL form
https://narkis.ai/api/avatar/128/alice.jpg <- no query string, cache-friendly
https://narkis.ai/api/avatar/alice.webp?size=256
https://narkis.ai/api/avatar?img=7&size=200 <- face #7 of 59
https://narkis.ai/api/avatar?size=200 <- random face (not cached)| seed | Any string: user id, username, email hash. Same seed, same face. Alias: u. |
|---|---|
| size | 16 to 1024, square, default 200. Alias: s. |
| img | 1 to 59: pick a specific face. Overrides seed. |
| format | jpg (default), webp or png. Or use the file extension in the path. |
Snippets
export function Avatar({ id, size = 48 }: { id: string; size?: number }) {
return (
<img
src={`https://narkis.ai/api/avatar/${size * 2}/${encodeURIComponent(id)}.jpg`}
width={size}
height={size}
alt=""
style={{ borderRadius: "9999px" }}
/>
);
}// Real Gravatar if the user has one, a generated face if not
const hash = md5(email.trim().toLowerCase());
const fallback = encodeURIComponent(`https://narkis.ai/api/avatar/200/${hash}.jpg`);
const src = `https://www.gravatar.com/avatar/${hash}?s=200&d=${fallback}`;.avatar {
background: url("https://narkis.ai/api/avatar/96/team-lead.jpg") center / cover;
border-radius: 50%;
width: 48px;
height: 48px;
}import requests
png = requests.get("https://narkis.ai/api/avatar/512/user-42.png", timeout=10).content
open("user-42.png", "wb").write(png)Attribution appreciated
Free to use, no credit required. If it saved you time, a link back keeps it free:
<a href="https://narkis.ai/developers/avatars">Placeholder avatars by Narkis.ai</a>Where the faces come from
Narkis.ai turns selfies into professional photos. For this API we generated 59 portraits of fictional people on our own GPU (Z-Image Turbo), across ages, genders and ethnicities, and checked every one by eye. No customer photos are in the pool. Want photos of the real you instead? Make AI headshots from your selfies.
FAQ
›Are these real people?
No. Every face was generated on our own GPU with a text-to-image model from prompts describing fictional people. They are not photos of customers, models or anyone else, so you can use them in mockups, demos, tests and seed data without model releases.
›Do I need an API key or account?
No. Put the URL in an img tag and it works. There is no sign-up, no key and no rate-limit dashboard.
›Will the same seed always return the same face?
Yes. The seed is hashed into one of 59 faces, so a user id or email hash always maps to the same face, in every size and format. Leave the seed out for a random face (not cached).
›Can I use it in production?
Yes, for placeholders and default avatars. Seeded images are served with a one-year immutable cache header and cached at the CDN edge. For anything mission-critical, download the faces you use and self-host them.
›Do I have to credit Narkis?
No. Attribution is appreciated, not required: a link to narkis.ai/developers/avatars in your README or footer helps us keep it free.
›How is this different from pravatar or i.pravatar.cc?
Same idea: a URL that returns a face. These faces are AI-generated people who don't exist, they are seedable by any string, and there are path-only URLs that work as a Gravatar default image.
More for developers
- Profile photo specs: sizes and formats for 28 platforms, as JSON and an MIT package.