freeapis

Dicebear Avatars

生成随机像素风头像

认证方式
No auth
HTTPS
Yes
CORS
No

简介

DiceBear 从种子字符串生成可爱、一致的头像——几十种风格(avataaars、bottts、identicon、像素风、lorelei……)输出 SVG 或 PNG。免密钥且免费,是占位头像、用户默认头像和趣味头像的首选。

⚠️ 破坏性变更(2026-08 实测)旧路径 avatars.dicebear.com/api/... 返回 HTTP 410 Gone——API 已迁移到 https://api.dicebear.com/7.x/...(实测可用)。请使用新主机和带版本路径。

快速开始

SVG 头像(新 API,实测可用):

curl "https://api.dicebear.com/7.x/avataaars/svg?seed=example"
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 280 280" ...></svg>

PNG 格式:

curl "https://api.dicebear.com/7.x/avataaars/png?seed=example"

不同风格:

curl "https://api.dicebear.com/7.x/bottts/svg?seed=robot"
curl "https://api.dicebear.com/7.x/identicon/svg?seed=alice"
curl "https://api.dicebear.com/7.x/pixel-art/svg?seed=mario"

认证方式

无需认证——免密钥。

速率限制与注意事项

  • 免费;这是一个简单的图片服务——支持热链(设计为 <img> 标签使用)。
  • seed 决定头像——同一种子同一头像(确定性)。
  • 风格:avataaarsbotttsidenticonpixel-artloreleiadventurerthumbs 等(见文档)。
  • 旧 URL(/api/{风格}/{seed}.svg)返回 410——请迁移到 /7.x/{风格}/svg?seed=

常见问题

DiceBear 免费吗? 是的——免费且免密钥。

为什么旧 URL 返回 410? API 迁移到了带版本的主机(api.dicebear.com/7.x/...)——旧路径已移除。

可以用于用户头像吗? 可以——确定性种子意味着同一用户总是得到同一头像。

测试数据 分类更多

APIAuthHTTPSCORS
AddressMock

Random US, Hong Kong and Cape Verde addresses with matched city, state and ZIP

No authYesYes
Bacon Ipsum

A Meatier Lorem Ipsum Generator

No authYesUnknown
DummyJSON

Fake REST API with products, users, posts, comments, todos and more

No authYesYes
English Random Words

Generate English Random Words with Pronunciation

No authYesNo
FakeJSON

Service to generate test and fake data

API KeyYesYes