Documentation

One URL. That's it.

No sign-up, no key. Every parameter is optional and they can be combined.

At a glance

What is AvatarMelayu?

AvatarMelayu is a free placeholder avatar service with AI-generated Malay and Malaysian faces. Developers and designers paste one URL, such as https://avatarmelayu.com/i/150?img=3, into an img tag to get a sample profile picture, with no sign-up and no API key.

Key facts
Price Free, no sign-up and no API key
Image source AI-generated; no real people
Image licence CC0 (public domain), subject to the Terms
Base URL https://avatarmelayu.com/i/{saiz}
Size 16 to 1000 pixels, square (default 150)
Format JPG, WebP, PNG; transparent circle with ?shape=circle
Parameters img, u, g, cat, fmt, shape
Categories bertudung, bersongkok, profesional, pelajar, kanak-kanak, warga-emas, baju-melayu
Number of avatars 146
Rate limit 120 requests per minute per IP
JSON API https://avatarmelayu.com/api/avatars
Updated 30 October 2026
Try it now

Build your avatar URL

Pick the options, copy the URL and paste it into an <img> tag. The preview updates instantly.

Pick
Avatar preview
URL https://avatarmelayu.com/i/150
HTML <img src="https://avatarmelayu.com/i/150" width="150" height="150" alt="">

Basics

A random avatar, 150px (the default size):

https://avatarmelayu.com/i

Set the size in pixels (16 to 1000, always square):

https://avatarmelayu.com/i/300

Parameters

ParametersValuesEffect
img1, 2, …A specific avatar by its public ID (see the gallery).
uany textThe same text always gives the same avatar.
glelaki, perempuan, gabunganFilter by gender.
catbertudung, bersongkok, profesional, pelajar, kanak-kanak, warga-emas, baju-melayu Filter by category.
fmtjpg, webp, pngImage format. Default: WebP for browsers that support it, JPG otherwise.
shapecircleA round avatar with a transparent background (PNG or WebP).

Combined example:

https://avatarmelayu.com/i/200?g=perempuan&cat=tudung&fmt=webp&shape=circle

If no avatar matches the filters, a random one is returned so your design never breaks.

Consistent avatars

For user lists in a mockup, use the email or user ID as u. Everyone gets their own face, and it stays the same on every page load.

https://avatarmelayu.com/i/64?u=aina@contoh.my
https://avatarmelayu.com/i/64?u=user-42

Initials avatars

Need an avatar without a photo? Generate an SVG initials avatar from a name:

https://avatarmelayu.com/i/initials/Ali%20Bakar?size=150&bg=2563eb&color=ffffff&shape=circle

AB

Code examples

HTML

<img src="https://avatarmelayu.com/i/150?img=3" width="150" height="150" alt="Avatar">

Laravel Blade

<img src="https://avatarmelayu.com/i/64?u={{ urlencode($user->email) }}" alt="{{ $user->name }}">

React

const Avatar = ({ user }) => (
  <img src={`https://avatarmelayu.com/i/64?u=${encodeURIComponent(user.email)}`} alt={user.name} />
);

Vue

<img :src="`https://avatarmelayu.com/i/64?u=${user.id}`" :alt="user.name" />

CSS

.hero { background-image: url("https://avatarmelayu.com/i/600?img=4"); }

JSON API

A paginated list of published avatars. Supports g, cat and per_page (up to 100).

GET https://avatarmelayu.com/api/avatars?g=lelaki&per_page=10
GET https://avatarmelayu.com/api/avatars/3
{
  "data": [
    { "id": 3, "name": "…", "gender": "lelaki", "category": "songkok",
      "url": "https://avatarmelayu.com/i/300?img=3", "license": "CC0-1.0" }
  ],
  "meta": { "current_page": 1, "last_page": 3, "per_page": 10, "total": 26 }
}

Limits & caching

  • A rate limit applies per IP. Go over it and you get HTTP 429 for a moment.
  • URLs with img or u are cached for a day and revalidated with an ETag, so an updated picture shows within a day. Random URLs are not cached, so each img tag gets a different face. ID numbers are never reused.
  • Partners can ask for an API key with a higher limit; send it as the X-Api-Key header or ?key=.

License & ethics

Every avatar is AI-generated and does not depict a real person. Avatars are licensed CC0 for use as placeholders in mockups, prototypes and demos. Do not use them to impersonate anyone or in a misleading context. If an avatar resembles a real person, it can be reported for removal.

Read the full terms