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
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
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2,
},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/convertToFormat", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/convertToFormat",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",",
" \"modelType\": \"fbx\",",
" \"modelSize\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/convertToFormat"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
payload,
)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
bodyBytes, _ := io.ReadAll(resp.Body)
fmt.Println(string(bodyBytes))
}
require "net/http"
require "json"
uri = URI("https://alb.neural4d.com:3000/api/convertToFormat")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}.to_json
response = Net::HTTP.start(
uri.hostname,
uri.port,
use_ssl: uri.scheme == "https"
) do |http|
http.request(request)
end
puts response.body
<?php
$payload = <<<'JSON'
{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/convertToFormat");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
using System.Net.Http;
using System.Text;
var payload = @"{
""uuid"": ""2dee04d4-f6e5-4fdf-b626-0f814e24db84"",
""modelType"": ""fbx"",
""modelSize"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/convertToFormat"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Headers.TryAddWithoutValidation("Content-Type", "application/json");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"statusType": 1,
"modelSize": 2,
"message": "The specified model format does not exist, converting now..."
}
{
"statusType": 0,
"modelUrl": "https://s3.neural4d.com/fbx_54078587-7fdd-49c5-9fe6-317d22f27098.zip?sig=example",
"scaleNumber": 4,
"message": "Format conversion has been completed and is ready for download."
}
{
"statusType": -1,
"message": "Model not found for this UUID (0efc2b3-57e1-4813-90c6-419de96e785e). Please check if the UUID is correct."
}
Authorizations
Use the bearer token provided through the Neural4D website.
Body application/json
Target model size in millimeters. The value must be greater than 1.Required range:
2 <= x <= infinity.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
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2,
},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/convertToFormat", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/convertToFormat",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",",
" \"modelType\": \"fbx\",",
" \"modelSize\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/convertToFormat"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
payload,
)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
bodyBytes, _ := io.ReadAll(resp.Body)
fmt.Println(string(bodyBytes))
}
require "net/http"
require "json"
uri = URI("https://alb.neural4d.com:3000/api/convertToFormat")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}.to_json
response = Net::HTTP.start(
uri.hostname,
uri.port,
use_ssl: uri.scheme == "https"
) do |http|
http.request(request)
end
puts response.body
<?php
$payload = <<<'JSON'
{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/convertToFormat");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
using System.Net.Http;
using System.Text;
var payload = @"{
""uuid"": ""2dee04d4-f6e5-4fdf-b626-0f814e24db84"",
""modelType"": ""fbx"",
""modelSize"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/convertToFormat"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Headers.TryAddWithoutValidation("Content-Type", "application/json");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
- 200
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.{
"statusType": 1,
"modelSize": 2,
"message": "The specified model format does not exist, converting now..."
}
{
"statusType": 0,
"modelUrl": "https://s3.neural4d.com/fbx_54078587-7fdd-49c5-9fe6-317d22f27098.zip?sig=example",
"scaleNumber": 4,
"message": "Format conversion has been completed and is ready for download."
}
{
"statusType": -1,
"message": "Model not found for this UUID (0efc2b3-57e1-4813-90c6-419de96e785e). Please check if the UUID is correct."
}
⌘I
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
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2,
},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/convertToFormat", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/convertToFormat",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"2dee04d4-f6e5-4fdf-b626-0f814e24db84\",",
" \"modelType\": \"fbx\",",
" \"modelSize\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/convertToFormat"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/convertToFormat",
payload,
)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
bodyBytes, _ := io.ReadAll(resp.Body)
fmt.Println(string(bodyBytes))
}
require "net/http"
require "json"
uri = URI("https://alb.neural4d.com:3000/api/convertToFormat")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}.to_json
response = Net::HTTP.start(
uri.hostname,
uri.port,
use_ssl: uri.scheme == "https"
) do |http|
http.request(request)
end
puts response.body
<?php
$payload = <<<'JSON'
{
"uuid": "2dee04d4-f6e5-4fdf-b626-0f814e24db84",
"modelType": "fbx",
"modelSize": 2
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/convertToFormat");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
using System.Net.Http;
using System.Text;
var payload = @"{
""uuid"": ""2dee04d4-f6e5-4fdf-b626-0f814e24db84"",
""modelType"": ""fbx"",
""modelSize"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/convertToFormat"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Headers.TryAddWithoutValidation("Content-Type", "application/json");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"statusType": 1,
"modelSize": 2,
"message": "The specified model format does not exist, converting now..."
}
{
"statusType": 0,
"modelUrl": "https://s3.neural4d.com/fbx_54078587-7fdd-49c5-9fe6-317d22f27098.zip?sig=example",
"scaleNumber": 4,
"message": "Format conversion has been completed and is ready for download."
}
{
"statusType": -1,
"message": "Model not found for this UUID (0efc2b3-57e1-4813-90c6-419de96e785e). Please check if the UUID is correct."
}