Ai Skin Analysis With Product Recommendation
AI-Skin-Analysis-with-Product-RecommendationWhat it is. Your product catalog, matched against a precise skin analysis. Upload the skincare products you sell with their descriptions, pass the catalog's id, and the endpoint returns the best-matching products for each detected concern in llm_results.json.
The difference from a general LLM recommendation is the input. A general LLM recommends from probability and priors. Perfect AI Skin Analysis first produces scientific, quantified skin metrics and real detection masks, so the model matches products against measured skin conditions — reliable, fast, and explainable, not a statistical guess.
Parameters
| Field | Type | Required | Default | Notes |
||||||
| catalog_id | string | Yes | — | From Upload a product catalog. Must be ready and belong to your account. |
| top_n | integer | No | 3 | Products recommended per concern. Min 1; must not exceed the catalog's sku_count. |
Prerequisite — Upload Your Product Catalog A product catalog is the list of products Skin Analysis recommends from. Upload it once, keep its
catalog_id, and pass that id on every analysis call. Catalogs belong to your account, not to one API key — every key of the account, project keys included, sees the same catalogs, and rotating or deleting a key does not affect them. Uploading and storing catalogs is free. Catalog file requirements | Item | Value | ||| | Format | CSV with a header row | | Encoding | UTF-8, with or without BOM (Excel's "CSV UTF-8" adds one) | | Maximum file size | 5 MB | | Maximum SKU count | No limit other than file size | | Required columns |product_id,product_name,product_description| Extra columns are ignored but still count toward the 5 MB limit. Quote values containing commas or line breaks. Each non-empty data row counts as one SKU.
product_id,product_name,product_description
SKU-001,Hydrating Serum,"A lightweight serum for dry skin."
SKU-002,Brightening Cream,"Evens out skin tone, for daily use."
SKU-003,Barrier Repair Cream,"Rich cream for dry, redness-prone skin."# Upload a catalog — validated in the same request
curl -sS -X POST "$BASE_URL/s2s/v2.1/product-catalog" \
-H "Authorization: Bearer $API_KEY" \
-F "file=@catalog.csv" \
-F "name=Summer skincare"A valid file answers status: ready with its catalog_id and sku_count — keep that id:
{
"status": 200,
"data": {
"catalog_id": "1662043585118399001",
"name": "Summer skincare",
"status": "ready",
"created_time": 1760256000000,
"sku_count": 3
}
}# List every catalog of your account, newest first (ready and failed alike)
curl -sS -H "Authorization: Bearer $API_KEY" "$BASE_URL/s2s/v2.1/product-catalog"
# Delete a catalog — immediate and permanent
curl -sS -X DELETE -H "Authorization: Bearer $API_KEY" \
"$BASE_URL/s2s/v2.1/product-catalog/1662043585118399001"Catalog states and limits
| Status | Meaning | Usable in Skin Analysis |
||||
| ready | Uploaded and validated | Yes |
| failed | Uploaded, file failed validation | No |
An upload that fails validation answers an error and is still recorded as a failed catalog, visible in List catalogs; the error body never carries its catalog_id. Each account keeps up to 10 catalogs, ready and failed together — delete one before uploading another. To update a catalog, upload a new file: every upload creates a new catalog_id, and the old catalog stays usable until you delete it, so you can verify the new one before switching.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"request": "<request>"
},
"name": "AI-Skin-Analysis-with-Product-Recommendation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| polling | No | If true (default), keep polling until the task finishes, returning the final result. If false, return immediately without waiting for the task to finish. | |
| request | Yes | This object represents a run Skin Analysis task. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |