Avatar Generator API
Free AI-powered cartoon avatar generation. No auth, no limits.
avatargen.icxbd.workers.devEndpoint
GET
Returns PNG image — responds in ~2s
GET https://avatargen.icxbd.workers.dev/generate
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
seed | integer | optional | Seed for reproducibility. Omit for random. |
style | integer 0–5 | optional | Avatar style index (see styles below). |
Available Styles
0
Cartoon Hoodie
Cartoon Hoodie
1
Anime Style
Anime Style
2
Chibi Cute
Chibi Cute
3
Modern Flat
Modern Flat
4
Pop Art
Pop Art
5
Sticker Style
Sticker Style
Response
| Header | Value |
|---|---|
Content-Type | image/png |
| Status | 200 OK |
| Size | ~100–300 KB PNG |
Code Examples
# Download avatar (random style)
curl -o avatar.png "https://avatargen.icxbd.workers.dev/generate"
# With specific seed and style
curl -o avatar.png "https://avatargen.icxbd.workers.dev/generate?seed=42&style=0"
// Fetch and display avatar
const response = await fetch('https://avatargen.icxbd.workers.dev/generate?style=1');
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const img = document.createElement('img');
img.src = url;
document.body.appendChild(img);
// Or download directly
const a = document.createElement('a');
a.href = url; a.download = 'avatar.png'; a.click();
<?php
// Fetch and save avatar
$url = 'https://avatargen.icxbd.workers.dev/generate?seed=99&style=2';
$image = file_get_contents($url);
file_put_contents('avatar.png', $image);
echo "Avatar saved!";
// Or output directly to browser
header('Content-Type: image/png');
echo file_get_contents(
'https://avatargen.icxbd.workers.dev/generate'
);
?>
import requests
# Download and save avatar
url = "https://avatargen.icxbd.workers.dev/generate"
params = {"seed": 42, "style": 3}
response = requests.get(url, params=params)
with open("avatar.png", "wb") as f:
f.write(response.content)
print("Avatar saved as avatar.png")