API Reference
Version: v1
Base URL: https://one-label.ai/api
FashionTools is a SaaS platform offering intelligent image labeling and visual analysis for the fashion industry. This API allows clients to authenticate and send images for automated clothing classification.
Authentication
Labelling API uses JWT (JSON Web Token) authentication.
Obtain Access Token
Type: POST
Path: /api/token/
Request data:
{
"username": "your_username",
"password": "your_password"
}
Successful Response:
{
"access": "your_access_token",
"refresh": "your_refresh_token"
}
Error Response (example):
Response code: 401 Unauthorized
{
"detail": "No active account found with the given credentials"
}
Refresh access token
Type: POST
Path: /api/token/refresh/
Request body:
{
"refresh":"your_refresh_token"
}
Successful Response:
{
"access": "your_refreshed_access_token"
}
Authorization
The access token must be included in all subsequent API requests using the Authorization header:
Content-Type: application/json
Authorization: Bearer your_access_token
Outfit Image Labelling
This endpoint analyzes a submitted image and returns a recognized clothing label.
Type: POST
Path: /api/outfit-describe/
Request body:
{
"image64": "BASE64_ENCODED_IMAGE",
"image_url": "https://example.com/image.jpg",
"hint": "optional_hint_to_improve_accuracy",
"options": {}
}
- At least one of image64 or image_url is required.
- hint is optional and helps improve recognition.
- options is reserved for future configuration.
Successful Response:
{
"uuid": "57f51e7e-23b1-556a-8aa6-790e89193bf0"
"label": "Sleeve",
"label_alternatives": [
"Shorts",
"Sleeve"
],
"request_payload": {
"image64": "52726, image/jpeg",
"image_hash": "f0b7337a",
"hint": "top outfit"
}
}
Error Response (examples):
{
"error": "Invalid or missing image data"
"error": "Authentication credentials were not provided."
"error": "You do not have permission to perform this action."
}
Label Training
This endpoint trains system to respond with custom given string for defined request uuid.
Type: POST
Path: /api/outfit-train-label/
Request body:
{
"uuid": "aa0e754d-317e-589a-bf1e-b74b7926b264",
"label": "SANDALS"
}
Error Codes
HTTP Code | Meaning | Description |
---|---|---|
200 | OK | Successful request |
400 | Bad Request | Missing or invalid input data |
401 | Unauthorized | Invalid or expired access token |
500 | Internal Server Error | Unexpected system error |