Resources - API Documentation

Resources

File Keys

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 KEYDESCRIPTIONFORMAT
gif_type_numberGIF preview of the generated model.GIF
mesh_image_reference_type_numberReference image of the generated model.PNG
mesh_type_glb_numberPrimary 3D model in GLB format.GLB
texture_type_numberTextures 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 KEYDESCRIPTIONFORMAT
gif_original_1GIF preview of the generated model.GIF
mesh_image_reference_original_1Reference image of the generated model.PNG
mesh_original_glb_1Primary 3D model in GLB format.GLB
texture_original_1Textures 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.

Task

The following fields describe the status and progress of a generation task.

FIELDTYPEDESCRIPTION
task_tokenstringUnique identifier for the generation task.
created_atstringTimestamp indicating when the task was created, in the format YYYY-MM-DD HH:MM:SS.
updated_atstringTimestamp of the most recent update to the task, in the format YYYY-MM-DD HH:MM:SS.
statusTask StatusCurrent status of the task.
number_of_generationsintegerNumber of assets to generate (i.e., number of final files expected).
messagestringHuman-readable status message.
progressintegerProgress percentage of the generation task, from 0 to 100.
generated_files_countfloatAggregated progress of all file generations for the task.
When all generations are fully completed, the value equals number_of_generations.
generated_filesarray of stringsList 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"

Task Status

The task_status field indicates the current stage of the generation process.

VALUEDESCRIPTION
generate_promptThe prompt and any associated resources are currently being analyzed.
files_generationThe generation of output files is currently in progress.
finishedThe task has completed and the results are ready.