IMPORTANT ASYNCHRONOUS TASK WORKFLOW
- Call this MCP generation tool once and read taskId from structuredContent.
- Do not call generation again while pending or running.
- Query nexscope_media_task_result with this skill slug, the exact taskId, and the same bearer credential using progressive backoff.
Multimodal AI
AI Clothes Changer API for Tops & Bottoms
Generate try-on images for separate upper and lower garments.
MCP tool name
nexscope_ai_clothes_changer_for_tops_bottomsMCP endpoint
https://api.nexscope.ai/mcpJSON-RPC method
tools/callAuthentication
Use OAuth 2.1 Authorization Code with PKCE and the mcp:tools scope. API keys remain supported as a compatibility option.
Authorization: Bearer nk-xxxxxxxxxxxxxxxxxIf authentication fails, ask the user to open API Access and copy a valid key.
Call this MCP tool
Initialize an MCP 2025-11-25 Streamable HTTP session at https://api.nexscope.ai/mcp, then use tools/call.
{
"jsonrpc": "2.0",
"id": "ai-clothes-changer-for-tops-bottoms-1",
"method": "tools/call",
"params": {
"name": "nexscope_ai_clothes_changer_for_tops_bottoms",
"arguments": {
"downImageUrl": "https://example.com/bottom-mask.png",
"downOriginUrl": "https://example.com/bottom.jpg",
"modelImageUrl": "https://example.com/model-reference.jpg",
"modelMaskImageUrl": "https://example.com/mask.png",
"outputNum": 1,
"upperImageUrl": "https://example.com/top-mask.png",
"upperOriginUrl": "https://example.com/top.jpg"
}
}
}MCP 2025-11-25 · Streamable HTTPProgress is delivered on the original POST SSE response. GET SSE carries notifications; reconnecting must query existing asynchronous work rather than submit again.
Asynchronous task workflow
- 1. Create once
Keep the returned taskId.
- 2. Query with backoff
Use nexscope_media_task_result after 5 seconds, then 10, 20, and 30 seconds.
- 3. Use final result
Stop at success, failure, or timeout.
{
"jsonrpc": "2.0",
"id": "ai-clothes-changer-for-tops-bottoms-result-1",
"method": "tools/call",
"params": {
"name": "nexscope_media_task_result",
"arguments": {
"skillSlug": "ai-clothes-changer-for-tops-bottoms",
"taskId": "TASK_ID_FROM_THE_GENERATION_RESULT"
}
}
}Arguments
| Name | Type | Required | Description |
|---|---|---|---|
modelImageUrl | string | required | Public URL of the model image. Example: https://example.com/model-reference.jpg |
upperOriginUrl | string | optional | Public URL of the original upper garment image. The image must be up to 20 MB and between 385 and 4096 pixels in both width and height. Example: https://example.com/top.jpg |
downOriginUrl | string | optional | Public URL of the original lower garment image. The image must be up to 20 MB and between 385 and 4096 pixels in both width and height. Example: https://example.com/bottom.jpg |
upperImageUrl | string | optional | Optional processed upper garment mask or crop URL. Example: https://example.com/top-mask.png |
downImageUrl | string | optional | Optional processed lower garment mask or crop URL. Example: https://example.com/bottom-mask.png |
modelMaskImageUrl | string | optional | Optional mask URL for the model body area. Example: https://example.com/mask.png |
outputNum | integer | optional | Number of images to generate, from 1 to 4. Defaults to 1. Example: 1 |
Response fields
Treat structuredContent as the programmatic API response payload.
| Name | Type | Required | Description |
|---|---|---|---|
code | integer | required | 0 means accepted or successful; nonzero is a platform error. |
cost | string | required | Elapsed milliseconds, never credits; -1 outside web requests. |
data | any | required | Data value used by this API operation. |
msg | string | null | required | Msg value used by this API operation. |
time | string | required | Server local time: yyyy-MM-dd HH:mm:ss. |
traceId | string | null | required | Trace id value used by this API operation. |
ts | string | required | Epoch milliseconds. |
Any of option 1 — requires taskId, status, result
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Data value used by this API operation. |
data.result | any | required | Completed generation output retained from the task result. Fields vary by capability; generated resources use Nexscope-hosted URLs and any count represents charged Nexscope credits. This is the business output, not a task creation receipt. |
data.status | string | required | Status value used by this API operation. Allowed: PENDING, RUNNING, SUCCEEDED, FAILED, TIMEOUT |
data.taskId | string | required | Task id value used by this API operation. |
data.usage | object | optional | Actual credits charged for a completed successful task; omitted when unavailable. |
data.usage.chargedCredits | integer | required | Charged credits value used by this API operation. Minimum: 0 |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.result | object | required | Completed generation output retained from the task result. Fields vary by capability; generated resources use Nexscope-hosted URLs and any count represents charged Nexscope credits. This is the business output, not a task creation receipt. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.result | null | required | Completed generation output retained from the task result. Fields vary by capability; generated resources use Nexscope-hosted URLs and any count represents charged Nexscope credits. This is the business output, not a task creation receipt. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data | null | required | Data value used by this API operation. |
Examples
Example arguments
{
"downImageUrl": "https://example.com/bottom-mask.png",
"downOriginUrl": "https://example.com/bottom.jpg",
"modelImageUrl": "https://example.com/model-reference.jpg",
"modelMaskImageUrl": "https://example.com/mask.png",
"outputNum": 1,
"upperImageUrl": "https://example.com/top-mask.png",
"upperOriginUrl": "https://example.com/top.jpg"
}Example structuredContent
{
"code": 0,
"cost": "-1",
"data": {
"result": null,
"status": "PENDING",
"taskId": "example-task"
},
"msg": null,
"time": "2026-01-01 00:00:00",
"traceId": null,
"ts": "0"
}