XFitYou API Documentation

Integrate powerful AI-driven fashion analysis into your applications with our comprehensive API.

Check Credits

Ensure you have sufficient credits for API calls. Each analysis costs 1 credit.

Get API Key

View and copy your API key from the API Keys page.

Start Analysis

Follow the steps below to start using XFitYou API for fashion analysis.

POST/api/analyze-outfit
Analyze uploaded outfit images and provide style scores, color harmony, and improvement suggestions.

Request Example

POST https://api.xfityou.com/api/analyze-outfit
Content-Type: application/json
Authorization: Bearer $API_KEY

{
  "image_url": "https://example.com/outfit.jpg",
  "analysis_type": "comprehensive",
  "include_recommendations": true,
  "language": "en"
}

Response Example

{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "xfit_12345",
    "analysis": {
      "style_score": 8.5,
      "color_harmony": "excellent",
      "fit_assessment": "well-fitted",
      "occasion_suitability": "business casual"
    },
    "recommendations": [
      {
        "item_type": "shoes",
        "suggestion": "Brown leather loafers",
        "reason": "Complements the business casual style"
      }
    ],
    "status": "completed"
  }
}

Request Parameters

image_urlrequired
analysis_typeoptional
include_recommendationsoptional
languageoptional

Response Fields

task_id - Unique task identifier
analysis - Analysis results
recommendations - Recommendations
status - Processing status
Error Codes
Possible error codes returned by the API and their meanings.
0Success
400Bad Request
401Invalid API Key
402Insufficient Credits
429Rate Limit Exceeded
500Internal Server Error
Support
If you encounter any issues while using the API, please feel free to contact our technical support team.