RedditAPIRedditAPIs
Profile

Upload a Reddit Profile Avatar or Banner Image

Upload a new avatar (profile picture) or banner to a Reddit account via URL, base64, or local path. PNG/JPEG auto-detected, no browser automation needed.

POST/api/reddit/profile/avatar$0.012 / call

Upload a new avatar (profile picture) or banner for the logged-in account. Provide the image via URL, base64, or a server-local path — PNG and JPEG are accepted (auto-detected from the bytes).

Request Body

Exactly one of image_url, image_base64, or image_path must be provided.

FieldTypeRequiredDescription
image_urlstringone ofPublicly-fetchable image URL — the server downloads it
image_base64stringone ofBase64-encoded image (with or without data:image/...;base64, prefix)
image_pathstringone ofServer-local path (rarely useful)
kindstringnoavatar (default) or banner
mimetypestringnoHint (PNG / JPG) — auto-detected from bytes if omitted
filenamestringnoFilename to record (default avatar.png)
reddit_sessionstringyesSession cookie from /api/reddit/login
csrf_tokenstringyesAnti-CSRF cookie
loidstringnoAccount loid cookie (recommended)
proxyobject | stringnoSticky IP for this account. { server, username?, password? } or "http://user:pass@host:port"
max_attemptsnumbernoRetry budget (default 3)

Example

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/me.png",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "csrf_token": "689ea9..."
  }' \
  "https://api.redditapis.com/api/reddit/profile/avatar"
# Upload a banner instead of an avatar
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "kind": "banner",
    "filename": "banner.png",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "csrf_token": "689ea9..."
  }' \
  "https://api.redditapis.com/api/reddit/profile/avatar"
const response = await fetch("https://api.redditapis.com/api/reddit/profile/avatar", {
  method: "POST",
  headers: {
    Authorization: "Bearer TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image_url: "https://example.com/me.png",
    reddit_session: "eyJhbGc...",
    loid: "000000...",
    csrf_token: "689ea9...",
  }),
});
const data = await response.json();
import base64
import requests

# From a local file as base64

with open("avatar.png", "rb") as f:
encoded = base64.b64encode(f.read()).decode()

response = requests.post(
"https://api.redditapis.com/api/reddit/profile/avatar",
json={
"image_base64": encoded,
"reddit_session": "eyJhbGc...",
"loid": "000000...",
"csrf_token": "689ea9...",
},
headers={"Authorization": "Bearer TOKEN"},
)
data = response.json()

Success Response

{
  "success": true,
  "username": "your_reddit_username",
  "kind": "avatar",
  "url": "https://reddit-subreddit-uploaded-media.s3-accelerate.amazonaws.com/t5_xxxxxxxx/styles/profileIcon_xxxxxxxxxx.png",
  "size_bytes": 31278,
  "mime": "image/png"
}

Field Reference

FieldDescription
kindEcho of the input — avatar or banner.
urlThe new CDN URL Reddit now serves as the avatar/banner.
size_bytesUploaded image size in bytes.
mimeDetected MIME type (image/png or image/jpeg).

Errors

StatusMeaning
400None or multiple of image_url/image_base64/image_path, missing cookies, or unsupported image type
401Missing Bearer token
403Invalid Bearer token
502Upload or commit step rejected (cookies expired, image too large, account flagged)
500Unexpected server error

Tips: Reddit auto-crops avatars to a square — send a square image (256×256 or larger) for best results. Banners are landscape — recommended 1024×128 or wider.

On this page