Aria Fashion API (1.0.0)

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.

Authentication

Register and authenticate users

Register a new user

Creates a new user account and returns a JWT token. New users are redirected to complete their style profile before accessing the chat.

Request Body schema: application/json
required
email
required
string <email>

The user email address

password
required
string <password> >= 6 characters

The user password, minimum 6 characters

Responses

Request samples

Content type
application/json
{
  • "email": "shruti@example.com",
  • "password": "mypassword123"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "userId": "user_1709481234567",
  • "hasProfile": false
}

Authenticate an existing user

Validates credentials and returns a JWT token. The response includes hasProfile to indicate whether the user has completed onboarding.

Request Body schema: application/json
required
email
required
string <email>

The user email address

password
required
string <password> >= 6 characters

The user password, minimum 6 characters

Responses

Request samples

Content type
application/json
{
  • "email": "shruti@example.com",
  • "password": "mypassword123"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "userId": "user_1709481234567",
  • "hasProfile": true
}

Profile

Manage user style profiles

Create or update a style profile

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.

Authorizations:
bearerAuth
Request Body schema: application/json
required
userId
required
string
required
object (Profile)

Responses

Request samples

Content type
application/json
{
  • "userId": "user_1709481234567",
  • "profile": {
    }
}

Response samples

Content type
application/json
{
  • "success": true
}

Retrieve a user style profile

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.

Authorizations:
bearerAuth
path Parameters
userId
required
string
Example: user_1709481234567

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "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..."
}

Chat

AI-powered fashion styling conversation

Send a message to Aria

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.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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

Responses

Request samples

Content type
application/json
Example
{
  • "userId": "user_1709481234567",
  • "message": "What should I wear for a casual day out?",
  • "history": [ ]
}

Response samples

Content type
application/json
{
  • "response": "Love that vibe! For a casual day out here is what I would suggest for you..."
}

Vision

Image analysis using computer vision

Analyze a profile photo

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.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
photo
required
string <binary>

The user photo file

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "analysis": "Skin tone is medium-olive. Hair is dark brown straight and shoulder-length. Eyes appear dark brown. Face shape is oval."
}

Analyze a reference image

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.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
image
required
string <binary>

The reference image file

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "analysis": "The image shows a monochrome streetwear outfit. Oversized black graphic tee with straight-leg black cargo pants and chunky platform boots."
}

History

Manage conversation history

Save conversation history

Persists the current conversation history for a user. Called automatically by the client after each exchange to ensure history survives page refreshes and logouts.

Authorizations:
bearerAuth
Request Body schema: application/json
required
userId
required
string
required
Array of objects (HistoryItem)

Responses

Request samples

Content type
application/json
{
  • "userId": "user_1709481234567",
  • "history": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

Retrieve conversation history

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.

Authorizations:
bearerAuth
path Parameters
userId
required
string
Example: user_1709481234567

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "history": [
    ]
}