AI 3D Generation API Documentation
Base URL:
https://api.ideal.house
Version: v1
Updated: 2026-03-06
๐ Overview
The AI 3D Generation API allows you to submit image or prompt-based 3D generation tasks and retrieve their results asynchronously. The workflow involves two steps:
- Create a task โ Submit your input (image URL or text prompt) and receive a
taskId. - Poll for results โ Use the
taskIdto query task status and retrieve the generated output.
๐ Authentication
All API requests must be authenticated using an API Key.
Include your API Key in the request header:
| Header | Value |
|---|---|
APIKEY | your_api_key_here |
โ ๏ธ Keep your API Key secure. Do not expose it in client-side code or public repositories.
โก Concurrency Limit
๐ฆ Important: This API only allows 1 concurrent request per account at a time.
If multiple requests are submitted simultaneously, subsequent requests will be placed in a queue and processed in order.
You can monitor your position in the queue via thewaitNumberfield in the task result response.
๐ฐ Credits Deduction
[!WARNING] ๐ช Each task deducts 20 credits from your account upon successful task creation.
Credits are deducted at the moment of task creation. If the task ultimately fails, the deducted credits will be automatically refunded to your account.
Insufficient credits will return error code9051. ๐ See Credits Deduction Reference.
๐ API Endpoints
1. Create 3D Generation Task
Creates a new AI 3D generation task and returns a unique taskId for polling.
Endpoint
POST /api/v1/ai3d/generate
Request Headers
| Header | Required | Description |
|---|---|---|
APIKEY | โ Yes | Your API authentication key |
Content-Type | โ Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
imageUrl | string | โ ๏ธ Either imageUrl or prompt is required | URL of the source image to generate 3D from |
prompt | string | โ ๏ธ Either imageUrl or prompt is required | Text prompt describing the 3D content to generate |
๐ก Note:
imageUrlandpromptare mutually exclusive โ provide one of them per request.
๐ฅ Request Examples
cURL
# Using imageUrl
curl -X POST "https://api.ideal.house/api/v1/ai3d/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/room.jpg"
}'
# Using prompt
curl -X POST "https://api.ideal.house/api/v1/ai3d/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A modern minimalist living room with wooden floor"
}'
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class Ai3dApiExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
String requestBody = """
{
"imageUrl": "https://example.com/room.jpg"
}
""";
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/ai3d/generate")
.addHeader("APIKEY", API_KEY)
.addHeader("Content-Type", "application/json")
.post(RequestBody.create(requestBody, MediaType.parse("application/json")))
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY,
"Content-Type": "application/json"
}
# Using imageUrl
payload = {
"imageUrl": "https://example.com/room.jpg"
}
# Or using prompt
# payload = {
# "prompt": "A modern minimalist living room with wooden floor"
# }
response = requests.post(
f"{BASE_URL}/api/v1/ai3d/generate",
headers=headers,
json=payload
)
data = response.json()
task_id = data.get("data")
print(f"Task ID: {task_id}")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function createTask() {
try {
const response = await axios.post(
`${BASE_URL}/api/v1/ai3d/generate`,
{
imageUrl: 'https://example.com/room.jpg'
// Or use prompt instead:
// prompt: 'A modern minimalist living room with wooden floor',
},
{
headers: {
'APIKEY': API_KEY,
'Content-Type': 'application/json'
}
}
);
const taskId = response.data.data;
console.log('Task ID:', taskId);
return taskId;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
createTask();
๐ค Response
Success Response
{
"code": 0,
"message": "success",
"data": 1234567890123456789
}
| Field | Type | Description |
|---|---|---|
code | integer | 0 indicates success |
message | string | Response message |
data | long | The unique task ID for polling results |
2. Get Task Result
Retrieves the current status and output of a previously created task.
Endpoint
GET /api/v1/ai3d/result
Request Headers
| Header | Required | Description |
|---|---|---|
APIKEY | โ Yes | Your API authentication key |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | long | โ Yes | The task ID returned from the create task endpoint |
๐ฅ Request Examples
cURL
curl -X GET "https://api.ideal.house/api/v1/ai3d/result?taskId=1234567890123456789" \
-H "APIKEY: your_api_key_here"
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class Ai3dResultExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
long taskId = 1234567890123456789L;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/ai3d/result?taskId=" + taskId)
.addHeader("APIKEY", API_KEY)
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
import time
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY
}
task_id = 1234567890123456789
# Poll until task is complete
while True:
response = requests.get(
f"{BASE_URL}/api/v1/ai3d/result",
headers=headers,
params={"taskId": task_id}
)
data = response.json()
result = data.get("data", {})
status = result.get("status")
print(f"Status: {status}, Progress: {result.get('percentage')}%, Queue: {result.get('waitNumber')}")
if status in ("Success", "Failed"):
break
time.sleep(3) # Poll every 3 seconds
if status == "Success":
print("Result URL:", result["output"]["resultUrl"])
else:
print("Task failed or terminated")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function pollResult(taskId) {
const headers = { 'APIKEY': API_KEY };
while (true) {
const response = await axios.get(
`${BASE_URL}/api/v1/ai3d/result`,
{
headers,
params: { taskId }
}
);
const result = response.data.data;
const { status, percentage, waitNumber } = result;
console.log(`Status: ${status} | Progress: ${percentage}% | Queue: ${waitNumber}`);
if (['Success', 'Failed'].includes(status)) {
if (status === 'Success') {
console.log('Result URL:', result.output.resultUrl);
} else {
console.log('Task ended with status:', status);
}
break;
}
// Wait 3 seconds before next poll
await new Promise(resolve => setTimeout(resolve, 3000));
}
}
pollResult(1234567890123456789n);
๐ค Response
Success Response (Task Completed)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/room.jpg"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/result_3d_model.zip",
"width": 1024,
"height": 1024
}
}
}
Response (Task Processing / In Queue)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Processing",
"waitNumber": 2,
"percentage": 35,
"input": {
"imageUrl": "https://example.com/room.jpg"
},
"output": null
}
}
Response (Task Failed)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Failed",
"waitNumber": 0,
"percentage": 0,
"input": {
"imageUrl": "https://example.com/room.jpg"
},
"output": null
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | long | Task unique identifier |
status | string | Current task status (see Task Status) |
waitNumber | integer | Number of tasks ahead in the queue (0 means currently processing) |
percentage | integer | Task completion percentage (0โ100) |
input | object | The original input parameters of the task |
input.imageUrl | string | Source image URL (if provided) |
input.prompt | string | Source text prompt (if provided) |
input.modelType | string | Model type used |
output | object | Generation result (only available when status is Success) |
output.resultUrl | string | URL to the generated 3D model file |
output.width | integer | Output width in pixels |
output.height | integer | Output height in pixels |
๐ Task Status
| Status | Description |
|---|---|
Unprocessed | Task has been created but not yet started |
Processing | Task is currently being processed |
Success | Task completed successfully โ output is available |
Failed | Task failed due to an error |
๐ก Polling Recommendation: Poll the result endpoint every 3โ5 seconds. Avoid polling too frequently to prevent rate limiting.
โ Error Responses
All error responses share the same JSON structure:
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
Error Code Reference
| Code | Name | Description | Suggested Action |
|---|---|---|---|
1001 | FAILED | Request failed (generic error) | Check the message field for specific error details |
1003 | INTERNAL_ERROR | Internal server error | Retry after a short delay; contact support if it persists |
1011 | PARAM_ERROR | Request parameter error | Verify all required parameters are provided and correctly formatted |
5002 | API_KEY_INVALID | Invalid or missing API Key | Ensure the APIKEY header is present and the value is correct |
9010 | SCAN_TEXT_ERROR | Text prompt failed content review | Modify the prompt to remove any sensitive or prohibited content |
9038 | PROHIBITED_CONTENT | Generated output image contains prohibited content | Adjust prompt/style/inputs and retry |
9036 | COVERT_3D_FAILED | This image does not support 3D generation | Try a different image with clearer structure and depth |
9051 | COINS_NOT_ENOUGH | Insufficient coins / credits | Top up your account credits and retry |
Error Response Examples
5002 โ Invalid API Key
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
1011 โ Parameter Error
{
"code": 1011,
"message": "Request parameter error: imageUrl is required",
"data": null
}
9036 โ Image Not Supported for 3D Generation
{
"code": 9036,
"message": "This image does not support 3D generation",
"data": null
}
9010 โ Text Content Moderation Failed
{
"code": 9010,
"message": "Text prompt failed content review, contains prohibited content",
"data": null
}
9051 โ Insufficient Credits
{
"code": 9051,
"message": "Insufficient coins",
"data": null
}
๐ For the complete list of common API error codes, refer to the Error Code Reference.
๐ Recommended Integration Flow
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 1. POST /api/v1/ai3d/generate โ
โ โ Receive taskId โ
โ โ
โ 2. Wait 3โ5 seconds โ
โ โ
โ 3. GET /api/v1/ai3d/result?taskId={taskId} โ
โ โ Check status field โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ status == "Unprocessed" or "Processing" โ โ
โ โ โ waitNumber: position in queue โ โ
โ โ โ percentage: current progress โ โ
โ โ โ Repeat step 2 & 3 โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ status == "Success" โ โ
โ โ โ output.resultUrl: 3D model file โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ status == "Failed" โ โ
โ โ โ Handle error accordingly โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ยฉ Ideal House AI โ All rights reserved.