The Neural4D API provides developers with programmatic access to the Direct3D-S2 engine (NeurIPS 2025). This engine generates watertight meshes directly from text or image prompts, bypassing traditional polygon sculpting workflows. The core algorithm employs a Spatial Sparse Attention (SSA) mechanism to achieve high geometric fidelity, producing clean quad-dominant meshes up to 2048³ voxel resolution.
Neural4D API is a language-agnostic REST interface, meaning it can be integrated into any automated software applications using HTTP requests (Node.js, C#, Python, etc.). Before starting, ensure you get your Neural4D API Key. The API separates base mesh generation from texture map calculation. Base mesh creation takes approximately 90 seconds. You can explore how to implement this in a Python 3D model generator API or a generic Text to 3D API integration. Below is an integration example using Python:
import requests
import time
API_KEY = "your_api_key_here"
GENERATE_URL = "https://alb.neural4d.com:3000/api/generateModelWithText"
RETRIEVE_URL = "https://alb.neural4d.com:3000/api/retrieveModel"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json;charset=utf-8"
}
# Generate a watertight mesh with clean topology
payload = {
"prompt": "mechanical gear, industrial grade, quad-dominant",
"modelCount": 1,
"disablePbr": 0
}
response = requests.post(GENERATE_URL, json=payload, headers=headers)
data = response.json()
uuids = data.get("uuids", [])
if not uuids:
print("Failed to start generation.")
else:
target_uuid = uuids[0]
print(f"Task created with UUID: {target_uuid}. Processing mesh generation...")
# Polling for task status (Base mesh: ~90s, Textures: ~30s additional)
while True:
status_resp = requests.post(RETRIEVE_URL, json={"uuid": target_uuid}, headers=headers)
result = status_resp.json()
code_status = result.get("codeStatus")
if code_status == 0:
print(f"Generation successful. Download GLB at: {result.get('modelUrl')}")
break
elif code_status in [-1, -2, -3]:
print(f"Generation failed. Status Code: {code_status}")
break
time.sleep(10)
The same Bearer token also unlocks media generation endpoints. Picture and video tasks
accept a text prompt with up to six reference images, submit one to four jobs per request,
and use multipart/form-data for uploads instead of application/json. You poll the result
with the queryGenerationResult endpoint, which returns a download URL once the
task reaches the completed status.
| Endpoint | Purpose | Key Parameters |
|---|---|---|
| /api/createNormalPicture | Generate images from a text prompt with optional reference images | prompt, images (up to 6), modelKey (default image-2), aspectRatio (1:1, 16:9, 9:16, 4:3, 3:4), jobNum (1 to 4) |
| /api/createNormalVideo | Generate videos from a text prompt with optional reference images | prompt, images (up to 6), aspectRatio (default 16:9), duration (4 to 15 s, default 5), resolution (480p, 720p, 1080p, default 720p), jobNum (1 to 4) |
| /api/queryGenerationResult | Poll the result of a picture or video task by UUID | uuid; returns data.status (completed, queued, processing, failed), data.resultType (image, video), data.resultUrl |
Poll queryGenerationResult with the UUID returned by the create endpoint until
data.status becomes completed, then download the asset from
data.resultUrl. Unlike generation, this query does not consume points.
Use the query parameters below to customize mesh and texture generation outputs. For advanced configurations and endpoint details, please refer to the official generateModelWithText API reference.
| Parameter | Type | Description & Range |
|---|---|---|
| prompt | String | The description of the 3D model. Be specific about geometric features (e.g., watertight, quad-dominant). |
| modelCount | Integer | The number of models planned for generation. The default value is 4. |
| disablePbr | Integer | PBR feature toggle. 0 = PBR enabled, 1 = PBR disabled. The default value is 0. |
| onlyGenerateMesh | Boolean | Generate a base mesh only, without PBR textures. The default value is false. |
| mesh_quality | String | Mesh density target: standard, high, or extra_high. The default value is high. |
| faceNum | Integer | Target face count. For standard quality, 100,000 to 500,000 (default 500,000). For high and extra_high, 500,000 to 1,000,000 (default 1,000,000). |
Integrating the 3D generation API into developer pipelines supports multiple industries. You can learn more about its impact in our article on why your next project needs an Image to 3D API:
Need further assistance? If you have any questions or encounter issues during integration, you can provide feedback online at Neural4D Feedback or contact our technical team via email at support@neural4d.com.