3D
Create 3D model generation tasks
Create asynchronous 3D model generation tasks from a text prompt, reference images, or multi-view images.
POST
/
openapi
/
v1
/
3dmodels
/
generations
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"prompt\": \"A ceramic teapot on a white studio background\",",
" \"mesh_quality\": \"standard\",",
" \"topology\": \"triangle\",",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""prompt"": ""A ceramic teapot on a white studio background"",
""mesh_quality"": ""standard"",
""topology"": ""triangle"",
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"}
],
"image_enhancement": True,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"pose\": \"T-pose\",",
" \"mesh_quality\": \"standard\",",
" \"n\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
}
],
""image_enhancement"": true,
""pose"": ""T-pose"",
""mesh_quality"": ""standard"",
""n"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"},
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
],
"image_enhancement": True,
"mesh_quality": "standard",
"target_polycount": 500000,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" },",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"mesh_quality\": \"standard\",",
" \"target_polycount\": 500000",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}.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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
},
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
}
],
""image_enhancement"": true,
""mesh_quality"": ""standard"",
""target_polycount"": 500000
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{"view_type": "front", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
{"view_type": "back", "file_id": "550e8400-e29b-41d4-a716-446655440002"},
{"view_type": "left", "file_id": "550e8400-e29b-41d4-a716-446655440003"},
{"view_type": "right", "file_id": "550e8400-e29b-41d4-a716-446655440004"},
{"view_type": "top", "file_id": "550e8400-e29b-41d4-a716-446655440005"},
{"view_type": "bottom", "file_id": "550e8400-e29b-41d4-a716-446655440006"},
],
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"multi_view_images\": [",
" {",
" \"view_type\": \"front\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" },",
" {",
" \"view_type\": \"back\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440002\"",
" },",
" {",
" \"view_type\": \"left\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440003\"",
" },",
" {",
" \"view_type\": \"right\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440004\"",
" },",
" {",
" \"view_type\": \"top\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440005\"",
" },",
" {",
" \"view_type\": \"bottom\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440006\"",
" }",
" ],",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""multi_view_images"": [
{
""view_type"": ""front"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
},
{
""view_type"": ""back"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440002""
},
{
""view_type"": ""left"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440003""
},
{
""view_type"": ""right"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440004""
},
{
""view_type"": ""top"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440005""
},
{
""view_type"": ""bottom"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440006""
}
],
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"id": "normal-3d-c50fe63e-699d-4d61-93f5-2099ab159d6d",
"status": "queued",
"created_at": 1784044800,
"mode": "batch_image_to_3d",
"model": "dreamtech/neural4d-2.5",
"data": [
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb6",
"status": "queued",
"created_at": 1784044800
},
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb7",
"status": "queued",
"created_at": 1784044800
}
],
"usage": {
"credits": 60
}
}
{
"error": {
"code": "file_rejected",
"message": "The uploaded image did not pass content validation"
}
}
{
"error": {
"code": "invalid_content_type",
"message": "Content-Type must be application/json"
}
}
{
"error": {
"code": "invalid_file_id",
"message": "Request body validation failed"
}
}
{
"error": {
"code": "invalid_file_type",
"message": "Unsupported reference type"
}
}
{
"error": {
"code": "invalid_generation_request",
"message": "Invalid 3D generation request"
}
}
{
"error": {
"code": "invalid_multi_view_images",
"message": "Request body validation failed",
"details": [
{
"field": "/multi_view_images",
"rule": "custom",
"message": "Views must include front and back without duplicates"
}
]
}
}
{
"error": {
"code": "invalid_prompt",
"message": "Request body validation failed",
"details": [
{
"field": "/prompt",
"rule": "too_small",
"message": "String must contain at least 1 character(s)"
}
]
}
}
{
"error": {
"code": "invalid_reference_source",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0",
"rule": "custom",
"message": "Provide exactly one of file_id or url"
}
]
}
}
{
"error": {
"code": "invalid_reference_url",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0/url",
"rule": "custom",
"message": "url must be an HTTPS URL without embedded credentials"
}
]
}
}
{
"error": {
"code": "invalid_request",
"message": "Request body validation failed",
"details": [
{
"field": "/model",
"rule": "invalid_enum_value",
"message": "Invalid enum value. Expected 'dreamtech/neural4d-2.5', received 'unsupported-model'"
}
]
}
}
{
"error": {
"code": "invalid_target_polycount",
"message": "target_polycount must be between 100000 and 500000 in steps of 1000"
}
}
{
"error": {
"code": "unsafe_reference_url",
"message": "Reference URL is not allowed"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "A Bearer API key is required"
}
}
{
"error": {
"code": "insufficient_credits",
"message": "User insufficient points, only have 0 now"
}
}
{
"error": {
"code": "subscription_required",
"message": "OpenAPI v1 is available to subscribed users only"
}
}
{
"error": {
"code": "reference_fetch_timeout",
"message": "Reference host resolution timed out"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 20 MB"
}
}
{
"error": {
"code": "invalid_reference_file",
"message": "Reference file is empty"
}
}
{
"error": {
"code": "invalid_reference_file_type",
"message": "Reference response Content-Type does not match its file content"
}
}
{
"error": {
"code": "reference_fetch_failed",
"message": "Reference host could not be resolved"
}
}
{
"error": {
"code": "reference_redirect_limit",
"message": "Reference URL redirected too many times"
}
}
{
"error": {
"code": "generation_limit_exceeded",
"message": "Generation limit exceeded"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated interval."
}
}
{
"error": {
"code": "reference_import_busy",
"message": "Too many reference files are being imported"
}
}
{
"error": {
"code": "internal_error",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "file_moderation_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "rate_limit_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 10 MB"
}
}
Authorizations
Body application/json
- Text-to-3D
- Single-image-to-3D
- Batch image-to-3D
- Multi-view-to-3D
Text describing the model to generate. Must not be empty and is limited to 500 characters.
Target face count. Triangle
standard supports 100,000–500,000 and defaults to 500,000. Triangle high and extra_high support 500,000–1,000,000 and default to 1,000,000. Quad supports 1,000–100,000 and defaults to 50,000. Triangle counts increase in steps of 1,000; quad counts increase in steps of 100.A reference image array containing exactly one item. Only JPG, JPEG, PNG, and WEBP are supported, with a maximum size of 20 MiB per image. The item must contain either
file_id or url, but not both. Do not combine it with multi_view_images.The size limit applies to both file_id and url.Hide Child attributes
Hide Child attributes
Whether to enhance the input image before 3D model generation to help improve results. Set to
true to enable. Disabled by default.Target face count. Triangle
standard supports 100,000–500,000 and defaults to 500,000. Triangle high and extra_high support 500,000–1,000,000 and default to 1,000,000. Quad supports 1,000–100,000 and defaults to 50,000. Triangle counts increase in steps of 1,000; quad counts increase in steps of 100.An array of 2–10 reference images. Only JPG, JPEG, PNG, and WEBP are supported, with a maximum size of 20 MiB per image. Each image generates one model. Each item must contain either
file_id or url, but not both. Do not combine it with multi_view_images.The size limit applies to both file_id and url.Hide Child attributes
Hide Child attributes
Whether to enhance each input image in the batch before 3D model generation to help improve results. Set to
true to enable. Disabled by default.Target face count. Triangle
standard supports 100,000–500,000 and defaults to 500,000. Triangle high and extra_high support 500,000–1,000,000 and default to 1,000,000. Quad supports 1,000–100,000 and defaults to 50,000. Triangle counts increase in steps of 1,000; quad counts increase in steps of 100.An array of 2–6 multi-view reference images. Supported formats are JPG, JPEG, PNG, and WEBP, with a maximum size of 10 MiB per image. It must include
front and back; other views are optional and each view may appear at most once. Each item must contain either file_id or url, but not both. Do not combine it with input_references.The size limit applies to both file_id and url. This mode always uses a triangle mesh with high quality. Do not pass mesh_quality, topology, or pose.Hide Child attributes
Hide Child attributes
The view shown in the image. Available options:
front, back, left, right, top, and bottom.The file
id returned by POST /openapi/v1/files. Required when url is omitted.Target face count. Multi-view generation uses a
high-quality triangle mesh. The range is 500,000–1,000,000, the default is 500,000, and counts increase in steps of 1,000.curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"prompt\": \"A ceramic teapot on a white studio background\",",
" \"mesh_quality\": \"standard\",",
" \"topology\": \"triangle\",",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""prompt"": ""A ceramic teapot on a white studio background"",
""mesh_quality"": ""standard"",
""topology"": ""triangle"",
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"}
],
"image_enhancement": True,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"pose\": \"T-pose\",",
" \"mesh_quality\": \"standard\",",
" \"n\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
}
],
""image_enhancement"": true,
""pose"": ""T-pose"",
""mesh_quality"": ""standard"",
""n"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"},
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
],
"image_enhancement": True,
"mesh_quality": "standard",
"target_polycount": 500000,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" },",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"mesh_quality\": \"standard\",",
" \"target_polycount\": 500000",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}.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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
},
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
}
],
""image_enhancement"": true,
""mesh_quality"": ""standard"",
""target_polycount"": 500000
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{"view_type": "front", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
{"view_type": "back", "file_id": "550e8400-e29b-41d4-a716-446655440002"},
{"view_type": "left", "file_id": "550e8400-e29b-41d4-a716-446655440003"},
{"view_type": "right", "file_id": "550e8400-e29b-41d4-a716-446655440004"},
{"view_type": "top", "file_id": "550e8400-e29b-41d4-a716-446655440005"},
{"view_type": "bottom", "file_id": "550e8400-e29b-41d4-a716-446655440006"},
],
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"multi_view_images\": [",
" {",
" \"view_type\": \"front\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" },",
" {",
" \"view_type\": \"back\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440002\"",
" },",
" {",
" \"view_type\": \"left\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440003\"",
" },",
" {",
" \"view_type\": \"right\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440004\"",
" },",
" {",
" \"view_type\": \"top\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440005\"",
" },",
" {",
" \"view_type\": \"bottom\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440006\"",
" }",
" ],",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""multi_view_images"": [
{
""view_type"": ""front"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
},
{
""view_type"": ""back"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440002""
},
{
""view_type"": ""left"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440003""
},
{
""view_type"": ""right"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440004""
},
{
""view_type"": ""top"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440005""
},
{
""view_type"": ""bottom"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440006""
}
],
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
Identify errors byerror.code.
- 202
- 400
- 401
- 403
- 408
- 413
- 415
- 422
- 429
- 500
- 503
Successful requests return
202 Accepted, a batch task ID, and generated child items. A batch image request creates one child item per image. For example, two images produce two items in data.Generation mode. Available options:
text_to_3d (text), image_to_3d (single image), batch_image_to_3d (batch images), multi_view_to_3d (multi-view images).Generated child items created by this request.
Hide Child attributes
Hide Child attributes
Child task status. Available options:
queued, processing, succeeded, failed.Failure details when asynchronous processing fails.
Invalid request.
Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
file_rejected: The reference image did not pass content validation.invalid_content_type: Content-Type must be application/json.invalid_file_id: The uploaded file ID is invalid or unavailable.invalid_file_type: The uploaded file is not a supported reference image.invalid_generation_request: The requested 3D generation is not supported.invalid_multi_view_images: Multi-view images must include front and back without duplicate views.invalid_prompt: The prompt is empty, exceeds 500 characters, or fails content validation.invalid_reference_source: Each reference must contain exactly one of file_id or url.invalid_reference_url: The reference URL format or length is invalid.invalid_request: Request parameters are invalid.invalid_target_polycount: The target polygon count does not match the allowed range or step.unsafe_reference_url: The reference URL or redirect destination is not allowed.
Authentication failed.
Subscription or credit requirements not met.
Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
insufficient_credits: The available credits are insufficient.subscription_required: An active paid subscription is required.
Reference download timed out.
Reference image too large.
Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
reference_too_large: The reference image exceeds the size limit for its use. Single-image and batch references allow 20 MiB per image; multi-view allows 10 MiB. File IDs and URLs use the same limits.
Invalid or unsupported reference image.
Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
invalid_reference_file: The reference image is empty or its content cannot be inspected.invalid_reference_file_type: The reference image format or Content-Type is unsupported or inconsistent.
Reference download failed.
Structured error details.
Limit exceeded.When the response includes
Retry-After, wait the indicated number of seconds before retrying.Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
generation_limit_exceeded: A generation quota or concurrency limit was reached.rate_limit_exceeded: The request rate limit was reached.reference_import_busy: Reference import is busy; retry after the indicated interval.
Internal error.When
error.details.registration_failed is true, your generation task is already queued but task registration failed. A complete submission returns task_registration_failed; a partial 3D submission keeps its original error code.
error.details.task retains the task ID, UUIDs, and known credit usage. submission_accepted is true and retryable is false.
Do not resubmit the generation request, as doing so can charge you again. Task lookup may return 404 until registration is repaired.Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
internal_error: An internal error occurred.task_registration_failed: Your task was queued but registration failed. Do not resubmit it.
Service unavailable.
Structured error details.
Hide Child attributes
Hide Child attributes
Stable machine-readable error code.
file_moderation_unavailable: Image content validation is temporarily unavailable.prompt_moderation_unavailable: Prompt content validation is temporarily unavailable.rate_limit_unavailable: The rate-limit service is temporarily unavailable.
{
"id": "normal-3d-c50fe63e-699d-4d61-93f5-2099ab159d6d",
"status": "queued",
"created_at": 1784044800,
"mode": "batch_image_to_3d",
"model": "dreamtech/neural4d-2.5",
"data": [
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb6",
"status": "queued",
"created_at": 1784044800
},
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb7",
"status": "queued",
"created_at": 1784044800
}
],
"usage": {
"credits": 60
}
}
{
"error": {
"code": "file_rejected",
"message": "The uploaded image did not pass content validation"
}
}
{
"error": {
"code": "invalid_content_type",
"message": "Content-Type must be application/json"
}
}
{
"error": {
"code": "invalid_file_id",
"message": "Request body validation failed"
}
}
{
"error": {
"code": "invalid_file_type",
"message": "Unsupported reference type"
}
}
{
"error": {
"code": "invalid_generation_request",
"message": "Invalid 3D generation request"
}
}
{
"error": {
"code": "invalid_multi_view_images",
"message": "Request body validation failed",
"details": [
{
"field": "/multi_view_images",
"rule": "custom",
"message": "Views must include front and back without duplicates"
}
]
}
}
{
"error": {
"code": "invalid_prompt",
"message": "Request body validation failed",
"details": [
{
"field": "/prompt",
"rule": "too_small",
"message": "String must contain at least 1 character(s)"
}
]
}
}
{
"error": {
"code": "invalid_reference_source",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0",
"rule": "custom",
"message": "Provide exactly one of file_id or url"
}
]
}
}
{
"error": {
"code": "invalid_reference_url",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0/url",
"rule": "custom",
"message": "url must be an HTTPS URL without embedded credentials"
}
]
}
}
{
"error": {
"code": "invalid_request",
"message": "Request body validation failed",
"details": [
{
"field": "/model",
"rule": "invalid_enum_value",
"message": "Invalid enum value. Expected 'dreamtech/neural4d-2.5', received 'unsupported-model'"
}
]
}
}
{
"error": {
"code": "invalid_target_polycount",
"message": "target_polycount must be between 100000 and 500000 in steps of 1000"
}
}
{
"error": {
"code": "unsafe_reference_url",
"message": "Reference URL is not allowed"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "A Bearer API key is required"
}
}
{
"error": {
"code": "insufficient_credits",
"message": "User insufficient points, only have 0 now"
}
}
{
"error": {
"code": "subscription_required",
"message": "OpenAPI v1 is available to subscribed users only"
}
}
{
"error": {
"code": "reference_fetch_timeout",
"message": "Reference host resolution timed out"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 20 MB"
}
}
{
"error": {
"code": "invalid_reference_file",
"message": "Reference file is empty"
}
}
{
"error": {
"code": "invalid_reference_file_type",
"message": "Reference response Content-Type does not match its file content"
}
}
{
"error": {
"code": "reference_fetch_failed",
"message": "Reference host could not be resolved"
}
}
{
"error": {
"code": "reference_redirect_limit",
"message": "Reference URL redirected too many times"
}
}
{
"error": {
"code": "generation_limit_exceeded",
"message": "Generation limit exceeded"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated interval."
}
}
{
"error": {
"code": "reference_import_busy",
"message": "Too many reference files are being imported"
}
}
{
"error": {
"code": "internal_error",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "file_moderation_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "rate_limit_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 10 MB"
}
}
⌘I
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"prompt\": \"A ceramic teapot on a white studio background\",",
" \"mesh_quality\": \"standard\",",
" \"topology\": \"triangle\",",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"prompt": "A ceramic teapot on a white studio background",
"mesh_quality": "standard",
"topology": "triangle",
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""prompt"": ""A ceramic teapot on a white studio background"",
""mesh_quality"": ""standard"",
""topology"": ""triangle"",
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"}
],
"image_enhancement": True,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"pose\": \"T-pose\",",
" \"mesh_quality\": \"standard\",",
" \"n\": 2",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"image_enhancement": true,
"pose": "T-pose",
"mesh_quality": "standard",
"n": 2
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
}
],
""image_enhancement"": true,
""pose"": ""T-pose"",
""mesh_quality"": ""standard"",
""n"": 2
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"input_references": [
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440000"},
{"type": "image", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
],
"image_enhancement": True,
"mesh_quality": "standard",
"target_polycount": 500000,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"input_references\": [",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440000\"",
" },",
" {",
" \"type\": \"image\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" }",
" ],",
" \"image_enhancement\": true,",
" \"mesh_quality\": \"standard\",",
" \"target_polycount\": 500000",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}.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'
{
"model": "dreamtech/neural4d-2.5",
"input_references": [
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440000"
},
{
"type": "image",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
}
],
"image_enhancement": true,
"mesh_quality": "standard",
"target_polycount": 500000
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""input_references"": [
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440000""
},
{
""type"": ""image"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
}
],
""image_enhancement"": true,
""mesh_quality"": ""standard"",
""target_polycount"": 500000
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl --request POST \
--url https://api.neural4d.com/openapi/v1/3dmodels/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}'
import requests
response = requests.post(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{"view_type": "front", "file_id": "550e8400-e29b-41d4-a716-446655440001"},
{"view_type": "back", "file_id": "550e8400-e29b-41d4-a716-446655440002"},
{"view_type": "left", "file_id": "550e8400-e29b-41d4-a716-446655440003"},
{"view_type": "right", "file_id": "550e8400-e29b-41d4-a716-446655440004"},
{"view_type": "top", "file_id": "550e8400-e29b-41d4-a716-446655440005"},
{"view_type": "bottom", "file_id": "550e8400-e29b-41d4-a716-446655440006"},
],
"target_polycount": 500000,
"with_texture": False,
"with_pbr": False,
"n": 1,
},
)
print(response.json())
const response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
const response: Response = await fetch(
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
{
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
})
}
);
console.log(await response.json());
import java.net.URI;
import java.net.http.*;
String payload = String.join("\n",
"{",
" \"model\": \"dreamtech/neural4d-2.5\",",
" \"multi_view_images\": [",
" {",
" \"view_type\": \"front\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440001\"",
" },",
" {",
" \"view_type\": \"back\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440002\"",
" },",
" {",
" \"view_type\": \"left\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440003\"",
" },",
" {",
" \"view_type\": \"right\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440004\"",
" },",
" {",
" \"view_type\": \"top\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440005\"",
" },",
" {",
" \"view_type\": \"bottom\",",
" \"file_id\": \"550e8400-e29b-41d4-a716-446655440006\"",
" }",
" ],",
" \"target_polycount\": 500000,",
" \"with_texture\": false,",
" \"with_pbr\": false,",
" \"n\": 1",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.neural4d.com/openapi/v1/3dmodels/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.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(`{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}`)
req, _ := http.NewRequest(
"POST",
"https://api.neural4d.com/openapi/v1/3dmodels/generations",
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://api.neural4d.com/openapi/v1/3dmodels/generations")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = {
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}.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'
{
"model": "dreamtech/neural4d-2.5",
"multi_view_images": [
{
"view_type": "front",
"file_id": "550e8400-e29b-41d4-a716-446655440001"
},
{
"view_type": "back",
"file_id": "550e8400-e29b-41d4-a716-446655440002"
},
{
"view_type": "left",
"file_id": "550e8400-e29b-41d4-a716-446655440003"
},
{
"view_type": "right",
"file_id": "550e8400-e29b-41d4-a716-446655440004"
},
{
"view_type": "top",
"file_id": "550e8400-e29b-41d4-a716-446655440005"
},
{
"view_type": "bottom",
"file_id": "550e8400-e29b-41d4-a716-446655440006"
}
],
"target_polycount": 500000,
"with_texture": false,
"with_pbr": false,
"n": 1
}
JSON;
$ch = curl_init("https://api.neural4d.com/openapi/v1/3dmodels/generations");
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 = @"{
""model"": ""dreamtech/neural4d-2.5"",
""multi_view_images"": [
{
""view_type"": ""front"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440001""
},
{
""view_type"": ""back"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440002""
},
{
""view_type"": ""left"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440003""
},
{
""view_type"": ""right"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440004""
},
{
""view_type"": ""top"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440005""
},
{
""view_type"": ""bottom"",
""file_id"": ""550e8400-e29b-41d4-a716-446655440006""
}
],
""target_polycount"": 500000,
""with_texture"": false,
""with_pbr"": false,
""n"": 1
}";
using var client = new HttpClient();
using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.neural4d.com/openapi/v1/3dmodels/generations"
);
request.Headers.TryAddWithoutValidation("Authorization", "Bearer <token>");
request.Content = new StringContent(
payload,
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"id": "normal-3d-c50fe63e-699d-4d61-93f5-2099ab159d6d",
"status": "queued",
"created_at": 1784044800,
"mode": "batch_image_to_3d",
"model": "dreamtech/neural4d-2.5",
"data": [
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb6",
"status": "queued",
"created_at": 1784044800
},
{
"uuid": "72e30159-a242-4491-a67c-2ad0cfc9efb7",
"status": "queued",
"created_at": 1784044800
}
],
"usage": {
"credits": 60
}
}
{
"error": {
"code": "file_rejected",
"message": "The uploaded image did not pass content validation"
}
}
{
"error": {
"code": "invalid_content_type",
"message": "Content-Type must be application/json"
}
}
{
"error": {
"code": "invalid_file_id",
"message": "Request body validation failed"
}
}
{
"error": {
"code": "invalid_file_type",
"message": "Unsupported reference type"
}
}
{
"error": {
"code": "invalid_generation_request",
"message": "Invalid 3D generation request"
}
}
{
"error": {
"code": "invalid_multi_view_images",
"message": "Request body validation failed",
"details": [
{
"field": "/multi_view_images",
"rule": "custom",
"message": "Views must include front and back without duplicates"
}
]
}
}
{
"error": {
"code": "invalid_prompt",
"message": "Request body validation failed",
"details": [
{
"field": "/prompt",
"rule": "too_small",
"message": "String must contain at least 1 character(s)"
}
]
}
}
{
"error": {
"code": "invalid_reference_source",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0",
"rule": "custom",
"message": "Provide exactly one of file_id or url"
}
]
}
}
{
"error": {
"code": "invalid_reference_url",
"message": "Request body validation failed",
"details": [
{
"field": "/input_references/0/url",
"rule": "custom",
"message": "url must be an HTTPS URL without embedded credentials"
}
]
}
}
{
"error": {
"code": "invalid_request",
"message": "Request body validation failed",
"details": [
{
"field": "/model",
"rule": "invalid_enum_value",
"message": "Invalid enum value. Expected 'dreamtech/neural4d-2.5', received 'unsupported-model'"
}
]
}
}
{
"error": {
"code": "invalid_target_polycount",
"message": "target_polycount must be between 100000 and 500000 in steps of 1000"
}
}
{
"error": {
"code": "unsafe_reference_url",
"message": "Reference URL is not allowed"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "A Bearer API key is required"
}
}
{
"error": {
"code": "insufficient_credits",
"message": "User insufficient points, only have 0 now"
}
}
{
"error": {
"code": "subscription_required",
"message": "OpenAPI v1 is available to subscribed users only"
}
}
{
"error": {
"code": "reference_fetch_timeout",
"message": "Reference host resolution timed out"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 20 MB"
}
}
{
"error": {
"code": "invalid_reference_file",
"message": "Reference file is empty"
}
}
{
"error": {
"code": "invalid_reference_file_type",
"message": "Reference response Content-Type does not match its file content"
}
}
{
"error": {
"code": "reference_fetch_failed",
"message": "Reference host could not be resolved"
}
}
{
"error": {
"code": "reference_redirect_limit",
"message": "Reference URL redirected too many times"
}
}
{
"error": {
"code": "generation_limit_exceeded",
"message": "Generation limit exceeded"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated interval."
}
}
{
"error": {
"code": "reference_import_busy",
"message": "Too many reference files are being imported"
}
}
{
"error": {
"code": "internal_error",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "file_moderation_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "rate_limit_unavailable",
"message": "An internal error occurred"
}
}
{
"error": {
"code": "reference_too_large",
"message": "Reference file must not exceed 10 MB"
}
}