Developers
Open app
Account

Set my profile photo

POST/profile/photo
Requires a session: Authorization: Bearer <token>Limit: 10 / 10 min per user

The raw image bytes as the body: JPEG, PNG or WebP, up to 5 MB (the type is read from the bytes). Replaces the photo in the Slay app too.

Request

curl -X POST 'https://api.slay.money/api/predict/profile/photo' \
  -H 'Authorization: Bearer $SLAY_TOKEN'

Responses

200Stored.
imagestring
200 response
{
  "image": "https://api.slay.money/api/avatars/…"
}
400Empty body.
400 response
{
  "error": "That file is empty."
}
401No valid session. Sign in again.
401 response
{
  "error": "Sign in first"
}
413Over 5 MB.
413 response
{
  "error": "That photo is too big. Pick one under 5 MB."
}
415Not JPEG, PNG or WebP.
415 response
{
  "error": "Use a JPEG, PNG or WebP image."
}
429Rate limit reached. Wait for the window to pass.
429 response
{
  "error": "Too many uploads. Wait a few minutes."
}
503Photos are unavailable right now.
503 response
{
  "error": "Profile pictures aren't available right now."
}