Skip to content
Last updated

Upload a profile image by providing a URL. The image is downloaded, validated, and processed automatically.

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

Request Body

image_url string required

Public URL to the image file.

Supported Formats

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

Automatic Processing

  • Download: Fetches image from provided URL
  • 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/url" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/avatar.jpg"
  }'

Response:

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