Nexscope

AI Model Swap

Generate model images by combining a source product image with a model head image, optional masks, scene references, and prompt. Available via REST API or MCP.

CostEst. 47–57 credits / call
Try online
POST · https://api.nexscope.ai/ai/modelSwapMCP · nexscope_ai_model_swap
Subscription required. Creative AI APIs are available only to users with an active subscription. Trial credits do not enable API key access. View subscription plans.

What this API does

Generate model images by combining a source product image with a model head image, optional masks, scene references, and prompt. The request accepts imageUrl, modelHeadImageUrl, imageSegUrl, sceneImgUrl, sceneStrength. Generation runs as a task: retain the task ID and retrieve the completed result before using the output.

AI Model Swap API use cases

Investigate AI Model Swap

To investigate ai model swap, a content editor submits imageUrl and modelHeadImageUrl to AI Model Swap. The returned completed generation results help investigate the requested operation.

Collect AI Model Swap evidence

A content editor uses AI Model Swap with imageUrl and modelHeadImageUrl to collect ai model swap evidence. The returned completed generation results help compare evidence for the requested scope.

Review AI Model Swap results

For this workflow, a content editor calls AI Model Swap with imageUrl and modelHeadImageUrl to review ai model swap results. The result helps review the returned facts with the team.

AI Model Swap API FAQ

What does the AI Model Swap API return?

Generate model images by combining a source product image with a model head image, optional masks, scene references, and prompt. It corresponds to the supplied imageUrl, modelHeadImageUrl, imageSegUrl, sceneImgUrl, sceneStrength. The initial response can contain a task ID and status; the completed task result contains the generated output. Example values illustrate the response shape, rather than live account results.

How many credits does the AI Model Swap API cost?

The current documented cost is Est. 47–57 credits / call. This is the same cost shown at the top of this page. If a range or estimate is displayed, the final charge depends on the request. Review your available credits and the pricing page before calling the API, and check API usage records for the actual charge.

How do I call the AI Model Swap API from my app or an MCP client?

Send a POST request to https://api.nexscope.ai/ai/modelSwap with your API key as a Bearer token and the JSON inputs shown in API integration. In a compatible MCP client such as Claude or Cursor, connect Nexscope and call nexscope_ai_model_swap. Use the MCP arguments shown in the MCP guide, or switch Online test to MCP to review its request before adding it to your app.

View plans and creditsConnect this API with MCP

Try this API
Endpoint
https://api.nexscope.ai/ai/modelSwap
MCP method
nexscope_ai_model_swap

Step 1 of 3 · Authenticate

Authentication

All run endpoints require a user API key. Send it as a bearer token in the Authorization header.

Authorization: Bearer nk-xxxxxxxxxxxxxxxxx
Missing or invalid API keys return an authentication error. Manage keys from .

Step 2 of 3 · Send a request

POSThttps://api.nexscope.ai/ai/modelSwap

Run an API

Generate model images by combining a source product image with a model head image, optional masks, scene references, and prompt guidance.

Example request

Replace YOUR_API_KEY, then run this command in your terminal.

curl -X POST 'https://api.nexscope.ai/ai/modelSwap' \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "customNegPrompt": "blur, distorted hands",
  "customPrompt": "clean ecommerce catalog photo",
  "genOriRes": false,
  "imageSegUrl": "https://example.com/mask.png",
  "imageUrl": "https://example.com/source-image.jpg",
  "modelHeadImageUrl": "https://example.com/model-reference.jpg",
  "modelPrompt": "smile, slim",
  "outputNum": 1,
  "realModel": true,
  "sceneImgUrl": "https://example.com/scene.jpg",
  "sceneStrength": 0.7
}'

Code example

{
  "customNegPrompt": "blur, distorted hands",
  "customPrompt": "clean ecommerce catalog photo",
  "genOriRes": false,
  "imageSegUrl": "https://example.com/mask.png",
  "imageUrl": "https://example.com/source-image.jpg",
  "modelHeadImageUrl": "https://example.com/model-reference.jpg",
  "modelPrompt": "smile, slim",
  "outputNum": 1,
  "realModel": true,
  "sceneImgUrl": "https://example.com/scene.jpg",
  "sceneStrength": 0.7
}

Step 3 of 3 · Inspect the result

Check the response

Read code for the request status and data for the result. Open the parameter and response reference for the full field definitions.

HTTP status codes

CodeDescription
200Default HTTP response for both success and many business errors. Only outer JSON code 0 indicates success or asynchronous acceptance; inspect data for the result.
429Execution admission rate limit; honor Retry-After when present.
503Execution admission is temporarily unavailable; honor Retry-After when present.
Opt-inX-Nexscope-Http-Status: semantic maps controller-handled business errors to HTTP status on run and task routes. Pre-authentication failures, such as a missing or invalid API key (code 11209, including an incomplete or corrupted copy) or an expired website login session (code 12001), may still return HTTP 200 before this mapping. Always check the outer JSON code; malformed requests and infrastructure failures may also return non-200 HTTP responses.
All categories/ Multimodal AI
POSThttps://api.nexscope.ai/ai/modelSwap

Run this API

Send a JSON request to execute this API and receive the documented response payload.

Endpoint

MethodPOST
Pathhttps://api.nexscope.ai/ai/modelSwap
AuthBearer API key
Content-Typeapplication/json

Request parameters

NameTypeRequiredDescription
imageUrlstringrequired
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
modelHeadImageUrlstringrequired
Public URL of the target model head image. The image must be up to 5 MB and between 512 and 2048 pixels in both width and height.
Example: https://example.com/model-reference.jpg
imageSegUrlstringoptional
Optional segmentation mask URL for the source image.
Example: https://example.com/mask.png
sceneImgUrlstringoptional
Optional scene reference image URL. The image must be up to 10 MB and between 768 and 4096 pixels in both width and height.
Example: https://example.com/scene.jpg
sceneStrengthnumberoptional
Scene reference strength from 0 to 1. Defaults to 0.7.
Example: 0.7
modelPromptstringoptional
Comma-separated model appearance terms, such as smile, laugh, sitting, lying, fat, plump, slim, sideways, profile, back, or bald.
Example: smile, slim
customPromptstringoptional
Positive generation prompt, up to 600 characters.
Example: clean ecommerce catalog photo
customNegPromptstringoptional
Negative prompt to avoid unwanted artifacts.
Example: blur, distorted hands
genOriResbooleanoptional
Whether to generate the original resolution. Defaults to false.
Example: false
realModelbooleanoptional
Whether to prefer a realistic model style.
Example: true
outputNumintegeroptional
Number of images to generate, from 1 to 4. Defaults to 1.
Example: 1

Response example

Platform response envelope. code 0 indicates success or acceptance; data contains the business result.

{
  "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"
}

Response fields

NameTypeRequiredDescription
codeintegerrequired
0 means accepted or successful; nonzero is a platform error.
coststringrequired
Elapsed milliseconds, never credits; -1 outside web requests.
dataanyrequired
Data value used by this API operation.
msgstring | nullrequired
Msg value used by this API operation.
timestringrequired
Server local time: yyyy-MM-dd HH:mm:ss.
traceIdstring | nullrequired
Trace id value used by this API operation.
tsstringrequired
Epoch milliseconds.

Any of option 1 — requires taskId, status, result

NameTypeRequiredDescription
dataobjectrequired
Data value used by this API operation.
data.resultanyrequired
Result value used by this API operation.
data.statusstringrequired
Status value used by this API operation.
Allowed: PENDING, RUNNING, SUCCEEDED, FAILED, TIMEOUT
data.taskIdstringrequired
Task id value used by this API operation.

Any of option 1

NameTypeRequiredDescription
data.resultobjectrequired
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

NameTypeRequiredDescription
data.resultnullrequired
Result value used by this API operation.

Any of option 2

NameTypeRequiredDescription
datanullrequired
Data value used by this API operation.

Responses

CodeDescription
200Default HTTP response for both success and many business errors. Only outer JSON code 0 indicates success or asynchronous acceptance; inspect data for the result.
429Execution admission rate limit; honor Retry-After when present.
503Execution admission is temporarily unavailable; honor Retry-After when present.
Opt-inX-Nexscope-Http-Status: semantic maps controller-handled business errors to HTTP status on run and task routes. Pre-authentication failures, such as a missing or invalid API key (code 11209, including an incomplete or corrupted copy) or an expired website login session (code 12001), may still return HTTP 200 before this mapping. Always check the outer JSON code; malformed requests and infrastructure failures may also return non-200 HTTP responses.

Step 1 of 2 · Connect your MCP client

MCP

V2 recommended

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/mcp
MCP-Protocol-Version: 2025-11-25
Content-Type: application/json
Authentication

OAuth 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

Call a tool

{
  "jsonrpc": "2.0",
  "id": "tool-call-1",
  "method": "tools/call",
  "params": {
    "name": "nexscope_ai_model_swap",
    "arguments": {
      "customNegPrompt": "blur, distorted hands",
      "customPrompt": "clean ecommerce catalog photo",
      "genOriRes": false,
      "imageSegUrl": "https://example.com/mask.png",
      "imageUrl": "https://example.com/source-image.jpg",
      "modelHeadImageUrl": "https://example.com/model-reference.jpg",
      "modelPrompt": "smile, slim",
      "outputNum": 1,
      "realModel": true,
      "sceneImgUrl": "https://example.com/scene.jpg",
      "sceneStrength": 0.7
    }
  }
}

Legacy MCP v1

Existing API-key clients can continue using the compatibility endpoint. New integrations should use MCP v2.

GET / POST /mcp/legacy

What can you do with this API?

Data explained and practical use cases

AI Guide

Question

What can AI Model Swap produce, and how might I use it?

AI answer

AI Model Swap combines a source product or outfit image with a target model head image to generate model imagery. Optional prompts and scene references guide the appearance. The example response is a pending task, not a generated photo.

Data categoryDocumented fieldWhat it means
Processing statedata.statusShows PENDING in the example.
Completed outputdata.resultIs null while pending; no finished-image fields are documented here.
Result retrievaldata.taskIdIdentifies the task to check for its completed result.
  • Explore how an outfit image looks with a specified model head for a catalog concept.
    • Prompt example: “I am preparing product creative for an online listing. Could you explore how an outfit image looks with a specified model head for a catalog concept? Ask me for required source images or text, and show the finished result only after the task completes.”
  • Guide expression or orientation with modelPrompt when preparing model image options.
    • Prompt example: “I am preparing product creative for an online listing. Could you guide expression or orientation with modelPrompt when preparing model image options? Ask me for required source images or text, and show the finished result only after the task completes.”
  • Provide sceneImgUrl to explore a model image against a reference setting.
    • Prompt example: “I am preparing product creative for an online listing. Could you provide sceneImgUrl to explore a model image against a reference setting? Ask me for required source images or text, and show the finished result only after the task completes.”
  • Generate multiple options with outputNum and select a completed image for further review.
    • Prompt example: “I am preparing product creative for an online listing. Could you generate multiple options with outputNum and select a completed image for further review? Ask me for required source images or text, and show the finished result only after the task completes.”

Related APIs