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.
| Field | Value |
|---|
| Method | POST |
| Path | /images/preview |
| Auth required | Yes |
| Content-Type | multipart/form-data |
| Rate limit | 1 per minute |
Request
Send the image as a file field named file in a multipart/form-data request body.
Response fields
Status: 201 Created
| Field | Type | Description |
|---|
image_url | string | URL of the processed image with the background removed. |
image_id | string | Identifier for the processed image. Pass this as image_id when creating a clothing item. |
image_color | string | AI-detected dominant color of the garment (hex code or color name). |
image_category | string | AI-detected garment category: JACKET, TOP, BOTTOM, or FOOTWEAR. |
image_seasons | array of strings | AI-detected suitable seasons: any combination of Spring, Summer, Autumn, Winter. |
image_tags | array of strings | AI-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:
- Call
POST /images/preview with the photo.
- Store the returned
image_id (and optionally pre-fill image_category, image_seasons, image_tags).
- 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.
| Field | Value |
|---|
| Method | GET |
| Path | /uploads/clothing_images/{clothing_id} |
| Auth required | No |
The endpoint returns the processed image file directly, suitable for displaying in a wardrobe view.
Error cases
| Status | Cause |
|---|
413 Content Too Large | The uploaded file exceeds the maximum allowed size. Reduce the file size and try again. |
422 Unprocessable Entity | The 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. |