Skip to content
Last updated

Upload a profile image directly from a file. Supports multiple formats with automatic WebP conversion and multi-size generation.

POSThttps://api.aitronos.com/v1/user/profile/image

Request Body

file file required

Image file to upload (multipart/form-data).

Supported Formats

  • JPEG/JPG
  • PNG (including transparency)
  • WebP
  • GIF

Automatic Processing

  • Validation: File type, size (10MB max), corruption check
  • Conversion: All images converted to WebP format
  • Multi-size: Generates 3 versions:
    • Thumbnail: 150x150px
    • Medium: 500x500px
    • Full: 1200x1200px
  • Storage: GCS bucket freddy-profile-images (Europe region)
  • Update: Auto-updates user's profile_image field

Returns

URLs for all generated image sizes (thumbnail, medium, full) in WebP format. All images are publicly accessible via GCS.

Bash
curl -X POST \
  "https://api.aitronos.com/v1/user/profile/image" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -F "file=@profile.jpg"

Response:

{
  "success": true,
  "message": "Profile image uploaded successfully",
  "urls": {
    "thumbnail": "https://storage.googleapis.com/freddy-profile-images/profile-images/usr_123e4567e89b12d3a456426614174000/abc123_thumbnail.webp",
    "medium": "https://storage.googleapis.com/freddy-profile-images/profile-images/usr_123e4567e89b12d3a456426614174000/abc123_medium.webp",
    "full": "https://storage.googleapis.com/freddy-profile-images/profile-images/usr_123e4567e89b12d3a456426614174000/abc123_full.webp"
  }
}