Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drssed.app/llms.txt

Use this file to discover all available pages before exploring further.

Before you can add a clothing item to a wardrobe, you need a processed image. Drssed provides an image processing pipeline that takes a raw clothing photo, strips the background, and returns both a clean image URL and a set of AI-detected metadata — category, color, seasons, and tags — that you can use directly when creating the clothing item. This saves you from having to classify items manually and gives your users a consistent image presentation.

POST /images/preview

This endpoint accepts a clothing photo and returns the processed result.
FieldValue
MethodPOST
Path/images/preview
Auth requiredYes
Content-Typemultipart/form-data
Rate limit1 per minute

Request

Send the image as a file field named file in a multipart/form-data request body.

Response fields

Status: 201 Created
FieldTypeDescription
image_urlstringURL of the processed image with the background removed.
image_idstringIdentifier for the processed image. Pass this as image_id when creating a clothing item.
image_colorstringAI-detected dominant color of the garment (hex code or color name).
image_categorystringAI-detected garment category: JACKET, TOP, BOTTOM, or FOOTWEAR.
image_seasonsarray of stringsAI-detected suitable seasons: any combination of Spring, Summer, Autumn, Winter.
image_tagsarray of stringsAI-detected style tags: any combination of Casual, Formal, Sports, Vintage.

Example request

curl --request POST \
  --url https://api.drssed.com/images/preview \
  --header "Authorization: Bearer <your_access_token>" \
  --form "file=@/path/to/shirt.jpg"

Example response

{
  "image_url": "https://cdn.drssed.com/processed/img_a1b2c3d4e5f6.png",
  "image_id": "img_a1b2c3d4e5f6",
  "image_color": "#3A86FF",
  "image_category": "TOP",
  "image_seasons": ["Spring", "Summer"],
  "image_tags": ["Casual"]
}
POST /images/preview is rate limited to 1 request per minute per user. Design your upload flow to process one image at a time and avoid retrying failed uploads in rapid succession.
The response includes image_category, image_seasons, and image_tags detected by the AI. You can use these as default values when creating the clothing item — just pre-fill the form fields in your UI from the response and let the user adjust anything the AI got wrong.

Using image_id when creating a clothing item

The image_id returned by POST /images/preview is the value you pass in the image_id field when calling POST /users/me/clothing. Without it, you cannot create a clothing item — the field is required. The typical flow is:
  1. Call POST /images/preview with the photo.
  2. Store the returned image_id (and optionally pre-fill image_category, image_seasons, image_tags).
  3. Call POST /users/me/clothing with the image_id and any other clothing fields.

GET /uploads/clothing_images/

Once a clothing item has been created, you can retrieve its processed image using this endpoint. Pass the clothing_id of the item as a path parameter.
FieldValue
MethodGET
Path/uploads/clothing_images/{clothing_id}
Auth requiredNo
The endpoint returns the processed image file directly, suitable for displaying in a wardrobe view.

Error cases

StatusCause
413 Content Too LargeThe uploaded file exceeds the maximum allowed size. Reduce the file size and try again.
422 Unprocessable EntityThe image could not be recognized as a garment — it may be too blurry, cropped too tightly, or contain multiple unrelated subjects. Upload a clearer photo of a single clothing item.