Model management
Convert model format
Convert a generated model into a target format and return the download URL. This operation consumes 10 points.
POST
/
api
/
convertToFormat
Convert model format
curl --request POST \
--url https://alb.neural4d.com:3000/api/convertToFormat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch('https://alb.neural4d.com:3000/api/convertToFormat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alb.neural4d.com:3000/api/convertToFormat"
payload = {
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://alb.neural4d.com:3000/api/convertToFormat';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch('https://alb.neural4d.com:3000/api/convertToFormat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alb.neural4d.com:3000/api/convertToFormat"
payload := strings.NewReader("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://alb.neural4d.com:3000/api/convertToFormat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://alb.neural4d.com:3000/api/convertToFormat");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "https://alb.neural4d.com:3000/api/convertToFormat",
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([
'uuid' => '2dee04d4-f6e5-4fdf-b626-0f814e24db84',
'modelType' => 'fbx',
'modelSize' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"statusType": 1,
"modelSize": 2,
"message": "The specified model format does not exist, converting now..."
}
Authorizations
Use the bearer token provided through the Neural4D website.
Body
application/json
Response
200 - application/json
Format conversion result
Conversion status. 0 means completed, 1 means still converting, and -1 means the request is invalid or the conversion failed.
Available options:
-1, 0, 1 Conversion status message.
Download URL for the converted model when available.
Returned scale number when the conversion finishes.
Echoed model size from the request or intermediate response.
⌘I
Convert model format
curl --request POST \
--url https://alb.neural4d.com:3000/api/convertToFormat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch('https://alb.neural4d.com:3000/api/convertToFormat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alb.neural4d.com:3000/api/convertToFormat"
payload = {
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://alb.neural4d.com:3000/api/convertToFormat';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({uuid: '2dee04d4-f6e5-4fdf-b626-0f814e24db84', modelType: 'fbx', modelSize: 2})
};
fetch('https://alb.neural4d.com:3000/api/convertToFormat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alb.neural4d.com:3000/api/convertToFormat"
payload := strings.NewReader("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://alb.neural4d.com:3000/api/convertToFormat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://alb.neural4d.com:3000/api/convertToFormat");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",\n \"modelType\": \"fbx\",\n \"modelSize\": 2\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "https://alb.neural4d.com:3000/api/convertToFormat",
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([
'uuid' => '2dee04d4-f6e5-4fdf-b626-0f814e24db84',
'modelType' => 'fbx',
'modelSize' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"statusType": 1,
"modelSize": 2,
"message": "The specified model format does not exist, converting now..."
}

