> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leapx-hub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Any Shoot - Dressing Mode - Submit Task

## Introduction

Submit Any Shoot dressing mode task, used for virtual try-on.

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer Token, e.g., `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...`
  How to get: Obtain via the POST interface in the Authentication module at the top left, `https://docs.leapx-hub.com/en/leapx-lab-v4/endpoint/get-token`
</ParamField>

## Request Parameters

<ParamField body="cVDressingV4DTO.model.url" type="string" required>
  Model image URL
</ParamField>

<ParamField body="cVDressingV4DTO.garment.data" type="object[]" required>
  Garment asset list
</ParamField>

<ParamField body="cVDressingV4DTO.garment.data[].type" type="string" required>
  Asset type (e.g., image)
</ParamField>

<ParamField body="cVDressingV4DTO.garment.data[].url" type="string" required>
  Asset URL
</ParamField>

<ParamField body="cVDressingV4DTO.req_key" type="string">
  Request key for business correlation or de-duplication
</ParamField>

<ParamField body="cVDressingV4DTO.return_url" type="boolean">
  Whether to return the result URL directly
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.do_sr" type="boolean">
  Enable super-resolution
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.seed" type="integer">
  Random seed
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.keep_head" type="boolean">
  Keep head
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.keep_hand" type="boolean">
  Keep hands
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.keep_foot" type="boolean">
  Keep feet
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.num_steps" type="integer">
  Number of generation steps
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.keep_upper" type="boolean">
  Keep upper body
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.keep_lower" type="boolean">
  Keep lower body
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.tight_mask" type="string">
  Tight mask
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.p_bbox_iou_ratio" type="number">
  Person bbox IOU ratio
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.p_bbox_expand_ratio" type="number">
  Person bbox expand ratio
</ParamField>

<ParamField body="cVDressingV4DTO.inference_config.max_process_side_length" type="integer">
  Max process side length
</ParamField>

<ParamField body="cVDressingV4DTO.logoInfo.add_logo" type="boolean">
  Whether to add Logo
</ParamField>

<ParamField body="cVDressingV4DTO.logoInfo.position" type="integer">
  Logo position
</ParamField>

<ParamField body="cVDressingV4DTO.logoInfo.language" type="integer">
  Logo language
</ParamField>

<ParamField body="cVDressingV4DTO.logoInfo.opacity" type="number">
  Logo opacity
</ParamField>

### Example Code

<Tabs>
  <Tab title="cURL Example">
    ```bash theme={null}
    curl -X POST "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer sk-xxxxxxxxxx" \
      -d '{
        "imageUrl": "https://example.com/model.jpg",
        "clothingUrl": "https://example.com/clothing.jpg"
      }'
    ```
  </Tab>

  <Tab title="Python Example">
    ```python theme={null}
    import requests
    import json

    url = "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4"
    headers = {
        "Content-Type": "application/json",
        "Authorization": "Bearer sk-xxxxxxxxxx"
    }
    data = {
        "imageUrl": "https://example.com/model.jpg",
        "clothingUrl": "https://example.com/clothing.jpg"
    }

    response = requests.post(url, headers=headers, data=json.dumps(data))
    print(response.json())
    ```
  </Tab>
</Tabs>

### Response Example

<ResponseExample>
  ```json theme={null}
  {
    "code": 200,
    "msg": "Operation successful",
    "data": {
      "task_id": "task-1234567890"
    }
  }
  ```
</ResponseExample>
