Skip to main content
Turn multiple photos into a single unique creation using /blend

Endpoint

POST https://api.legnext.ai/api/v1/blend

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key

Request Body

ParameterTypeRequiredDescription
base64Arraystring[]YesArray of 2-5 base64-encoded images to blend
dimensionstringYesAspect ratio: PORTRAIT (2:3), SQUARE (1:1), or LANDSCAPE (3:2).
callbackstringNoCallback URL for task completion notifications

Example Request

curl -X POST "https://api.legnext.ai/api/v1/blend" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "base64Array": [
      "data:image/png;base64,xxx1",
      "data:image/png;base64,xxx2"
    ],
    "dimension": "SQUARE",
    "callback": "https://webhook.site/your-webhook-id"
  }'

Response

Returns a task object containing the task information.
{
    "job_id": "72d1f175-26e2-4fc0-8ea4-b85aafeeef97",
    "model": "midjourney",
    "task_type": "blend",
    "status": "completed",
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/c98cb890-fb92-439f-8d60-42c8a51eb52d",
            "secret": ""
        }
    },
    "input": null,
    "output": {
        "image_url": "https://cdn.legnext.ai/temp/1760007077333_https_youchuan_imagine_oss_cn_shan_35868a63975f48598af4b4691e8d70ae.png",
        "image_urls": [
            "https://cdn.legnext.ai/mj/72d1f175-26e2-4fc0-8ea4-b85aafeeef97_0.png",
            "https://cdn.legnext.ai/mj/72d1f175-26e2-4fc0-8ea4-b85aafeeef97_1.png",
            "https://cdn.legnext.ai/mj/72d1f175-26e2-4fc0-8ea4-b85aafeeef97_2.png",
            "https://cdn.legnext.ai/mj/72d1f175-26e2-4fc0-8ea4-b85aafeeef97_3.png"
        ],
        "seed": "33ab33e4-a232-4bf7-843e-57b41a143b8d",
        "available_actions": {
            "edit": [
                0,
                1,
                2,
                3
            ],
            "inpaint": [
                0,
                1,
                2,
                3
            ],
            "outpaint": [
                0,
                1,
                2,
                3
            ],
            "pan": [
                0,
                1,
                2,
                3
            ],
            "remix": [
                0,
                1,
                2,
                3
            ],
            "reroll": true,
            "upscale": [
                0,
                1,
                2,
                3
            ],
            "variation": [
                0,
                1,
                2,
                3
            ]
        }
    },
    "meta": {
        "created_at": "2025-10-09T18:50:40+08:00",
        "started_at": "2025-10-09T18:50:41+08:00",
        "ended_at": "2025-10-09T18:51:33+08:00",
        "usage": {
            "type": "point",
            "frozen": 80,
            "consume": 80
        }
    },
    "detail": null,
    "logs": [],
    "error": {
        "code": 0,
        "raw_message": "",
        "message": "",
        "detail": null
    }
}
I