curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.jpg",
"media_type": "image",
"type": "person"
}'
curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.mp4",
"media_type": "video",
"type": "person"
}'
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "image"
}
}
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "video"
}
}
API Endpoints
Analyze Source Material
Analyze Source Material for Clothing Swap V5.
POST
/
api
/
open
/
v5
/
clothingSwap
/
analyze
curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.jpg",
"media_type": "image",
"type": "person"
}'
curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.mp4",
"media_type": "video",
"type": "person"
}'
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "image"
}
}
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "video"
}
}
POST https://openapi.akool.com/api/open/v5/clothingSwap/analyze
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | String | true | Public source material URL. Use the identical URL during task creation. |
| media_type | String | true | image or video. Use the same media type and URL when creating an analysis-driven task. |
| type | String | false | Analysis category: person, head or outfit; defaults to person. |
Request examples
Select a source scenario to view matching request and queued response examples. URLs and IDs are illustrative; replace them with your accessible source material.- Source image
- Source video
Body
{
"url": "https://example.com/source.jpg",
"media_type": "image",
"type": "person"
}
Body
{
"url": "https://example.com/source.mp4",
"media_type": "video",
"type": "person"
}
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Business response code. |
| msg | String | Response message. |
| data | Object | Newly created analysis. |
| - _id | String | Analysis ID. |
| - task_id | String | Downstream algorithm/provider task ID; may be empty until submission. Use _id, not this value, for task-detail queries. It may change between workflow stages. |
| - status | Integer | Initially 1 (queueing). |
| - media_type | String | Source media type. |
data._id as the analysis ID.
For input limits, billing, callbacks, and error codes, see the Clothing Swap V5 overview.
curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.jpg",
"media_type": "image",
"type": "person"
}'
curl --request POST \
--url 'https://openapi.akool.com/api/open/v5/clothingSwap/analyze' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/source.mp4",
"media_type": "video",
"type": "person"
}'
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "image"
}
}
{
"code": 1000,
"msg": "OK",
"data": {
"_id": "670000000000000000000001",
"task_id": "",
"status": 1,
"media_type": "video"
}
}
Authorizations
ApiKeyAuthBearerAuth
Body
application/json
Public source material URL. Use the identical URL during task creation.
image or video. Use the same media type and URL when creating an analysis-driven task.
Available options:
image, video Analysis category: person, head or outfit; defaults to person.
Available options:
person, head, outfit