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.
/api/reddit/profile/avatar$0.012 / callUpload 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.
| Field | Type | Required | Description |
|---|---|---|---|
image_url | string | one of | Publicly-fetchable image URL — the server downloads it |
image_base64 | string | one of | Base64-encoded image (with or without data:image/...;base64, prefix) |
image_path | string | one of | Server-local path (rarely useful) |
kind | string | no | avatar (default) or banner |
mimetype | string | no | Hint (PNG / JPG) — auto-detected from bytes if omitted |
filename | string | no | Filename to record (default avatar.png) |
reddit_session | string | yes | Session cookie from /api/reddit/login |
csrf_token | string | yes | Anti-CSRF cookie |
loid | string | no | Account loid cookie (recommended) |
proxy | object | string | no | Sticky IP for this account. { server, username?, password? } or "http://user:pass@host:port" |
max_attempts | number | no | Retry 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
| Field | Description |
|---|---|
kind | Echo of the input — avatar or banner. |
url | The new CDN URL Reddit now serves as the avatar/banner. |
size_bytes | Uploaded image size in bytes. |
mime | Detected MIME type (image/png or image/jpeg). |
Errors
| Status | Meaning |
|---|---|
400 | None or multiple of image_url/image_base64/image_path, missing cookies, or unsupported image type |
401 | Missing Bearer token |
403 | Invalid Bearer token |
502 | Upload or commit step rejected (cookies expired, image too large, account flagged) |
500 | Unexpected 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.
Set Display NameNew
Set the display name on a Reddit profile — the human-readable name shown above the username. Up to 90 characters. The username itself is not changed.
My Account
Get your account info, remaining credit balance, total credits used, and request count. Free, no per-call cost — use it for dashboards and billing checks.
