1- from __future__ import annotations
2-
31from enum import Enum
4- from typing import Optional , List
2+
53from pydantic import BaseModel , Field
64
75
@@ -11,44 +9,76 @@ class Rodin3DGenerateRequest(BaseModel):
119 material : str = Field (..., description = "The material type." )
1210 quality_override : int = Field (..., description = "The poly count of the mesh." )
1311 mesh_mode : str = Field (..., description = "It controls the type of faces of generated models." )
14- TAPose : Optional [bool ] = Field (None , description = "" )
12+ TAPose : bool | None = Field (None , description = "" )
13+
14+
15+ class Rodin3DGen25Request (BaseModel ):
16+
17+ tier : str = Field (..., description = "Gen-2.5 tier (e.g. Gen-2.5-High)." )
18+ prompt : str | None = Field (None , description = "Required for Text-to-3D; ignored otherwise." )
19+ seed : int | None = Field (None , description = "0-65535." )
20+ material : str | None = Field (None , description = "PBR | Shaded | All | None." )
21+ geometry_file_format : str | None = Field (None , description = "glb | usdz | fbx | obj | stl." )
22+ texture_mode : str | None = Field (None , description = "legacy | extreme-low | low | medium | high." )
23+ mesh_mode : str | None = Field (None , description = "Raw (triangular) | Quad." )
24+ quality_override : int | None = Field (None , description = "Mesh face count override." )
25+ geometry_instruct_mode : str | None = Field (None , description = "faithful | creative." )
26+ bbox_condition : list [int ] | None = Field (None , description = "Bounding box [Width(Y), Height(Z), Length(X)] in cm." )
27+ height : int | None = Field (None , description = "Approximate model height in cm." )
28+ TAPose : bool | None = Field (None , description = "T/A pose for human-like models." )
29+ hd_texture : bool | None = Field (None , description = "Enhanced texture quality." )
30+ texture_delight : bool | None = Field (None , description = "Remove baked lighting from textures." )
31+ is_micro : bool | None = Field (None , description = "Micro detail (Extreme-High only)." )
32+ use_original_alpha : bool | None = Field (None , description = "Preserve image transparency." )
33+ preview_render : bool | None = Field (None , description = "Generate high-quality preview render." )
34+ addons : list [str ] | None = Field (None , description = 'Optional addons, e.g. ["HighPack"].' )
35+
1536
1637class GenerateJobsData (BaseModel ):
17- uuids : List [str ] = Field (..., description = "str LIST" )
38+ uuids : list [str ] = Field (..., description = "str LIST" )
1839 subscription_key : str = Field (..., description = "subscription key" )
1940
41+
2042class Rodin3DGenerateResponse (BaseModel ):
21- message : Optional [str ] = Field (None , description = "Return message." )
22- prompt : Optional [str ] = Field (None , description = "Generated Prompt from image." )
23- submit_time : Optional [str ] = Field (None , description = "Submit Time" )
24- uuid : Optional [str ] = Field (None , description = "Task str" )
25- jobs : Optional [GenerateJobsData ] = Field (None , description = "Details of jobs" )
43+ message : str | None = Field (None , description = "Return message." )
44+ prompt : str | None = Field (None , description = "Generated Prompt from image." )
45+ submit_time : str | None = Field (None , description = "Submit Time" )
46+ uuid : str | None = Field (None , description = "Task str" )
47+ jobs : GenerateJobsData | None = Field (None , description = "Details of jobs" )
48+
2649
2750class JobStatus (str , Enum ):
2851 """
2952 Status for jobs
3053 """
54+
3155 Done = "Done"
3256 Failed = "Failed"
3357 Generating = "Generating"
3458 Waiting = "Waiting"
3559
60+
3661class Rodin3DCheckStatusRequest (BaseModel ):
3762 subscription_key : str = Field (..., description = "subscription from generate endpoint" )
3863
64+
3965class JobItem (BaseModel ):
4066 uuid : str = Field (..., description = "uuid" )
41- status : JobStatus = Field (...,description = "Status Currently" )
67+ status : JobStatus = Field (..., description = "Status Currently" )
68+
4269
4370class Rodin3DCheckStatusResponse (BaseModel ):
44- jobs : List [JobItem ] = Field (..., description = "Job status List" )
71+ jobs : list [JobItem ] = Field (..., description = "Job status List" )
72+
4573
4674class Rodin3DDownloadRequest (BaseModel ):
4775 task_uuid : str = Field (..., description = "Task str" )
4876
77+
4978class RodinResourceItem (BaseModel ):
5079 url : str = Field (..., description = "Download Url" )
5180 name : str = Field (..., description = "File name with ext" )
5281
82+
5383class Rodin3DDownloadResponse (BaseModel ):
54- list : List [RodinResourceItem ] = Field (..., description = "Source List" )
84+ items : list [RodinResourceItem ] = Field (..., alias = "list" , description = "Source List" )
0 commit comments