← Þróunarverkfæri

Mynda persónumynd

GET /avatars/generate

Myndaðu unique avatar myndaslóðum from a seed string (like a username or email). Skilar URLs from three different services: DiceBear (17 art styles, SVG/PNG), UI Avatars (initials-based), and RoboHash (robots/monsters). The same seed always produces sömu avatar, making it fullkomið fyrir user profile defaults.

Breytur

seed nauðsynlegt

Seed string (username, email, any text)

style valfrjálst sjálfgefið: avataaars

DiceBear style name

size valfrjálst sjálfgefið: 200

Image size in pixels

Dæmi um fyrirspurnir

Grunnnotkun
curl "https://nordapi.ee/api/v1/avatars/generate?seed=john_doe"
Avatar for a username
curl "https://nordapi.ee/api/v1/avatars/generate?seed=john_doe"
Pixel art style, large
curl "https://nordapi.ee/api/v1/avatars/generate?seed=jane&style=pixel-art&size=400"
Robot avatar from email
curl "https://nordapi.ee/api/v1/avatars/generate?seed=user@example.com&style=bottts"

Lifandi svar

{
  "data": {
    "dicebear": "https://api.dicebear.com/9.x/avataaars/svg?seed=john_doe&size=200",
    "dicebear_png": "https://api.dicebear.com/9.x/avataaars/png?seed=john_doe&size=200",
    "robohash": "https://robohash.org/john_doe?size=200x200",
    "robohash_monster": "https://robohash.org/john_doe?set=set2&size=200x200",
    "robohash_robot_head": "https://robohash.org/john_doe?set=set3&size=200x200",
    "seed": "john_doe",
    "size": 200,
    "style": "avataaars",
    "ui_avatar": "https://ui-avatars.com/api/?name=john_doe&size=200&background=random&color=fff"
  },
  "success": true
}