Skip to main content

tripo_api/
versions.rs

1//! Known `model_version` string constants, grouped by the variant they apply to.
2//!
3//! Fields of type `model_version` are serialized as bare strings; these constants
4//! are a convenience layer over the wire format. Servers may introduce new versions
5//! between SDK releases — callers can always pass any `&str` or `String`.
6
7/// Versions accepted by `text_to_model`, `image_to_model`.
8pub mod text_image {
9    /// P1 (March 2026) — low-poly-optimized. Doesn't support `quad`,
10    /// `smart_low_poly`, `generate_parts`, or `geometry_quality`.
11    pub const P1: &str = "P1-20260311";
12    /// v3.1 (February 2026).
13    pub const V3_1: &str = "v3.1-20260211";
14    /// v3.0 (August 2025).
15    pub const V3_0: &str = "v3.0-20250812";
16    /// v2.5 (January 2025). Server default.
17    pub const V2_5: &str = "v2.5-20250123";
18    /// v2.0 (September 2024).
19    pub const V2_0: &str = "v2.0-20240919";
20    /// v1.4 (June 2024).
21    pub const V1_4: &str = "v1.4-20240625";
22    /// Turbo v1.0 (May 2025).
23    pub const TURBO_V1_0: &str = "Turbo-v1.0-20250506";
24    /// Python SDK default.
25    pub const DEFAULT: &str = V2_5;
26}
27
28/// Versions accepted by `multiview_to_model` (no Turbo / v1.4).
29pub mod multiview {
30    /// Latest (February 2026).
31    pub const V3_1: &str = "v3.1-20260211";
32    /// v3.0 (August 2025).
33    pub const V3_0: &str = "v3.0-20250812";
34    /// v2.5 (January 2025).
35    pub const V2_5: &str = "v2.5-20250123";
36    /// v2.0 (September 2024).
37    pub const V2_0: &str = "v2.0-20240919";
38    /// Python SDK default.
39    pub const DEFAULT: &str = V2_5;
40}
41
42/// Versions accepted by `texture_model`.
43pub mod texture {
44    /// v3.0 (August 2025).
45    pub const V3_0: &str = "v3.0-20250812";
46    /// v2.5 (January 2025).
47    pub const V2_5: &str = "v2.5-20250123";
48    /// Python SDK default.
49    pub const DEFAULT: &str = V2_5;
50}
51
52/// Versions accepted by `rig_model`.
53pub mod rig {
54    /// v1.0 (March 2024). Only supports `rig_type: biped`. Server default.
55    pub const V1_0: &str = "v1.0-20240301";
56    /// v2.0 (May 2025). Supports all `rig_type` values.
57    ///
58    /// Deprecated by API 1.9.7 (June 2026) in favor of [`V2_5`].
59    #[deprecated(note = "rig v2.0-20250506 is deprecated (API 1.9.7); use V2_5 instead")]
60    pub const V2_0: &str = "v2.0-20250506";
61    /// v2.5 (February 2026). Supports all `rig_type` values. Current recommended rigger.
62    pub const V2_5: &str = "v2.5-20260210";
63    /// Server default (note: v1.0 is biped-only — use `V2_5` for any non-biped
64    /// `rig_type`).
65    pub const DEFAULT: &str = V1_0;
66}
67
68/// Single known version for `mesh_segmentation` and `mesh_completion`.
69pub mod mesh {
70    /// v1.0 (May 2025).
71    pub const V1_0: &str = "v1.0-20250506";
72    /// Python SDK default.
73    pub const DEFAULT: &str = V1_0;
74}
75
76/// Single known version for `smart_lowpoly`.
77pub mod lowpoly {
78    /// P-v2.0 (December 2025).
79    pub const P_V2_0: &str = "P-v2.0-20251226";
80    /// Python SDK default.
81    pub const DEFAULT: &str = P_V2_0;
82}