Modellss Docs
  1. InsightFace task submission
  • Send Request
  • Model List and Price
  • Model APIs
    • Chat API
      • Chat
      • GPTs
      • gemini-pro
      • gpt-4-all(Image)
      • gpt-4-vision-preview
    • Chat Completions API
      • Chat Completions API
    • Image API
      • Midjourney
        • InsightFace task submission
          • Submit swap_face task
            POST
        • Task Submission
          • Perform Action
          • Submit Blend Task
          • Submit a Describe task
          • Submit a Imagine task
          • Submit Modal
          • Submit Shorten Task
        • Task Inquiry
          • Inquire about all tasks
          • Inquire about tasks based on a list of IDs
          • Paged query for tasks
          • Inquire about the task queue
          • Cancel task
          • Retrieve task with specified ID
          • Get the seed for the task image
      • DALL·E 3
        POST
      • Stable Diffusion
        POST
      • MJ Chat
        POST
      • gpt-4-all(generate images)
        POST
    • Embedding Vector Generation Interface (Embeddings)
      • Create Embeddings
    • Audio
      • Create transcription
      • Create translation
      • Text to speech
  • Help Center
    • FAQ
  1. InsightFace task submission

Submit swap_face task

POST
/mj/insight-face/swap
InsightFace任务提交
The Submit Swap Face task at /mj/insight-face/swap allows for the swapping of faces between two images, utilizing advanced facial recognition and manipulation technologies. This API endpoint is ideal for creating seamless, realistic results in image editing, entertainment, or digital identity verification processes.

Request

Body Params application/json
sourceBase64
string 
required
Source Image (Base64-encoded)
Example:
data:image/png;base64,xxx1
targetBase64
string 
required
Target Image (Base64-encoded)
Example:
data:image/png;base64,xxx2
accountFilter
object (Filter) 
optional
instanceId
string 
optional
账号实例ID
notifyHook
string 
optional
Callback URL (When empty, the global notifyHook will be used)
state
string 
optional
Custom Parameters
Example
{
    "sourceBase64": "data:image/png;base64,xxx1",
    "targetBase64": "data:image/png;base64,xxx2",
    "accountFilter": {
        "instanceId": "string"
    },
    "notifyHook": "string",
    "state": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.modelless.co/mj/insight-face/swap' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sourceBase64": "data:image/png;base64,xxx1",
    "targetBase64": "data:image/png;base64,xxx2",
    "accountFilter": {
        "instanceId": "string"
    },
    "notifyHook": "string",
    "state": "string"
}'

Responses

🟢200OK
application/json
Body
code
integer <int32>
optional
description
string 
optional
result
string 
optional
Example
{
    "code": 0,
    "description": "string",
    "result": "string"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
Previous
Chat Completions API
Next
Perform Action
Built with