Skip to content

Latest commit

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Discord & GitHub Avatar API

Free-to-use Discord and GitHub profile picture (PFP) API.

  • Vercel has finally paused my account, so please deploy your own pfp api url for your website since avatar-cyan.vercel.app wont work no more or just use the official discord or github api

Deploy with Vercel


Quick Start

Base URL:

https://avatar-cyan.vercel.app

Test it → GET /api


Discord Endpoints

EndpointMethodDescription
/api/:userIdGETUser Info (JSON) – avatar, badges, banner, accent color
/api/pfp/:userId/imageGETAvatar image (512px) – supports auto-format
/api/pfp/:userId/smallimageGET128px
/api/pfp/:userId/bigimageGET1024px
/api/pfp/:userId/superbigimageGET4096px
/api/pfp/:userId/:sizeGETCustom size (16–4096)
/api/user/:userId/rawGETFull Discord user data (avatar, banner, flags, badges, etc.)
/api/banner/:userIdGETBanner URL in JSON
/api/banner/:userId/imageGETBanner image – supports animated banners

Query Parameters (Optional)

ParamValuesDescription
size16, 32, 64, 128, 256, 512, 1024, 2048, 4096Override image size
formatpng, webp, gifOverride image format (auto-detects animated)

Example: Discord Avatar (1024px, WebP)

https://avatar-cyan.vercel.app/api/pfp/773952016036790272/image?size=1024&format=webp

Example Response: /api/773952016036790272

{
"profileUrl": "https://discord.com/users/773952016036790272",
"cached": true,
"id": "773952016036790272",
"username": "yellowgreg",
"display_name": "yellowgreg",
"avatarUrl": "https://cdn.discordapp.com/avatars/773952016036790272/6cba9ad9eb855f53ae0374c7450e6fa9.png?size=512",
"isAnimated": false,
"bannerUrl": null,
"bannerAnimated": false,
"discriminator": "0",
"accent_color": 921102,
"banner_color": "#0e0e0e",
"public_flags": 64,
"badges": [
"House Bravery"
],
"avatar_decoration": {
"asset": "a_f997880d666be69b7782bb377617b4fd",
"sku_id": "1462116613632426014",
"expires_at": null
}
}

Batch & Multi-Source Endpoints

EndpointMethodDescription
/api/batchGETFetch multiple users at once (max 50, auto-deduplicates)
/api/avatar/:identifierGETMulti-source avatar – Discord + GitHub fallback

Batch Endpoint Examples

Pipe separator (recommended):

https://avatar-cyan.vercel.app/api/batch?ids=773952016036790272|804955810820128798

Also supports comma or semicolon:

https://avatar-cyan.vercel.app/api/batch?ids=123,456,789
https://avatar-cyan.vercel.app/api/batch?ids=123;456;789

Batch Response Example

{
"total": 2,
"successful": 2,
"failed": 0,
"users": [
{
"id": "773952016036790272",
"success": true,
"username": "yellowgreg",
"display_name": "yellowgreg",
"avatarUrl": "https://cdn.discordapp.com/avatars/773952016036790272/6cba9ad9eb855f53ae0374c7450e6fa9.png?size=512",
"isAnimated": false,
"bannerUrl": null,
"bannerAnimated": false,
"discriminator": "0",
"accent_color": 921102,
"banner_color": "#0e0e0e",
"public_flags": 64,
"badges": [
"House Bravery"
],
"avatar_decoration": {
"asset": "a_f997880d666be69b7782bb377617b4fd",
"sku_id": "1462116613632426014",
"expires_at": null
}
},
{
"id": "804955810820128798",
"success": true,
"username": "wspboy12",
"display_name": "스타크",
"avatarUrl": "https://cdn.discordapp.com/avatars/804955810820128798/6b354ac7e07f4e988e38dee6f55d38ce.png?size=512",
"isAnimated": false,
"bannerUrl": null,
"bannerAnimated": false,
"discriminator": "0",
"accent_color": 0,
"banner_color": "#000000",
"public_flags": 128,
"badges": [
"House Brilliance"
],
"avatar_decoration": null
}
]
}

Multi-Source Endpoint

Auto-detect (GitHub username or Discord ID):

https://avatar-cyan.vercel.app/api/avatar/YellowGregs
https://avatar-cyan.vercel.app/api/avatar/773952016036790272

Force specific source:

/api/avatar/YellowGregs?source=github
/api/avatar/773952016036790272?source=discord

GitHub Endpoints

EndpointMethodDescription
/api/github/:usernameGETUser Profile (JSON) – name, bio, stats
/api/github/:username/pfpGETGitHub avatar image
/api/github/:username/reposGETList of public repositories
/api/github/:username/gistsGETList of public gists

Query Parameters

ParamValuesDescription
limit1-100Max repos to return (default: 30)
sortupdated, created, pushedSort order (default: updated)

Example: GitHub Profile

https://avatar-cyan.vercel.app/api/github/YellowGregs

Example Response

{
"id": 172260606,
"username": "YellowGregs",
"display_name": "YellowGreg",
"avatarUrl": "https://avatars.githubusercontent.com/u/172260606?v=4",
"profileUrl": "https://github.com/YellowGregs",
"bio": "Joined GitHub on March 10, 2022.",
"public_repos": 32,
"followers": 17,
"following": 18,
"location": "USA",
"company": null,
"blog": ""
}

Status Embeds

![API Status](https://avatar-cyan.vercel.app/api/status/embed?theme=dark&label=Avatar%20cyan)

API Status
Backend
Custom Size


Embed Customization

ParamValuesExample
themedark / lighttheme=light
sizesm / md / lgsize=lg
width / heightany pxwidth=500&height=160
roundedtrue / falserounded=false
bordertrue / falseborder=true
accent#rrggbbaccent=%2300ff88
labelany textlabel=My%20API

Status Endpoints

EndpointMethodDescription
/api/statusGETOverall API health and service status
/api/status/servicesGETDetailed per-service status and uptime

Example Response: /api/status

{
"status": "operational",
"uptime": 99,
"responseTime": 36,
"lastChecked": "2026-03-02T21:06:21.508Z",
"region": "Global",
"version": "1.1.0",
"services": {
"total": 4,
"operational": 4,
"degraded": 0,
"down": 0
},
"performance": {
"cache_hit_rate": 99,
"total_incidents_7d": 0,
"average_response_time_7d": 36
}
}

Full Endpoint Table

EndpointMethodDescription
/apiGETAPI documentation and endpoint list
/api/versionGETAPI version and changelog
Discord
/api/:userIdGETDiscord user info with badges and colors
/api/pfp/:userId/imageGETAvatar (512px) with auto-format
/api/pfp/:userId/smallimageGETAvatar (128px)
/api/pfp/:userId/bigimageGETAvatar (1024px)
/api/pfp/:userId/superbigimageGETAvatar (4096px)
/api/pfp/:userId/:sizeGETAvatar at custom size
/api/user/:userId/rawGETRaw Discord user data
/api/banner/:userIdGETBanner URL in JSON
/api/banner/:userId/imageGETBanner image
Batch & Multi-Source
/api/batchGETMultiple users (max 50, deduplicates)
/api/avatar/:identifierGETMulti-source (Discord + GitHub)
GitHub
/api/github/:usernameGETGitHub user profile
/api/github/:username/pfpGETGitHub avatar
/api/github/:username/reposGETPublic repositories
/api/github/:username/gistsGETPublic gists
Status
/api/statusGETOverall API health
/api/status/servicesGETDetailed service status

Documentation (ignore)

Releases

Packages

Used by

Contributors

Languages