How to build an endpoint URL
All endpoint URLs follow this structure:
This documentation describes the REST interface of the Chat3D API.
All endpoint URLs follow this structure:
https://public.api-chat3d.comv1Authentication is token-based, using the Authorization HTTP header, and is required for all API endpoints.
Authorization: <token>All POST requests must use the application/json content type. Requests with a different content type will be rejected.
Most responses from the API are returned in application/json format. However, in some error cases (e.g., internal server errors), the response body may be returned as plain text text/plain.
The Chat3D API uses standard HTTP status codes to indicate whether a request was successful or if an error occurred. The table below summarizes the most common codes returned by the API.
| CODE | DESCRIPTION |
|---|---|
| 200 | Request succeeded. The response contains the expected data. |
| 400 | Bad request. The content have an unexcpected format. |
| 401 | Authentication failed. The Authorization header is missing or contains an invalid token. |
| 403 | Access denied. The token is valid but does not grant permission to access the resource or credits are insufficient. |
| 405 | Unallowed method for this endpoint. |
| 500 | Internal server error. An unexpected condition was encountered on the server. |
/health
Checks whether the API is available.
{
"status": "OK"
}/generate
Credit Usage: Each successful call to this endpoint results in the consumption of 3 credits per number_of_generations.
This endpoint initiates the generation of a 3D model based on a textual prompt or on some images. Each generation task is linked to a task_token, which uniquely identifies the generation process and all related assets. This includes the resulting 3D model, any supplementary resources like external textures (when not embedded), and alternate file formats of the model.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| prompt * | string | Text describing the 3D scene. |
| images * ** | array | List containing between 1 and 4 image URLs. |
| number_of_generations | integer | Specifies how many models to generate. Must be between 1 and 4 if using prompt, or exactly 1 if using images. |
* The fields prompt and images are mutually exclusive. Only one of them must be provided.
** Image URLs must meet the following requirements:
- Protocol: URLs must start with https://.
- Size limit: Maximum file size is 2 MB per image.
- Supported formats: png, jpeg, jpg, webp, gif and svg.
Important: The task_token is returned only once and is required to retrieve generation results. While it's not an authentication token, it's strongly recommended to save it, especially in case of script failure or future access needs.
{
"prompt": "A futuristic 3D building",
"number_of_generations": 1
}{
"task_token": "abc123-task-token"
}/task/task_token
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| task_token | string | The identifier of the task. |
Retrieves the details of a previously submitted task. To check when a task is complete, we recommend polling the task status at regular intervals (e.g., every 30 seconds, and every 10 seconds once progress exceeds 90%).
{
"task_token": "b6a151ea273749bba00cae57db6ba2f9",
"task_status": "files_generation",
"number_of_generations": 1,
"created_at": "2025-06-16T10:39:58",
"updated_at": "2025-06-16T08:40:00",
"message": "files are generating...",
"progress": 55,
"generated_files_count": 0.5,
"generated_files": [
"mesh_original_glb_1",
"texture_original_1"
]
}/download_url
Provides a download URL for a previously generated file.
| PARAMETER | TYPE | DESCRIPTION | DEFAULT VALUE |
|---|---|---|---|
| task_token | string | Task identifier of the resource. | - |
| file_key | string | Path or name of the file to download. | - |
| requested_file_format | string | Target format, for 3D meshes. | glb |
Valid formats (for 3D meshes only) are: glb, fbx, stl, obj, ply, usd, abc, dae and usdz
The URL provided to download the requested file is valid for one hour only. This URL is not part of the API endpoints, and no Authorization header should be included in the request.
If the requested resource includes multiple files (such as textures), they will be bundled into a single ZIP archive for download.
{
"task_token": "abc123-task-token",
"file_key": "mesh_original_glb_1",
"requested_file_format": "glb"
}{
"file_download_url": "https://my.s3.amazonaws.com/download/file.glb?option=value"
}/edit
Credit Usage: Each successful call to this endpoint results in the consumption of 3 credits.
This endpoint allows you to edit an existing 3D model by providing additional instructions via a prompt. The parent_task_token must correspond to a completed task. The result of this endpoint is a new task, identified by a new task_token.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| edit_prompt | string | Text describing the modifications to apply to the existing model. |
| parent_task_token | string | The task_token of the completed task whose model you want to edit. |
{
"edit_prompt": "Add a black hat on the top",
"parent_task_token": "abc123-task-token"
}{
"task_token": "new-abc123-task-token"
}/refine
Credit Usage: Each successful call to this endpoint results in the consumption of 3 credits.
This endpoint allows you to refine an existing 3D model generated by a previous task. The parent_task_token must correspond to a completed task, and the file_key identifies the specific mesh file to refine. The result of this endpoint is a new task, identified by a new task_token.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| parent_task_token | string | The task_token of the completed task containing the model you want to refine. |
| file_key | string | Identifier of the mesh file to refine (for example: mesh_original_fbx_1). |
{
"parent_task_token": "abc123-task-token",
"file_key": "mesh_original_glb_1"
}{
"task_token": "new-abc123-task-token"
}File keys are unique identifiers for files generated by the API. They follow specific naming conventions based on the type of task and the generation parameters.
Key Components:
- type: original if created via the /generate endpoint, or edited if created via the /edit endpoint.
- number: Generation number, an integer between 1 and 4.
- format: File format for 3D meshes, glb is available by default, others are created with the /download_url endpoint.
Base File Keys:
For each generation, the following 4 file keys are created:
| FILE KEY | DESCRIPTION | FORMAT |
|---|---|---|
| gif_type_number | GIF preview of the generated model. | GIF |
| mesh_image_reference_type_number | Reference image of the generated model. | PNG |
| mesh_type_glb_number | Primary 3D model in GLB format. | GLB |
| texture_type_number | Textures associated with the model. | ZIP |
Example of 'file_key' for a single task generation using the /generate endpoint
The following 4 file keys are expected:
| FILE KEY | DESCRIPTION | FORMAT |
|---|---|---|
| gif_original_1 | GIF preview of the generated model. | GIF |
| mesh_image_reference_original_1 | Reference image of the generated model. | PNG |
| mesh_original_glb_1 | Primary 3D model in GLB format. | GLB |
| texture_original_1 | Textures associated with the model. | ZIP |
Additional File Keys:
When downloading a mesh in a format other than its default format (e.g., downloading mesh_original_glb_1 in OBJ format), a new file key is created following the pattern: mesh_type_format_number.
The following fields describe the status and progress of a generation task.
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
| task_token | string | Unique identifier for the generation task. |
| created_at | string | Timestamp indicating when the task was created, in the format YYYY-MM-DD HH:MM:SS. |
| updated_at | string | Timestamp of the most recent update to the task, in the format YYYY-MM-DD HH:MM:SS. |
| status | Task Status | Current status of the task. |
| number_of_generations | integer | Number of assets to generate (i.e., number of final files expected). |
| message | string | Human-readable status message. |
| progress | integer | Progress percentage of the generation task, from 0 to 100. |
| generated_files_count | float | Aggregated progress of all file generations for the task. When all generations are fully completed, the value equals number_of_generations. |
| generated_files | array of strings | List of file_key identifiers for each generated file. |
If a file is generated but is not yet available for download, its file_key is set to "unknown file key"
The task_status field indicates the current stage of the generation process.
| VALUE | DESCRIPTION |
|---|---|
| generate_prompt | The prompt and any associated resources are currently being analyzed. |
| files_generation | The generation of output files is currently in progress. |
| finished | The task has completed and the results are ready. |