万物迁移-服装模式-提交任务
curl --request POST \
--url https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"cVDressingV4DTO.model.url": "<string>",
"cVDressingV4DTO.garment.data": [
{}
],
"cVDressingV4DTO.garment.data[].type": "<string>",
"cVDressingV4DTO.garment.data[].url": "<string>",
"cVDressingV4DTO.req_key": "<string>",
"cVDressingV4DTO.return_url": true,
"cVDressingV4DTO.inference_config.do_sr": true,
"cVDressingV4DTO.inference_config.seed": 123,
"cVDressingV4DTO.inference_config.keep_head": true,
"cVDressingV4DTO.inference_config.keep_hand": true,
"cVDressingV4DTO.inference_config.keep_foot": true,
"cVDressingV4DTO.inference_config.num_steps": 123,
"cVDressingV4DTO.inference_config.keep_upper": true,
"cVDressingV4DTO.inference_config.keep_lower": true,
"cVDressingV4DTO.inference_config.tight_mask": "<string>",
"cVDressingV4DTO.inference_config.p_bbox_iou_ratio": 123,
"cVDressingV4DTO.inference_config.p_bbox_expand_ratio": 123,
"cVDressingV4DTO.inference_config.max_process_side_length": 123,
"cVDressingV4DTO.logoInfo.add_logo": true,
"cVDressingV4DTO.logoInfo.position": 123,
"cVDressingV4DTO.logoInfo.language": 123,
"cVDressingV4DTO.logoInfo.opacity": 123
}
'import requests
url = "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4"
payload = {
"cVDressingV4DTO.model.url": "<string>",
"cVDressingV4DTO.garment.data": [{}],
"cVDressingV4DTO.garment.data[].type": "<string>",
"cVDressingV4DTO.garment.data[].url": "<string>",
"cVDressingV4DTO.req_key": "<string>",
"cVDressingV4DTO.return_url": True,
"cVDressingV4DTO.inference_config.do_sr": True,
"cVDressingV4DTO.inference_config.seed": 123,
"cVDressingV4DTO.inference_config.keep_head": True,
"cVDressingV4DTO.inference_config.keep_hand": True,
"cVDressingV4DTO.inference_config.keep_foot": True,
"cVDressingV4DTO.inference_config.num_steps": 123,
"cVDressingV4DTO.inference_config.keep_upper": True,
"cVDressingV4DTO.inference_config.keep_lower": True,
"cVDressingV4DTO.inference_config.tight_mask": "<string>",
"cVDressingV4DTO.inference_config.p_bbox_iou_ratio": 123,
"cVDressingV4DTO.inference_config.p_bbox_expand_ratio": 123,
"cVDressingV4DTO.inference_config.max_process_side_length": 123,
"cVDressingV4DTO.logoInfo.add_logo": True,
"cVDressingV4DTO.logoInfo.position": 123,
"cVDressingV4DTO.logoInfo.language": 123,
"cVDressingV4DTO.logoInfo.opacity": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'cVDressingV4DTO.model.url': '<string>',
'cVDressingV4DTO.garment.data': [{}],
'cVDressingV4DTO.garment.data[].type': '<string>',
'cVDressingV4DTO.garment.data[].url': '<string>',
'cVDressingV4DTO.req_key': '<string>',
'cVDressingV4DTO.return_url': true,
'cVDressingV4DTO.inference_config.do_sr': true,
'cVDressingV4DTO.inference_config.seed': 123,
'cVDressingV4DTO.inference_config.keep_head': true,
'cVDressingV4DTO.inference_config.keep_hand': true,
'cVDressingV4DTO.inference_config.keep_foot': true,
'cVDressingV4DTO.inference_config.num_steps': 123,
'cVDressingV4DTO.inference_config.keep_upper': true,
'cVDressingV4DTO.inference_config.keep_lower': true,
'cVDressingV4DTO.inference_config.tight_mask': '<string>',
'cVDressingV4DTO.inference_config.p_bbox_iou_ratio': 123,
'cVDressingV4DTO.inference_config.p_bbox_expand_ratio': 123,
'cVDressingV4DTO.inference_config.max_process_side_length': 123,
'cVDressingV4DTO.logoInfo.add_logo': true,
'cVDressingV4DTO.logoInfo.position': 123,
'cVDressingV4DTO.logoInfo.language': 123,
'cVDressingV4DTO.logoInfo.opacity': 123
})
};
fetch('https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cVDressingV4DTO.model.url' => '<string>',
'cVDressingV4DTO.garment.data' => [
[
]
],
'cVDressingV4DTO.garment.data[].type' => '<string>',
'cVDressingV4DTO.garment.data[].url' => '<string>',
'cVDressingV4DTO.req_key' => '<string>',
'cVDressingV4DTO.return_url' => true,
'cVDressingV4DTO.inference_config.do_sr' => true,
'cVDressingV4DTO.inference_config.seed' => 123,
'cVDressingV4DTO.inference_config.keep_head' => true,
'cVDressingV4DTO.inference_config.keep_hand' => true,
'cVDressingV4DTO.inference_config.keep_foot' => true,
'cVDressingV4DTO.inference_config.num_steps' => 123,
'cVDressingV4DTO.inference_config.keep_upper' => true,
'cVDressingV4DTO.inference_config.keep_lower' => true,
'cVDressingV4DTO.inference_config.tight_mask' => '<string>',
'cVDressingV4DTO.inference_config.p_bbox_iou_ratio' => 123,
'cVDressingV4DTO.inference_config.p_bbox_expand_ratio' => 123,
'cVDressingV4DTO.inference_config.max_process_side_length' => 123,
'cVDressingV4DTO.logoInfo.add_logo' => true,
'cVDressingV4DTO.logoInfo.position' => 123,
'cVDressingV4DTO.logoInfo.language' => 123,
'cVDressingV4DTO.logoInfo.opacity' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4"
payload := strings.NewReader("{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "操作成功",
"data": {
"task_id": "task-1234567890"
}
}
万物迁移
万物迁移-服装模式-提交任务
POST
/
prod-api
/
nebula
/
v4
/
api
/
dressing2Submitv4
万物迁移-服装模式-提交任务
curl --request POST \
--url https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4 \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"cVDressingV4DTO.model.url": "<string>",
"cVDressingV4DTO.garment.data": [
{}
],
"cVDressingV4DTO.garment.data[].type": "<string>",
"cVDressingV4DTO.garment.data[].url": "<string>",
"cVDressingV4DTO.req_key": "<string>",
"cVDressingV4DTO.return_url": true,
"cVDressingV4DTO.inference_config.do_sr": true,
"cVDressingV4DTO.inference_config.seed": 123,
"cVDressingV4DTO.inference_config.keep_head": true,
"cVDressingV4DTO.inference_config.keep_hand": true,
"cVDressingV4DTO.inference_config.keep_foot": true,
"cVDressingV4DTO.inference_config.num_steps": 123,
"cVDressingV4DTO.inference_config.keep_upper": true,
"cVDressingV4DTO.inference_config.keep_lower": true,
"cVDressingV4DTO.inference_config.tight_mask": "<string>",
"cVDressingV4DTO.inference_config.p_bbox_iou_ratio": 123,
"cVDressingV4DTO.inference_config.p_bbox_expand_ratio": 123,
"cVDressingV4DTO.inference_config.max_process_side_length": 123,
"cVDressingV4DTO.logoInfo.add_logo": true,
"cVDressingV4DTO.logoInfo.position": 123,
"cVDressingV4DTO.logoInfo.language": 123,
"cVDressingV4DTO.logoInfo.opacity": 123
}
'import requests
url = "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4"
payload = {
"cVDressingV4DTO.model.url": "<string>",
"cVDressingV4DTO.garment.data": [{}],
"cVDressingV4DTO.garment.data[].type": "<string>",
"cVDressingV4DTO.garment.data[].url": "<string>",
"cVDressingV4DTO.req_key": "<string>",
"cVDressingV4DTO.return_url": True,
"cVDressingV4DTO.inference_config.do_sr": True,
"cVDressingV4DTO.inference_config.seed": 123,
"cVDressingV4DTO.inference_config.keep_head": True,
"cVDressingV4DTO.inference_config.keep_hand": True,
"cVDressingV4DTO.inference_config.keep_foot": True,
"cVDressingV4DTO.inference_config.num_steps": 123,
"cVDressingV4DTO.inference_config.keep_upper": True,
"cVDressingV4DTO.inference_config.keep_lower": True,
"cVDressingV4DTO.inference_config.tight_mask": "<string>",
"cVDressingV4DTO.inference_config.p_bbox_iou_ratio": 123,
"cVDressingV4DTO.inference_config.p_bbox_expand_ratio": 123,
"cVDressingV4DTO.inference_config.max_process_side_length": 123,
"cVDressingV4DTO.logoInfo.add_logo": True,
"cVDressingV4DTO.logoInfo.position": 123,
"cVDressingV4DTO.logoInfo.language": 123,
"cVDressingV4DTO.logoInfo.opacity": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'cVDressingV4DTO.model.url': '<string>',
'cVDressingV4DTO.garment.data': [{}],
'cVDressingV4DTO.garment.data[].type': '<string>',
'cVDressingV4DTO.garment.data[].url': '<string>',
'cVDressingV4DTO.req_key': '<string>',
'cVDressingV4DTO.return_url': true,
'cVDressingV4DTO.inference_config.do_sr': true,
'cVDressingV4DTO.inference_config.seed': 123,
'cVDressingV4DTO.inference_config.keep_head': true,
'cVDressingV4DTO.inference_config.keep_hand': true,
'cVDressingV4DTO.inference_config.keep_foot': true,
'cVDressingV4DTO.inference_config.num_steps': 123,
'cVDressingV4DTO.inference_config.keep_upper': true,
'cVDressingV4DTO.inference_config.keep_lower': true,
'cVDressingV4DTO.inference_config.tight_mask': '<string>',
'cVDressingV4DTO.inference_config.p_bbox_iou_ratio': 123,
'cVDressingV4DTO.inference_config.p_bbox_expand_ratio': 123,
'cVDressingV4DTO.inference_config.max_process_side_length': 123,
'cVDressingV4DTO.logoInfo.add_logo': true,
'cVDressingV4DTO.logoInfo.position': 123,
'cVDressingV4DTO.logoInfo.language': 123,
'cVDressingV4DTO.logoInfo.opacity': 123
})
};
fetch('https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cVDressingV4DTO.model.url' => '<string>',
'cVDressingV4DTO.garment.data' => [
[
]
],
'cVDressingV4DTO.garment.data[].type' => '<string>',
'cVDressingV4DTO.garment.data[].url' => '<string>',
'cVDressingV4DTO.req_key' => '<string>',
'cVDressingV4DTO.return_url' => true,
'cVDressingV4DTO.inference_config.do_sr' => true,
'cVDressingV4DTO.inference_config.seed' => 123,
'cVDressingV4DTO.inference_config.keep_head' => true,
'cVDressingV4DTO.inference_config.keep_hand' => true,
'cVDressingV4DTO.inference_config.keep_foot' => true,
'cVDressingV4DTO.inference_config.num_steps' => 123,
'cVDressingV4DTO.inference_config.keep_upper' => true,
'cVDressingV4DTO.inference_config.keep_lower' => true,
'cVDressingV4DTO.inference_config.tight_mask' => '<string>',
'cVDressingV4DTO.inference_config.p_bbox_iou_ratio' => 123,
'cVDressingV4DTO.inference_config.p_bbox_expand_ratio' => 123,
'cVDressingV4DTO.inference_config.max_process_side_length' => 123,
'cVDressingV4DTO.logoInfo.add_logo' => true,
'cVDressingV4DTO.logoInfo.position' => 123,
'cVDressingV4DTO.logoInfo.language' => 123,
'cVDressingV4DTO.logoInfo.opacity' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4"
payload := strings.NewReader("{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://leapx-hub.com/prod-api/nebula/v4/api/dressing2Submitv4")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cVDressingV4DTO.model.url\": \"<string>\",\n \"cVDressingV4DTO.garment.data\": [\n {}\n ],\n \"cVDressingV4DTO.garment.data[].type\": \"<string>\",\n \"cVDressingV4DTO.garment.data[].url\": \"<string>\",\n \"cVDressingV4DTO.req_key\": \"<string>\",\n \"cVDressingV4DTO.return_url\": true,\n \"cVDressingV4DTO.inference_config.do_sr\": true,\n \"cVDressingV4DTO.inference_config.seed\": 123,\n \"cVDressingV4DTO.inference_config.keep_head\": true,\n \"cVDressingV4DTO.inference_config.keep_hand\": true,\n \"cVDressingV4DTO.inference_config.keep_foot\": true,\n \"cVDressingV4DTO.inference_config.num_steps\": 123,\n \"cVDressingV4DTO.inference_config.keep_upper\": true,\n \"cVDressingV4DTO.inference_config.keep_lower\": true,\n \"cVDressingV4DTO.inference_config.tight_mask\": \"<string>\",\n \"cVDressingV4DTO.inference_config.p_bbox_iou_ratio\": 123,\n \"cVDressingV4DTO.inference_config.p_bbox_expand_ratio\": 123,\n \"cVDressingV4DTO.inference_config.max_process_side_length\": 123,\n \"cVDressingV4DTO.logoInfo.add_logo\": true,\n \"cVDressingV4DTO.logoInfo.position\": 123,\n \"cVDressingV4DTO.logoInfo.language\": 123,\n \"cVDressingV4DTO.logoInfo.opacity\": 123\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "操作成功",
"data": {
"task_id": "task-1234567890"
}
}
简介
提交万物迁移-服装模式任务,用于实现虚拟试装功能。认证
string
必填
Bearer Token,如
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
获取方法:依照左侧最上面认证模块的post接口获取,https://docs.leapx-hub.com/cn/leapx-lab-v4/endpoint/get-token请求参数
string
必填
模特图片 URL
object[]
必填
服装素材列表
string
必填
素材类型(如:image)
string
必填
素材 URL
string
请求标识,用于业务侧关联或去重
boolean
是否直接返回结果 URL
boolean
是否开启超分
integer
随机种子
boolean
保留头部
boolean
保留手部
boolean
保留脚部
integer
生成步数
boolean
保留上半身
boolean
保留下半身
string
紧致蒙版
number
人体框 IOU 比例
number
人体框扩展比例
integer
最大处理边长
boolean
是否添加 Logo
integer
Logo 位置
integer
Logo 语言
number
Logo 透明度
示例代码
- cURL示例
- Python示例
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"
}'
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())
响应示例
{
"code": 200,
"msg": "操作成功",
"data": {
"task_id": "task-1234567890"
}
}
⌘I
