Swap a product image onto a fixed model reference with the version 2.0 workflow.
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/runMCP · nexscope_ai_model_swap_2_0Choose an integration method
Swap a product image onto a fixed model reference with the version 2.0 workflow. Review request parameters, response fields, and MCP usage.
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/runnexscope_ai_model_swap_2_0Step 1 of 3 · Authenticate
All run endpoints require a user API key. Send it as a bearer token in the Authorization header.
Authorization: Bearer nk-xxxxxxxxxxxxxxxxxStep 2 of 3 · Send a request
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/runGenerate model images from a product image and a full model reference image with optional segmentation and scene controls.
Replace YOUR_API_KEY, then run this command in your terminal.
curl -X POST 'https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/run' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/source-image.jpg",
"modelImageUrl": "https://example.com/model-reference.jpg",
"outputNum": 1,
"imageSegUrl": "https://example.com/mask.png",
"sceneImgUrl": "https://example.com/scene.jpg",
"sceneStrength": 0.7,
"genOriRes": false,
"realModel": true
}'Step 3 of 3 · Inspect the result
Read code for the request status and data for the result. Open the parameter and response reference for the full field definitions.
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/runSend a JSON request to execute this API and receive the documented response payload.
| Method | POST |
| Path | https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/run |
| Auth | Bearer API key |
| Content-Type | application/json |
Step 1 of 2 · Connect your MCP client
Connect remote agents through the standard MCP 2025-11-25 Streamable HTTP endpoint. Use OAuth 2.1 Authorization Code with PKCE, or an API key for compatibility.
POST https://api.nexscope.ai/api/skill-api/v2/mcp
MCP-Protocol-Version: 2025-11-25
Content-Type: application/jsonOAuth clients request the mcp:tools scope. The endpoint's 401 response advertises protected-resource metadata for authorization discovery.
Step 2 of 2 · Call the tool
{
"jsonrpc": "2.0",
"id": "tool-call-1",
"method": "tools/call",
"params": {
"name": "nexscope_ai_model_swap_2_0",
"arguments": {
"imageUrl": "https://example.com/source-image.jpg",
"modelImageUrl": "https://example.com/model-reference.jpg",
"outputNum": 1,
"imageSegUrl": "https://example.com/mask.png",
"sceneImgUrl": "https://example.com/scene.jpg",
"sceneStrength": 0.7,
"genOriRes": false,
"realModel": true
}
}
}Existing API-key clients can continue using the compatibility endpoint. New integrations should use MCP v2.
GET / POST /api/skill-api/v1/mcpExecute the current API with your API key and JSON payload.
Send a real request with the same contract shown in the reference.
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/runhttps://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/tasks/{taskId}nexscope_ai_model_swap_2_0curl -X POST \
https://api.nexscope.ai/api/skill-api/v1/skills/ai-model-swap-2-0/run \
-H "Authorization: Bearer nk-..." \
-H "Content-Type: application/json" \
-d '{ "imageUrl": "", "modelImageUrl": "", "outputNum": 1, "imageSegUrl": "", "sceneImgUrl": "", "sceneStrength": 0.7, "genOriRes": false, "realModel": true }'No response yet. Run the request to see the response here.
Results are checked automatically after Run API. You can also enter a task ID and check it manually; completed resources use Nexscope URLs and show actual charged credits.
No task result yet. Query the task to see the generated output here.
Place an ecommerce product image onto a target model.
Place a model image into a new scene or background.
Generate virtual try-on images for separate upper and lower garments.
Generate virtual try-on images for one-piece outfits.
| Name | Type | Required | Description |
|---|---|---|---|
imageUrl | string | required | Public URL of the source product or outfit image. The image must be up to 20 MB and between 385 and 8192 pixels in both width and height. Example: https://example.com/source-image.jpg |
modelImageUrl | string | required | Public URL of the full model reference image. Example: https://example.com/model-reference.jpg |
outputNum | integer | optional | Number of images to generate, from 1 to 4. Defaults to 1. Example: 1 |
imageSegUrl | string | optional | Optional segmentation mask URL for the source image. Example: https://example.com/mask.png |
sceneImgUrl | string | optional | Optional scene reference image URL. Example: https://example.com/scene.jpg |
sceneStrength | number | optional | Scene reference strength from 0 to 1. Defaults to 0.7. Example: 0.7 |
genOriRes | boolean | optional | Whether to generate the original resolution. Defaults to false. Example: false |
realModel | boolean | optional | Whether to prefer a realistic model style. Example: true |
{
"imageUrl": "https://example.com/source-image.jpg",
"modelImageUrl": "https://example.com/model-reference.jpg",
"outputNum": 1,
"imageSegUrl": "https://example.com/mask.png",
"sceneImgUrl": "https://example.com/scene.jpg",
"sceneStrength": 0.7,
"genOriRes": false,
"realModel": true
}Platform response envelope. code 0 indicates success or acceptance; data contains the business result.
{
"data": {
"taskId": "example-task",
"status": "PENDING",
"result": null
},
"code": 0,
"msg": null,
"ts": "0",
"time": "2026-01-01 00:00:00",
"cost": "-1",
"traceId": null
}| Name | Type | Required | Description |
|---|---|---|---|
data | any | required | Data value used by this API operation. |
code | integer | required | 0 means accepted or successful; nonzero is a platform error. |
msg | string | null | required | Msg value used by this API operation. |
ts | string | required | Epoch milliseconds. |
time | string | required | Server local time: yyyy-MM-dd HH:mm:ss. |
cost | string | required | Elapsed milliseconds, never credits; -1 outside web requests. |
traceId | string | null | required | Trace id value used by this API operation. |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Data value used by this API operation. |
data.result | any | required | Result value used by this API operation. |
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. |
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
Source, freshness, coverage, rate limits, and estimation notes are not specified in this API definition unless they appear in the request or response field documentation above. Do not assume official marketplace data or real-time freshness when it is not explicitly documented.
| 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. |
| Name | Type | Required | Description |
|---|---|---|---|
data.result | null | required | Result value used by this API operation. |
| Name | Type | Required | Description |
|---|---|---|---|
data | null | required | Data value used by this API operation. |