Download OpenAPI specification:
The Aria Fashion API powers a personalized AI fashion styling experience. It enables applications to authenticate users, manage style profiles, analyze images using computer vision, and generate AI-driven fashion recommendations through a conversational interface. Aria combines Mistral AI for conversational styling advice personalized to the user profile, and Meta LLaMA 4 Vision via Groq for analyzing uploaded images to extract appearance and style details. All endpoints except /api/signup and /api/login require a Bearer token in the Authorization header. Tokens expire after 30 days.
Creates a new user account and returns a JWT token. New users are redirected to complete their style profile before accessing the chat.
| email required | string <email> The user email address |
| password required | string <password> >= 6 characters The user password, minimum 6 characters |
{- "email": "shruti@example.com",
- "password": "mypassword123"
}{- "success": true,
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "userId": "user_1709481234567",
- "hasProfile": false
}Validates credentials and returns a JWT token. The response includes hasProfile to indicate whether the user has completed onboarding.
| email required | string <email> The user email address |
| password required | string <password> >= 6 characters The user password, minimum 6 characters |
{- "email": "shruti@example.com",
- "password": "mypassword123"
}{- "success": true,
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "userId": "user_1709481234567",
- "hasProfile": true
}Saves the user style profile including physical attributes, color preferences, budget range, and occasions. If a profile already exists it is overwritten. Optionally includes a base64-encoded avatar thumbnail and AI-generated appearance analysis.
| userId required | string |
required | object (Profile) |
{- "userId": "user_1709481234567",
- "profile": {
- "name": "Shruti",
- "gender": "Female",
- "ageGroup": "Young Adult (18-24)",
- "bodyType": "Athletic",
- "skinTone": "Medium",
- "height": "5ft 4in",
- "preferredStyle": "Casual",
- "favoriteColors": "Black, Beige, Olive green, Nude",
- "colorsToAvoid": "Neon, Hot pink",
- "budget": "Mid-range",
- "occasions": "Casual hangouts, Dates, College",
- "notes": "I prefer modest clothing and love layering",
- "photoAnalysis": "Skin tone is medium-olive. Hair is dark brown straight...",
- "avatar": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}
}{- "success": true
}Returns the complete style profile for the specified user. Used by the chat interface to personalize AI recommendations and by the profile edit page to pre-fill form fields.
| userId required | string Example: user_1709481234567 The unique identifier of the user |
{- "name": "Shruti",
- "gender": "Female",
- "ageGroup": "Young Adult (18-24)",
- "bodyType": "Athletic",
- "skinTone": "Medium",
- "height": "5ft 4in",
- "preferredStyle": "Casual",
- "favoriteColors": "Black, Beige, Olive green, Nude",
- "colorsToAvoid": "Neon, Hot pink",
- "budget": "Mid-range",
- "occasions": "Casual hangouts, Dates, College",
- "notes": "I prefer modest clothing and love layering",
- "photoAnalysis": "Skin tone is medium-olive. Hair is dark brown straight...",
- "avatar": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}Sends a user message to Aria and returns a personalized AI fashion response. Aria responses are informed by the user full style profile. Optionally accepts imageAnalysis from POST /api/analyze-chat-image. Conversation history is passed with each request to maintain context.
| userId required | string |
| message required | string The user message to Aria |
Array of objects (HistoryItem) Previous messages for context | |
| imageAnalysis | string or null Text analysis of a reference image from POST /api/analyze-chat-image |
{- "userId": "user_1709481234567",
- "message": "What should I wear for a casual day out?",
- "history": [ ]
}{- "response": "Love that vibe! For a casual day out here is what I would suggest for you..."
}Accepts a user photo and uses Meta LLaMA 4 Vision via Groq to extract appearance details relevant to fashion styling including skin tone, hair color and texture, eye color, and face shape. The analysis is stored in the user profile and referenced by Aria during conversations. Images are processed with a 30-second timeout. Maximum file size is 10MB.
| photo required | string <binary> The user photo file |
{- "success": true,
- "analysis": "Skin tone is medium-olive. Hair is dark brown straight and shoulder-length. Eyes appear dark brown. Face shape is oval."
}Accepts a reference image shared during chat and uses Meta LLaMA 4 Vision via Groq to analyze its fashion content. The analysis describes garments, footwear, hairstyles, or accessories visible in the image along with the overall aesthetic. The returned analysis string should be passed as imageAnalysis in the subsequent POST /api/chat request.
| image required | string <binary> The reference image file |
{- "success": true,
- "analysis": "The image shows a monochrome streetwear outfit. Oversized black graphic tee with straight-leg black cargo pants and chunky platform boots."
}Persists the current conversation history for a user. Called automatically by the client after each exchange to ensure history survives page refreshes and logouts.
| userId required | string |
required | Array of objects (HistoryItem) |
{- "userId": "user_1709481234567",
- "history": [
- {
- "role": "user",
- "text": "What should I wear for a casual day out?"
}, - {
- "role": "model",
- "text": "For a casual day out here is what I would suggest..."
}
]
}{- "success": true
}Returns the full conversation history for a user. Called on chat page load to restore previous messages. Returns an empty array if no history exists.
| userId required | string Example: user_1709481234567 The unique identifier of the user |
{- "history": [
- {
- "role": "user",
- "text": "What should I wear for a casual day out?"
}, - {
- "role": "model",
- "text": "For a casual day out here is what I would suggest..."
}
]
}