Model management
Retrieve model
Retrieve a generated model by UUID.
POST
/
api
/
retrieveModel
curl --request POST \
--url https://alb.neural4d.com:3000/api/retrieveModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/retrieveModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/retrieveModel",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/retrieveModel"))
.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
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/retrieveModel")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/retrieveModel");
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"": ""f47ac10b-58cc-4372-a567-0e02b2c3d479""
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/retrieveModel"
);
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());
{
"codeStatus": 0,
"message": "Generate model success",
"modelUrl": "https://s3.neural4d.com/afsafr24.glb?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"imageUrl": "https://s3.neural4d.com/afsafr24.jpg?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"prompts": "a cute bird",
"createdAt": "2024-11-07T05:59:40.000Z",
"sourcePage": "createModel"
}
Authorizations
Use the bearer token provided through the Neural4D website.
Body application/json
Unique job or model identifier returned by a previous create endpoint.Example:
"f47ac10b-58cc-4372-a567-0e02b2c3d479".curl --request POST \
--url https://alb.neural4d.com:3000/api/retrieveModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/retrieveModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/retrieveModel",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/retrieveModel"))
.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
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/retrieveModel")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/retrieveModel");
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"": ""f47ac10b-58cc-4372-a567-0e02b2c3d479""
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/retrieveModel"
);
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
Model retrieval result
Result status.
0 means completed, 1 means generating, -1 means the token is invalid or expired, -2 means the UUID does not exist, and -3 means generation failed.Available options: -3, -2, -1, 0, 1.{
"codeStatus": 0,
"message": "Generate model success",
"modelUrl": "https://s3.neural4d.com/afsafr24.glb?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"imageUrl": "https://s3.neural4d.com/afsafr24.jpg?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"prompts": "a cute bird",
"createdAt": "2024-11-07T05:59:40.000Z",
"sourcePage": "createModel"
}
⌘I
curl --request POST \
--url https://alb.neural4d.com:3000/api/retrieveModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'
import requests
response = requests.request(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"},
)
print(response.json())
const response = await fetch("https://alb.neural4d.com:3000/api/retrieveModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
});
const data = await response.json();
console.log(data);
const response: Response = await fetch(
"https://alb.neural4d.com:3000/api/retrieveModel",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
})
}
);
const data = await response.json();
console.log(data);
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"uuid\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://alb.neural4d.com:3000/api/retrieveModel"))
.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}`)
req, _ := http.NewRequest(
"POST",
"https://alb.neural4d.com:3000/api/retrieveModel",
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/retrieveModel")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}.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": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
JSON;
$ch = curl_init("https://alb.neural4d.com:3000/api/retrieveModel");
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"": ""f47ac10b-58cc-4372-a567-0e02b2c3d479""
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://alb.neural4d.com:3000/api/retrieveModel"
);
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());
{
"codeStatus": 0,
"message": "Generate model success",
"modelUrl": "https://s3.neural4d.com/afsafr24.glb?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"imageUrl": "https://s3.neural4d.com/afsafr24.jpg?AWSAccessKeyId=AKIDodI2mK61Xsfasfsfsa",
"prompts": "a cute bird",
"createdAt": "2024-11-07T05:59:40.000Z",
"sourcePage": "createModel"
}