Transform the textures and materials of any image using AI-powered style transfer and material transformation.

Endpoint

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

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key

Request Body

ParameterTypeRequiredDescription
imgUrlstringYesURL of the source image (max length: 1024 characters)
remixPromptstringYesText description of desired texture/material transformation
callbackstringNoCallback URL for task completion notifications

Example Requests

Material Transformation

curl -X POST "https://api.legnext.ai/api/v1/retexture" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imgUrl": "https://example.com/image.jpg",
    "remixPrompt": "Convert to oil painting style",
    "callback": "https://webhook.site/c98cb890-fb92-439f-8d60-42c8a51eb52d"
  }'

Response

Returns a task object containing the task information.
{
    "job_id": "98761286-cdc7-4085-abfe-c9f149ff722b",
    "model": "midjourney",
    "task_type": "retexture",
    "status": "completed",
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67",
            "secret": ""
        }
    },
    "input": null,
    "output": {
        "image_url": "",
        "image_urls": [
            "https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_0.png?Expires=1761102268&Signature=iNZM9BV0OCS32GXCSYEruuCs7zU%3D",
            "https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_1.png?Expires=1761102268&Signature=6X1d2iMRXXn1afdYEKrAHKRAZW0%3D",
            "https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_2.png?Expires=1761102268&Signature=clTVka9lszWiHZckseM%2BFafgbmc%3D",
            "https://image.legnext.ai/20250922/01k5qp2gqrfef8761r8n9q9w0c_0_3.png?Expires=1761102268&Signature=dH98ACZ%2FxBkvpsOD9BjmJpE4WN4%3D"
        ]
    },
    "meta": {
        "created_at": "2025-09-22T03:04:27Z",
        "started_at": "2025-09-22T03:04:28Z",
        "ended_at": "2025-09-22T03:05:03Z",
        "usage": {
            "type": "point",
            "frozen": 00,
            "consume": 00
        }
    },
    "detail": null,
    "logs": [],
    "error": {
        "code": 0,
        "raw_message": "",
        "message": "",
        "detail": null
    }
}

Supported Formats

  • Image URL: HTTPS URLs pointing to image files (max length: 1024 characters)
  • Supported Types: JPG, PNG, WebP
  • Max File Size: 10MB