diff --git a/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs index dd62455..c330dd9 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs @@ -101,7 +101,7 @@ public partial interface IWorldLabsClient string? displayName = default, global::WorldLabs.AnyOf? model = default, global::WorldLabs.Permission? permission = default, - long? seed = default, + int? seed = default, global::System.Collections.Generic.IList? tags = default, global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs new file mode 100644 index 0000000..de959f1 --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace WorldLabs +{ + public partial interface IWorldLabsClient + { + /// + /// Get Credits
+ /// Get remaining API credits for the authenticated user.
+ /// Returns:
+ /// CreditsResponse with the current aggregate API credit balance.
+ /// Raises:
+ /// HTTPException: 404 if the caller is not an API-enabled user
+ /// HTTPException: 503 if the billing backend is unavailable + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetCreditsMarbleV1CreditsGetAsync( + global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Credits
+ /// Get remaining API credits for the authenticated user.
+ /// Returns:
+ /// CreditsResponse with the current aggregate API credit balance.
+ /// Raises:
+ /// HTTPException: 404 if the caller is not an API-enabled user
+ /// HTTPException: 503 if the billing backend is unavailable + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetCreditsMarbleV1CreditsGetAsResponseAsync( + global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs index 3d8057d..57b7f41 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.IWorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs @@ -118,7 +118,7 @@ public partial interface IWorldLabsClient global::System.Threading.Tasks.Task PanoDepthToRgbMarbleV1PanoDepthToRgbPostAsync( global::WorldLabs.DepthPanoImage depthPanoImage, string textPrompt, - long? seed = default, + int? seed = default, double? zMax = default, double? zMin = default, global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContext.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContext.g.cs index cc44a6b..35e3581 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContext.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContext.g.cs @@ -91,11 +91,12 @@ namespace WorldLabs [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.Content))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.CreditsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.DataBase64Reference))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.DeleteWorldResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.DepthPanoPrompt))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.GenerateWorldResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.OperationError))] @@ -141,7 +142,6 @@ namespace WorldLabs [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.DepthPanoImage), TypeInfoPropertyName = "DepthPanoImage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminatorSource), TypeInfoPropertyName = "PanoDepthToRgbRequestDepthPanoImageDiscriminatorSource2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.Permission))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.Prompt))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WorldLabs.Content2), TypeInfoPropertyName = "Content22")] diff --git a/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContextTypes.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContextTypes.g.cs index 0cced71..860c183 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContextTypes.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.JsonSerializerContextTypes.g.cs @@ -40,207 +40,207 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::WorldLabs.DataBase64Reference? Type3 { get; set; } + public global::WorldLabs.CreditsResponse? Type3 { get; set; } /// /// /// - public global::WorldLabs.DeleteWorldResponse? Type4 { get; set; } + public double? Type4 { get; set; } /// /// /// - public bool? Type5 { get; set; } + public global::WorldLabs.DataBase64Reference? Type5 { get; set; } /// /// /// - public global::WorldLabs.DepthPanoPrompt? Type6 { get; set; } + public global::WorldLabs.DeleteWorldResponse? Type6 { get; set; } /// /// /// - public double? Type7 { get; set; } + public bool? Type7 { get; set; } /// /// /// - public global::WorldLabs.GenerateWorldResponse? Type8 { get; set; } + public global::WorldLabs.DepthPanoPrompt? Type8 { get; set; } /// /// /// - public global::System.DateTime? Type9 { get; set; } + public global::WorldLabs.GenerateWorldResponse? Type9 { get; set; } /// /// /// - public global::WorldLabs.OperationError? Type10 { get; set; } + public global::System.DateTime? Type10 { get; set; } /// /// /// - public global::WorldLabs.GetOperationResponseUnionWorldPanoDepthToRgbResult? Type11 { get; set; } + public global::WorldLabs.OperationError? Type11 { get; set; } /// /// /// - public global::WorldLabs.AnyOf? Type12 { get; set; } + public global::WorldLabs.GetOperationResponseUnionWorldPanoDepthToRgbResult? Type12 { get; set; } /// /// /// - public global::WorldLabs.World? Type13 { get; set; } + public global::WorldLabs.AnyOf? Type13 { get; set; } /// /// /// - public global::WorldLabs.PanoDepthToRgbResult? Type14 { get; set; } + public global::WorldLabs.World? Type14 { get; set; } /// /// /// - public global::WorldLabs.HTTPValidationError? Type15 { get; set; } + public global::WorldLabs.PanoDepthToRgbResult? Type15 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type16 { get; set; } + public global::WorldLabs.HTTPValidationError? Type16 { get; set; } /// /// /// - public global::WorldLabs.ValidationError? Type17 { get; set; } + public global::System.Collections.Generic.IList? Type17 { get; set; } /// /// /// - public global::WorldLabs.ImagePrompt? Type18 { get; set; } + public global::WorldLabs.ValidationError? Type18 { get; set; } /// /// /// - public global::WorldLabs.ImagePrompt1? Type19 { get; set; } + public global::WorldLabs.ImagePrompt? Type19 { get; set; } /// /// /// - public global::WorldLabs.MediaAssetReference? Type20 { get; set; } + public global::WorldLabs.ImagePrompt1? Type20 { get; set; } /// /// /// - public global::WorldLabs.UriReference? Type21 { get; set; } + public global::WorldLabs.MediaAssetReference? Type21 { get; set; } /// /// /// - public global::WorldLabs.ImagePromptImagePrompt1Discriminator? Type22 { get; set; } + public global::WorldLabs.UriReference? Type22 { get; set; } /// /// /// - public global::WorldLabs.ImagePromptImagePrompt1DiscriminatorSource? Type23 { get; set; } + public global::WorldLabs.ImagePromptImagePrompt1Discriminator? Type23 { get; set; } /// /// /// - public global::WorldLabs.ImageryAssets? Type24 { get; set; } + public global::WorldLabs.ImagePromptImagePrompt1DiscriminatorSource? Type24 { get; set; } /// /// /// - public global::WorldLabs.InpaintPanoPrompt? Type25 { get; set; } + public global::WorldLabs.ImageryAssets? Type25 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsRequest? Type26 { get; set; } + public global::WorldLabs.InpaintPanoPrompt? Type26 { get; set; } /// /// /// - public global::WorldLabs.AnyOf? Type27 { get; set; } + public global::WorldLabs.ListWorldsRequest? Type27 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsRequestModelVariant1? Type28 { get; set; } + public global::WorldLabs.AnyOf? Type28 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsRequestModelVariant2? Type29 { get; set; } + public global::WorldLabs.ListWorldsRequestModelVariant1? Type29 { get; set; } /// /// /// - public int? Type30 { get; set; } + public global::WorldLabs.ListWorldsRequestModelVariant2? Type30 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsRequestSortBy? Type31 { get; set; } + public int? Type31 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsRequestStatus2? Type32 { get; set; } + public global::WorldLabs.ListWorldsRequestSortBy? Type32 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type33 { get; set; } + public global::WorldLabs.ListWorldsRequestStatus2? Type33 { get; set; } /// /// /// - public global::WorldLabs.ListWorldsResponse? Type34 { get; set; } + public global::System.Collections.Generic.IList? Type34 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type35 { get; set; } + public global::WorldLabs.ListWorldsResponse? Type35 { get; set; } /// /// /// - public global::WorldLabs.MediaAsset? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::WorldLabs.MediaAssetKind? Type37 { get; set; } + public global::WorldLabs.MediaAsset? Type37 { get; set; } /// /// /// - public global::WorldLabs.MediaAssetPrepareUploadRequest? Type38 { get; set; } + public global::WorldLabs.MediaAssetKind? Type38 { get; set; } /// /// /// - public global::WorldLabs.MediaAssetPrepareUploadResponse? Type39 { get; set; } + public global::WorldLabs.MediaAssetPrepareUploadRequest? Type39 { get; set; } /// /// /// - public global::WorldLabs.UploadUrlInfo? Type40 { get; set; } + public global::WorldLabs.MediaAssetPrepareUploadResponse? Type40 { get; set; } /// /// /// - public global::WorldLabs.MeshAssets? Type41 { get; set; } + public global::WorldLabs.UploadUrlInfo? Type41 { get; set; } /// /// /// - public global::WorldLabs.MultiImagePromptInput? Type42 { get; set; } + public global::WorldLabs.MeshAssets? Type42 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type43 { get; set; } + public global::WorldLabs.MultiImagePromptInput? Type43 { get; set; } /// /// /// - public global::WorldLabs.SphericallyLocatedContentInput? Type44 { get; set; } + public global::System.Collections.Generic.IList? Type44 { get; set; } /// /// /// - public global::WorldLabs.MultiImagePromptOutput? Type45 { get; set; } + public global::WorldLabs.SphericallyLocatedContentInput? Type45 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type46 { get; set; } + public global::WorldLabs.MultiImagePromptOutput? Type46 { get; set; } /// /// /// - public global::WorldLabs.SphericallyLocatedContentOutput? Type47 { get; set; } + public global::System.Collections.Generic.IList? Type47 { get; set; } /// /// /// - public global::WorldLabs.OperationPanoDepthToRgbResult? Type48 { get; set; } + public global::WorldLabs.SphericallyLocatedContentOutput? Type48 { get; set; } /// /// /// - public global::WorldLabs.PanoDepthToRgbRequest? Type49 { get; set; } + public global::WorldLabs.OperationPanoDepthToRgbResult? Type49 { get; set; } /// /// /// - public global::WorldLabs.DepthPanoImage? Type50 { get; set; } + public global::WorldLabs.PanoDepthToRgbRequest? Type50 { get; set; } /// /// /// - public global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminator? Type51 { get; set; } + public global::WorldLabs.DepthPanoImage? Type51 { get; set; } /// /// /// - public global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminatorSource? Type52 { get; set; } + public global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminator? Type52 { get; set; } /// /// /// - public long? Type53 { get; set; } + public global::WorldLabs.PanoDepthToRgbRequestDepthPanoImageDiscriminatorSource? Type53 { get; set; } /// /// /// diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.Json.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.Json.g.cs new file mode 100644 index 0000000..341a81d --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace WorldLabs +{ + public sealed partial class CreditsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::WorldLabs.CreditsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::WorldLabs.CreditsResponse), + jsonSerializerContext) as global::WorldLabs.CreditsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::WorldLabs.CreditsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::WorldLabs.CreditsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::WorldLabs.CreditsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.g.cs new file mode 100644 index 0000000..89c64a2 --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.CreditsResponse.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace WorldLabs +{ + /// + /// Remaining credits for the authenticated API user. + /// + public sealed partial class CreditsResponse + { + /// + /// Remaining API credits available to the authenticated user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("remaining_credits")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double RemainingCredits { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Remaining API credits available to the authenticated user. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreditsResponse( + double remainingCredits) + { + this.RemainingCredits = remainingCredits; + } + + /// + /// Initializes a new instance of the class. + /// + public CreditsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.Json.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.Json.g.cs new file mode 100644 index 0000000..7f01349 --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace WorldLabs +{ + public sealed partial class GenerateWorldMarbleV1WorldsGeneratePostResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse), + jsonSerializerContext) as global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::WorldLabs.GenerateWorldMarbleV1WorldsGeneratePostResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.g.cs new file mode 100644 index 0000000..b966b8c --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.GenerateWorldMarbleV1WorldsGeneratePostResponse.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace WorldLabs +{ + /// + /// + /// + public sealed partial class GenerateWorldMarbleV1WorldsGeneratePostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.Json.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.Json.g.cs new file mode 100644 index 0000000..603a2e2 --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace WorldLabs +{ + public sealed partial class PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse), + jsonSerializerContext) as global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::WorldLabs.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.g.cs new file mode 100644 index 0000000..3322798 --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace WorldLabs +{ + /// + /// + /// + public sealed partial class PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbRequest.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbRequest.g.cs index 0ab5859..1b05388 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbRequest.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.PanoDepthToRgbRequest.g.cs @@ -36,7 +36,7 @@ public sealed partial class PanoDepthToRgbRequest /// Random seed for reproducible generation. /// [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public long? Seed { get; set; } + public int? Seed { get; set; } /// /// Text description of the desired appearance. @@ -87,7 +87,7 @@ public sealed partial class PanoDepthToRgbRequest public PanoDepthToRgbRequest( global::WorldLabs.DepthPanoImage depthPanoImage, string textPrompt, - long? seed, + int? seed, double? zMax, double? zMin) { diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Models.WorldsGenerateRequest.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Models.WorldsGenerateRequest.g.cs index 7920f18..2e09a01 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.Models.WorldsGenerateRequest.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.Models.WorldsGenerateRequest.g.cs @@ -33,7 +33,7 @@ public sealed partial class WorldsGenerateRequest /// Random seed for generation /// [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public long? Seed { get; set; } + public int? Seed { get; set; } /// /// Optional tags for the world (max 10 tags, each up to 32 characters) @@ -86,7 +86,7 @@ public WorldsGenerateRequest( string? displayName, global::WorldLabs.AnyOf? model, global::WorldLabs.Permission? permission, - long? seed, + int? seed, global::System.Collections.Generic.IList? tags) { this.DisplayName = displayName; diff --git a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs index d9b9d73..585dd06 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs @@ -363,6 +363,43 @@ partial void ProcessGenerateWorldMarbleV1WorldsGeneratePostResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // Insufficient Credits + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + string? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_402, typeof(string), JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_402, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { @@ -541,7 +578,7 @@ partial void ProcessGenerateWorldMarbleV1WorldsGeneratePostResponseContent( string? displayName = default, global::WorldLabs.AnyOf? model = default, global::WorldLabs.Permission? permission = default, - long? seed = default, + int? seed = default, global::System.Collections.Generic.IList? tags = default, global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs new file mode 100644 index 0000000..64804ac --- /dev/null +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetCreditsMarbleV1CreditsGet.g.cs @@ -0,0 +1,427 @@ + +#nullable enable + +namespace WorldLabs +{ + public partial class WorldLabsClient + { + + + private static readonly global::WorldLabs.EndPointSecurityRequirement s_GetCreditsMarbleV1CreditsGetSecurityRequirement0 = + new global::WorldLabs.EndPointSecurityRequirement + { + Authorizations = new global::WorldLabs.EndPointAuthorizationRequirement[] + { new global::WorldLabs.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyWltApiKey", + Location = "Header", + Name = "WLT-Api-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::WorldLabs.EndPointSecurityRequirement[] s_GetCreditsMarbleV1CreditsGetSecurityRequirements = + new global::WorldLabs.EndPointSecurityRequirement[] + { s_GetCreditsMarbleV1CreditsGetSecurityRequirement0, + }; + partial void PrepareGetCreditsMarbleV1CreditsGetArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetCreditsMarbleV1CreditsGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetCreditsMarbleV1CreditsGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetCreditsMarbleV1CreditsGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Credits
+ /// Get remaining API credits for the authenticated user.
+ /// Returns:
+ /// CreditsResponse with the current aggregate API credit balance.
+ /// Raises:
+ /// HTTPException: 404 if the caller is not an API-enabled user
+ /// HTTPException: 503 if the billing backend is unavailable + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetCreditsMarbleV1CreditsGetAsync( + global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCreditsMarbleV1CreditsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Credits
+ /// Get remaining API credits for the authenticated user.
+ /// Returns:
+ /// CreditsResponse with the current aggregate API credit balance.
+ /// Raises:
+ /// HTTPException: 404 if the caller is not an API-enabled user
+ /// HTTPException: 503 if the billing backend is unavailable + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetCreditsMarbleV1CreditsGetAsResponseAsync( + global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetCreditsMarbleV1CreditsGetArguments( + httpClient: HttpClient); + + + var __authorizations = global::WorldLabs.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetCreditsMarbleV1CreditsGetSecurityRequirements, + operationName: "GetCreditsMarbleV1CreditsGetAsync"); + + using var __timeoutCancellationTokenSource = global::WorldLabs.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::WorldLabs.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::WorldLabs.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::WorldLabs.PathBuilder( + path: "/marble/v1/credits", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::WorldLabs.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::WorldLabs.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetCreditsMarbleV1CreditsGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::WorldLabs.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::WorldLabs.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetCreditsMarbleV1CreditsGet", + methodName: "GetCreditsMarbleV1CreditsGetAsync", + pathTemplate: "\"/marble/v1/credits\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::WorldLabs.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::WorldLabs.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::WorldLabs.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetCreditsMarbleV1CreditsGet", + methodName: "GetCreditsMarbleV1CreditsGetAsync", + pathTemplate: "\"/marble/v1/credits\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::WorldLabs.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::WorldLabs.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::WorldLabs.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::WorldLabs.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::WorldLabs.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetCreditsMarbleV1CreditsGet", + methodName: "GetCreditsMarbleV1CreditsGetAsync", + pathTemplate: "\"/marble/v1/credits\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::WorldLabs.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetCreditsMarbleV1CreditsGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::WorldLabs.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::WorldLabs.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetCreditsMarbleV1CreditsGet", + methodName: "GetCreditsMarbleV1CreditsGetAsync", + pathTemplate: "\"/marble/v1/credits\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::WorldLabs.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::WorldLabs.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetCreditsMarbleV1CreditsGet", + methodName: "GetCreditsMarbleV1CreditsGetAsync", + pathTemplate: "\"/marble/v1/credits\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetCreditsMarbleV1CreditsGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::WorldLabs.CreditsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::WorldLabs.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::WorldLabs.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::WorldLabs.CreditsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::WorldLabs.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::WorldLabs.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs index e0c2064..694c729 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs @@ -379,6 +379,43 @@ partial void ProcessPanoDepthToRgbMarbleV1PanoDepthToRgbPostResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // Insufficient Credits + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + string? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_402, typeof(string), JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_402, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { @@ -558,7 +595,7 @@ partial void ProcessPanoDepthToRgbMarbleV1PanoDepthToRgbPostResponseContent( public async global::System.Threading.Tasks.Task PanoDepthToRgbMarbleV1PanoDepthToRgbPostAsync( global::WorldLabs.DepthPanoImage depthPanoImage, string textPrompt, - long? seed = default, + int? seed = default, double? zMax = default, double? zMin = default, global::WorldLabs.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/WorldLabs/Generated/autosdk.generated-examples.json b/src/libs/WorldLabs/Generated/autosdk.generated-examples.json new file mode 100644 index 0000000..07fb6e6 --- /dev/null +++ b/src/libs/WorldLabs/Generated/autosdk.generated-examples.json @@ -0,0 +1,26 @@ +{ + "Examples": [ + { + "Order": 1, + "Title": "Generate World", + "Slug": "generate-world-marble-v1-worlds-generate-post", + "Description": "Start world generation.\n\nCreates a new world generation job and returns a long-running operation.\nPoll the /operations/{operation_id} endpoint to check generation status\nand retrieve the generated world when complete.\n\nArgs:\n request: The world generation request containing world_prompt, display_name,\n tags, model, seed, and permission settings.\n\nReturns:\n GenerateWorldResponse with operation_id and timestamps. Use the operation_id\n to poll for completion.\n\nRaises:\n HTTPException: 400 if invalid request or content violates policies\n HTTPException: 402 if insufficient credits\n HTTPException: 500 if generation could not be started", + "Language": "http", + "Code": "### Generate World\n# @name generate_world_marble_v1_worlds_generate_post\nPOST {{host}}/marble/v1/worlds:generate\nWLT-Api-Key: {{api_key}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022display_name\u0022: \u0022string\u0022,\n \u0022model\u0022: \u0022marble-1.0\u0022,\n \u0022permission\u0022: {\n \u0022allow_id_access\u0022: false,\n \u0022allowed_readers\u0022: [\n \u0022string\u0022\n ],\n \u0022allowed_writers\u0022: [\n \u0022string\u0022\n ],\n \u0022public\u0022: false\n },\n \u0022seed\u0022: 0,\n \u0022tags\u0022: [\n \u0022string\u0022\n ],\n \u0022world_prompt\u0022: {\n \u0022disable_recaption\u0022: true,\n \u0022text_prompt\u0022: \u0022string\u0022,\n \u0022type\u0022: \u0022text\u0022\n }\n}\n\n## Responses\n# 200\n# Description: Successful Response\n# Content-Type: application/json\n# 402\n# Description: Insufficient Credits\n# Content-Type: application/json\n# 422\n# Description: Validation Error\n# Content-Type: application/json", + "Format": "http", + "OperationId": "generate_world_marble_v1_worlds_generate_post", + "Setup": null + }, + { + "Order": 2, + "Title": "Pano Depth To Rgb", + "Slug": "pano-depth-to-rgb-marble-v1-pano-depth-to-rgb-post", + "Description": "Generate an RGB panorama from a depth panorama.\n\nProvide a depth panorama and a text prompt\ndescribing the desired appearance. The depth map\nsupplies the scene geometry; the model synthesizes\ntextures that match that geometry and returns a\npanoramic RGB image.\n\nAccepted depth inputs:\n\n* **EXR**: float depth values. Omit\n \u0060\u0060z_min\u0060\u0060 and \u0060\u0060z_max\u0060\u0060.\n* **PNG**: depth values normalized to [0, 1].\n Provide both \u0060\u0060z_min\u0060\u0060 and \u0060\u0060z_max\u0060\u0060 so the\n service can decode the PNG correctly.\n\nFor a complete PNG-based workflow, see the\n[web-chisel-depth-png example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png).\n\nReturns a long-running \u0060\u0060Operation\u0060\u0060. Poll\n\u0060\u0060GET /operations/{operation_id}\u0060\u0060 until\n\u0060\u0060done\u0060\u0060 is \u0060\u0060true\u0060\u0060, then read the generated\npanorama URL from \u0060\u0060response.pano_url\u0060\u0060.\n\nRaises:\n HTTPException: 400 if invalid request\n HTTPException: 402 if insufficient credits\n HTTPException: 500 if generation could not start", + "Language": "http", + "Code": "### Pano Depth To Rgb\n# @name pano_depth_to_rgb_marble_v1_pano_depth_to_rgb_post\nPOST {{host}}/marble/v1/pano:depth_to_rgb\nWLT-Api-Key: {{api_key}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022depth_pano_image\u0022: {\n \u0022media_asset_id\u0022: \u0022string\u0022,\n \u0022source\u0022: \u0022media_asset\u0022\n },\n \u0022seed\u0022: 0,\n \u0022text_prompt\u0022: \u0022string\u0022,\n \u0022z_max\u0022: 0,\n \u0022z_min\u0022: 0\n}\n\n## Responses\n# 200\n# Description: Successful Response\n# Content-Type: application/json\n# 402\n# Description: Insufficient Credits\n# Content-Type: application/json\n# 422\n# Description: Validation Error\n# Content-Type: application/json", + "Format": "http", + "OperationId": "pano_depth_to_rgb_marble_v1_pano_depth_to_rgb_post", + "Setup": null + } + ] +} \ No newline at end of file diff --git a/src/libs/WorldLabs/openapi.yaml b/src/libs/WorldLabs/openapi.yaml index 65f6fcb..90ce1b1 100644 --- a/src/libs/WorldLabs/openapi.yaml +++ b/src/libs/WorldLabs/openapi.yaml @@ -1,37 +1,47 @@ components: schemas: Content: - description: >- - Represents content (media, text, images) that can be stored inline or - via URL. + description: 'Represents content (media, text, images) that can be stored inline + or via URL. - Supports both direct data storage (up to 10MB) and URL references (up to - 20MB). + Supports both direct data storage (up to 10MB) and URL references (up to 20MB).' properties: data_base64: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Data Base64 extension: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: File extension without dot examples: - - jpg - - png - - pdf - - txt + - jpg + - png + - pdf + - txt title: Extension uri: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Uri title: Content type: object + CreditsResponse: + description: Remaining credits for the authenticated API user. + properties: + remaining_credits: + description: Remaining API credits available to the authenticated user. + minimum: 0.0 + title: Remaining Credits + type: number + required: + - remaining_credits + title: CreditsResponse + type: object DataBase64Reference: description: Reference to content via base64-encoded data. properties: @@ -41,8 +51,8 @@ components: type: string extension: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: File extension without dot (e.g., 'jpg', 'png') title: Extension source: @@ -51,7 +61,7 @@ components: title: Source type: string required: - - data_base64 + - data_base64 title: DataBase64Reference type: object DeleteWorldResponse: @@ -66,29 +76,27 @@ components: title: World Id type: string required: - - world_id - - deleted + - world_id + - deleted title: DeleteWorldResponse type: object DepthPanoPrompt: - description: >- - For models conditioned on a depth pano and text. + description: 'For models conditioned on a depth pano and text. When depth_pano_image is a log-encoded PNG, z_min and z_max are required - to decode it correctly. When it is an EXR file containing raw float - depth + to decode it correctly. When it is an EXR file containing raw float depth values, z_min and z_max will both be ignored. - Please set z_min and z_max both to None when using an EXR file. + Please set z_min and z_max both to None when using an EXR file.' properties: depth_pano_image: $ref: '#/components/schemas/Content' text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: depth-pano @@ -97,16 +105,16 @@ components: type: string z_max: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' title: Z Max z_min: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' title: Z Min required: - - depth_pano_image + - depth_pano_image title: DepthPanoPrompt type: object GenerateWorldResponse: @@ -114,9 +122,9 @@ components: properties: created_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Creation timestamp title: Created At done: @@ -125,21 +133,21 @@ components: type: boolean error: anyOf: - - $ref: '#/components/schemas/OperationError' - - type: 'null' + - $ref: '#/components/schemas/OperationError' + - type: 'null' description: Error information if the operation failed expires_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Expiration timestamp title: Expires At metadata: anyOf: - - additionalProperties: true - type: object - - type: 'null' + - additionalProperties: true + type: object + - type: 'null' description: Service-specific metadata, such as progress percentage title: Metadata operation_id: @@ -148,31 +156,30 @@ components: type: string response: anyOf: - - {} - - type: 'null' - description: >- - Result payload when done=true and no error. Structure depends on - operation type. + - {} + - type: 'null' + description: Result payload when done=true and no error. Structure depends + on operation type. title: Response updated_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Last update timestamp title: Updated At required: - - operation_id - - done + - operation_id + - done title: GenerateWorldResponse type: object GetOperationResponse_Union_World__PanoDepthToRgbResult__: properties: created_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Creation timestamp title: Created At done: @@ -181,21 +188,21 @@ components: type: boolean error: anyOf: - - $ref: '#/components/schemas/OperationError' - - type: 'null' + - $ref: '#/components/schemas/OperationError' + - type: 'null' description: Error information if the operation failed expires_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Expiration timestamp title: Expires At metadata: anyOf: - - additionalProperties: true - type: object - - type: 'null' + - additionalProperties: true + type: object + - type: 'null' description: Service-specific metadata, such as progress percentage title: Metadata operation_id: @@ -204,23 +211,22 @@ components: type: string response: anyOf: - - $ref: '#/components/schemas/World' - - $ref: '#/components/schemas/PanoDepthToRgbResult' - - type: 'null' - description: >- - Result payload when done=true and no error. Structure depends on - operation type. + - $ref: '#/components/schemas/World' + - $ref: '#/components/schemas/PanoDepthToRgbResult' + - type: 'null' + description: Result payload when done=true and no error. Structure depends + on operation type. title: Response updated_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Last update timestamp title: Updated At required: - - operation_id - - done + - operation_id + - done title: GetOperationResponse[Union[World, PanoDepthToRgbResult]] type: object HTTPValidationError: @@ -233,22 +239,20 @@ components: title: HTTPValidationError type: object ImagePrompt: - description: >- - Image-to-world generation. + description: 'Image-to-world generation. - Generates a world from an image. text_prompt is optional - if not - provided, + Generates a world from an image. text_prompt is optional - if not provided, it will be generated via recaptioning. - Recommended image formats: jpg, jpeg, png, webp. + Recommended image formats: jpg, jpeg, png, webp.' properties: disable_recaption: anyOf: - - type: boolean - - type: 'null' + - type: boolean + - type: 'null' description: If True, use text_prompt as-is without recaptioning title: Disable Recaption image_prompt: @@ -260,20 +264,20 @@ components: uri: '#/components/schemas/UriReference' propertyName: source oneOf: - - $ref: '#/components/schemas/MediaAssetReference' - - $ref: '#/components/schemas/UriReference' - - $ref: '#/components/schemas/DataBase64Reference' + - $ref: '#/components/schemas/MediaAssetReference' + - $ref: '#/components/schemas/UriReference' + - $ref: '#/components/schemas/DataBase64Reference' title: Image Prompt is_pano: anyOf: - - type: boolean - - type: 'null' + - type: boolean + - type: 'null' description: Whether the provided image is already a panorama title: Is Pano text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Optional text guidance (auto-generated if not provided) title: Text Prompt type: @@ -282,7 +286,7 @@ components: title: Type type: string required: - - image_prompt + - image_prompt title: ImagePrompt type: object ImageryAssets: @@ -290,8 +294,8 @@ components: properties: pano_url: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Panorama image URL title: Pano Url title: ImageryAssets @@ -305,8 +309,8 @@ components: $ref: '#/components/schemas/Content' text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: inpaint-pano @@ -314,115 +318,113 @@ components: title: Type type: string required: - - pano_image - - pano_mask + - pano_image + - pano_mask title: InpaintPanoPrompt type: object ListWorldsRequest: description: Request to list API-generated worlds with optional filters. examples: - - model: marble-1.0 - page_size: 20 - sort_by: created_at - status: SUCCEEDED - - page_size: 50 - sort_by: created_at - status: SUCCEEDED - tags: - - fantasy - - nature - - created_after: '2024-01-01T00:00:00Z' - created_before: '2024-12-31T23:59:59Z' - page_size: 100 - sort_by: created_at - - model: marble-1.0-draft - page_size: 30 - tags: - - landscape - - page_size: 20 - page_token: >- - eyJzbmFwc2hvdF90aW1lIjoiMjAyNC0wMS0wMVQwMDowMDowMFoiLCJsYXN0X2NyZWF0ZWRfYXQiOiIyMDI0LTAxLTAxVDAwOjAwOjAwWiIsImxhc3RfaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAifQ== - sort_by: created_at + - model: marble-1.0 + page_size: 20 + sort_by: created_at + status: SUCCEEDED + - page_size: 50 + sort_by: created_at + status: SUCCEEDED + tags: + - fantasy + - nature + - created_after: '2024-01-01T00:00:00Z' + created_before: '2024-12-31T23:59:59Z' + page_size: 100 + sort_by: created_at + - model: marble-1.0-draft + page_size: 30 + tags: + - landscape + - page_size: 20 + page_token: eyJzbmFwc2hvdF90aW1lIjoiMjAyNC0wMS0wMVQwMDowMDowMFoiLCJsYXN0X2NyZWF0ZWRfYXQiOiIyMDI0LTAxLTAxVDAwOjAwOjAwWiIsImxhc3RfaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAifQ== + sort_by: created_at properties: created_after: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Filter worlds created after this timestamp (inclusive) title: Created After created_before: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Filter worlds created before this timestamp (exclusive) title: Created Before is_public: anyOf: - - type: boolean - - type: 'null' - description: Filter by visibility. true=public only, false=private only, null=all + - type: boolean + - type: 'null' + description: Filter by visibility. true=public only, false=private only, + null=all title: Is Public model: anyOf: - - enum: - - marble-1.0-draft - - marble-1.0 - - marble-1.1 - - marble-1.1-plus - type: string - - enum: - - Marble 0.1-mini - - Marble 0.1-plus - - Marble 1.1-plus - type: string - - type: 'null' - description: >- - Filter by model used for generation. Legacy names are deprecated; + - enum: + - marble-1.0-draft + - marble-1.0 + - marble-1.1 + - marble-1.1-plus + type: string + - enum: + - Marble 0.1-mini + - Marble 0.1-plus + - Marble 1.1-plus + type: string + - type: 'null' + description: Filter by model used for generation. Legacy names are deprecated; use the new lowercase names. title: Model page_size: default: 20 description: Number of results per page (1-100) - maximum: 100 - minimum: 1 + maximum: 100.0 + minimum: 1.0 title: Page Size type: integer page_token: anyOf: - - type: string - - type: 'null' - description: >- - Cursor token for pagination (opaque base64 string from previous - response). Use cursor from next_page_token in previous response for - consistent pagination. + - type: string + - type: 'null' + description: Cursor token for pagination (opaque base64 string from previous + response). Use cursor from next_page_token in previous response for consistent + pagination. title: Page Token sort_by: default: created_at description: Sort results by created_at or updated_at enum: - - created_at - - updated_at + - created_at + - updated_at title: Sort By type: string status: anyOf: - - enum: - - SUCCEEDED - - PENDING - - FAILED - - RUNNING - type: string - - type: 'null' + - enum: + - SUCCEEDED + - PENDING + - FAILED + - RUNNING + type: string + - type: 'null' description: Filter by world status title: Status tags: anyOf: - - items: - type: string - type: array - - type: 'null' + - items: + type: string + type: array + - type: 'null' description: Filter by tags (returns worlds with ANY of these tags) title: Tags title: ListWorldsRequest @@ -432,8 +434,8 @@ components: properties: next_page_token: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Token for fetching the next page of results title: Next Page Token worlds: @@ -443,15 +445,16 @@ components: title: Worlds type: array required: - - worlds + - worlds title: ListWorldsResponse type: object MediaAsset: - description: |- - A user-uploaded media asset stored in managed storage. + description: 'A user-uploaded media asset stored in managed storage. + MediaAssets can be images, videos, or binary blobs that are used - as input to world generation. + + as input to world generation.' properties: created_at: description: Creation timestamp @@ -460,13 +463,13 @@ components: type: string extension: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: File extension without dot examples: - - mp4 - - png - - jpg + - mp4 + - png + - jpg title: Extension file_name: description: File name @@ -476,38 +479,38 @@ components: $ref: '#/components/schemas/MediaAssetKind' description: High-level media type examples: - - image - - video + - image + - video media_asset_id: description: Server-generated media asset identifier title: Media Asset Id type: string metadata: anyOf: - - additionalProperties: true - type: object - - type: 'null' + - additionalProperties: true + type: object + - type: 'null' description: Optional application-specific metadata title: Metadata updated_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Last update timestamp title: Updated At required: - - media_asset_id - - file_name - - kind - - created_at + - media_asset_id + - file_name + - kind + - created_at title: MediaAsset type: object MediaAssetKind: description: High-level media asset type. enum: - - image - - video + - image + - video title: MediaAssetKind type: string MediaAssetPrepareUploadRequest: @@ -515,13 +518,13 @@ components: properties: extension: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: File extension without dot examples: - - mp4 - - png - - jpg + - mp4 + - png + - jpg title: Extension file_name: description: File name @@ -532,18 +535,18 @@ components: $ref: '#/components/schemas/MediaAssetKind' description: High-level media type examples: - - image - - video + - image + - video metadata: anyOf: - - additionalProperties: true - type: object - - type: 'null' + - additionalProperties: true + type: object + - type: 'null' description: Optional application-specific metadata title: Metadata required: - - file_name - - kind + - file_name + - kind title: MediaAssetPrepareUploadRequest type: object MediaAssetPrepareUploadResponse: @@ -556,8 +559,8 @@ components: $ref: '#/components/schemas/UploadUrlInfo' description: Upload URL information required: - - media_asset - - upload_info + - media_asset + - upload_info title: MediaAssetPrepareUploadResponse type: object MediaAssetReference: @@ -573,7 +576,7 @@ components: title: Source type: string required: - - media_asset_id + - media_asset_id title: MediaAssetReference type: object MeshAssets: @@ -581,24 +584,25 @@ components: properties: collider_mesh_url: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Collider mesh URL title: Collider Mesh Url title: MeshAssets type: object MultiImagePrompt-Input: - description: |- - Multi-image-to-world generation. + description: 'Multi-image-to-world generation. + Generates a world from multiple images. text_prompt is optional. - Recommended image formats: jpg, jpeg, png, webp. + + Recommended image formats: jpg, jpeg, png, webp.' properties: disable_recaption: anyOf: - - type: boolean - - type: 'null' + - type: boolean + - type: 'null' description: If True, use text_prompt as-is without recaptioning title: Disable Recaption multi_image_prompt: @@ -609,15 +613,14 @@ components: type: array reconstruct_images: default: false - description: >- - Whether to use reconstruction mode (allows up to 8 images, otherwise - 4) + description: Whether to use reconstruction mode (allows up to 8 images, + otherwise 4) title: Reconstruct Images type: boolean text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Optional text guidance (auto-generated if not provided) title: Text Prompt type: @@ -626,7 +629,7 @@ components: title: Type type: string required: - - multi_image_prompt + - multi_image_prompt title: MultiImagePrompt type: object MultiImagePrompt-Output: @@ -643,8 +646,8 @@ components: type: boolean text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: multi-image @@ -652,7 +655,7 @@ components: title: Type type: string required: - - multi_image_prompt + - multi_image_prompt title: MultiImagePrompt type: object OperationError: @@ -660,14 +663,14 @@ components: properties: code: anyOf: - - type: integer - - type: 'null' + - type: integer + - type: 'null' description: Error code title: Code message: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Error message title: Message title: OperationError @@ -676,9 +679,9 @@ components: properties: created_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Creation timestamp title: Created At done: @@ -687,21 +690,21 @@ components: type: boolean error: anyOf: - - $ref: '#/components/schemas/OperationError' - - type: 'null' + - $ref: '#/components/schemas/OperationError' + - type: 'null' description: Error information if the operation failed expires_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Expiration timestamp title: Expires At metadata: anyOf: - - additionalProperties: true - type: object - - type: 'null' + - additionalProperties: true + type: object + - type: 'null' description: Service-specific metadata, such as progress percentage title: Metadata operation_id: @@ -710,75 +713,50 @@ components: type: string response: anyOf: - - $ref: '#/components/schemas/PanoDepthToRgbResult' - - type: 'null' - description: >- - Result payload when done=true and no error. Structure depends on - operation type. + - $ref: '#/components/schemas/PanoDepthToRgbResult' + - type: 'null' + description: Result payload when done=true and no error. Structure depends + on operation type. updated_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Last update timestamp title: Updated At required: - - operation_id - - done + - operation_id + - done title: Operation[PanoDepthToRgbResult] type: object PanoDepthToRgbRequest: - description: >- - Request to generate an RGB panorama from a depth panorama. - - - Provide a depth panorama and a text prompt describing - - the desired appearance. The depth map supplies the - - scene geometry; the model synthesizes textures that - - loosely adhere to that geometry and returns a panoramic RGB image. - - - Accepted depth inputs: - - - * **EXR**: float depth values. Omit ``z_min`` - and ``z_max``. - * **PNG**: depth values normalized to [0, 1]. - Provide both ``z_min`` and ``z_max`` so the service - can decode the PNG back into metric depth. - - For a complete PNG-based workflow, see the - - `web-chisel-depth-png example - `. - - - This endpoint returns a long-running ``Operation``. - - Poll ``GET /operations/{operation_id}`` until - - ``done`` is ``true``, then read the generated - - panorama URL from ``response.pano_url``. + description: "Request to generate an RGB panorama from a depth panorama.\n\n\ + Provide a depth panorama and a text prompt describing\nthe desired appearance.\ + \ The depth map supplies the\nscene geometry; the model synthesizes textures\ + \ that\nloosely adhere to that geometry and returns a panoramic RGB image.\n\ + \nAccepted depth inputs:\n\n* **EXR**: float depth values. Omit ``z_min``\n\ + \ and ``z_max``.\n* **PNG**: depth values normalized to [0, 1].\n Provide\ + \ both ``z_min`` and ``z_max`` so the service\n can decode the PNG back into\ + \ metric depth.\n\nFor a complete PNG-based workflow, see the\n`web-chisel-depth-png\ + \ example `.\n\ + \nThis endpoint returns a long-running ``Operation``.\nPoll ``GET /operations/{operation_id}``\ + \ until\n``done`` is ``true``, then read the generated\npanorama URL from\ + \ ``response.pano_url``." examples: - - depth_pano_image: - source: uri - uri: https://example.com/depth.exr - text_prompt: A cozy cabin interior with warm wooden walls - - depth_pano_image: - source: uri - uri: https://example.com/depth.png - text_prompt: A futuristic space station - z_max: 100 - z_min: 0.1 + - depth_pano_image: + source: uri + uri: https://example.com/depth.exr + text_prompt: A cozy cabin interior with warm wooden walls + - depth_pano_image: + source: uri + uri: https://example.com/depth.png + text_prompt: A futuristic space station + z_max: 100.0 + z_min: 0.1 properties: depth_pano_image: - description: >- - Depth panorama image (EXR or PNG). Provide via URI, media_asset, or - base64 (max 100 MB). + description: Depth panorama image (EXR or PNG). Provide via URI, media_asset, + or base64 (max 100 MB). discriminator: mapping: data_base64: '#/components/schemas/DataBase64Reference' @@ -786,16 +764,16 @@ components: uri: '#/components/schemas/UriReference' propertyName: source oneOf: - - $ref: '#/components/schemas/MediaAssetReference' - - $ref: '#/components/schemas/UriReference' - - $ref: '#/components/schemas/DataBase64Reference' + - $ref: '#/components/schemas/MediaAssetReference' + - $ref: '#/components/schemas/UriReference' + - $ref: '#/components/schemas/DataBase64Reference' title: Depth Pano Image seed: anyOf: - - maximum: 4294967295 - minimum: 0 - type: integer - - type: 'null' + - maximum: 4294967295.0 + minimum: 0.0 + type: integer + - type: 'null' description: Random seed for reproducible generation. title: Seed text_prompt: @@ -804,41 +782,39 @@ components: type: string z_max: anyOf: - - exclusiveMinimum: 0 - type: number - - type: 'null' - description: >- - Maximum depth. Required for PNG depth maps (normalized to [0, 1]). - Must be provided together with z_min and must be greater than z_min. + - exclusiveMinimum: 0.0 + type: number + - type: 'null' + description: Maximum depth. Required for PNG depth maps (normalized to [0, + 1]). Must be provided together with z_min and must be greater than z_min. Omit for EXR depth maps. title: Z Max z_min: anyOf: - - exclusiveMinimum: 0 - type: number - - type: 'null' - description: >- - Minimum depth. Required for PNG depth maps (normalized to [0, 1]). - Must be provided together with z_max. Omit for EXR depth maps. + - exclusiveMinimum: 0.0 + type: number + - type: 'null' + description: Minimum depth. Required for PNG depth maps (normalized to [0, + 1]). Must be provided together with z_max. Omit for EXR depth maps. title: Z Min required: - - depth_pano_image - - text_prompt + - depth_pano_image + - text_prompt title: PanoDepthToRgbRequest type: object PanoDepthToRgbResult: - description: |- - Result from depth-to-RGB panorama generation. + description: 'Result from depth-to-RGB panorama generation. + Returned inside ``Operation.response`` when the - operation completes successfully (``done=true``). + + operation completes successfully (``done=true``).' properties: pano_url: anyOf: - - type: string - - type: 'null' - description: >- - URL of the generated RGB panorama image. Available when the + - type: string + - type: 'null' + description: URL of the generated RGB panorama image. Available when the operation succeeds. title: Pano Url title: PanoDepthToRgbResult @@ -867,10 +843,11 @@ components: title: Permission type: object Prompt: - description: |- - For world models generating a world from a single image (+ text). + description: 'For world models generating a world from a single image (+ text). + Images can be generated using the :image-generation method. - If no text prompt is provided, it will be generated via recaption. + + If no text prompt is provided, it will be generated via recaption.' properties: image_prompt: $ref: '#/components/schemas/Content' @@ -880,8 +857,8 @@ components: type: boolean text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: image @@ -889,7 +866,7 @@ components: title: Type type: string required: - - image_prompt + - image_prompt title: Prompt type: object SphericallyLocatedContent-Input: @@ -897,8 +874,8 @@ components: properties: azimuth: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' description: Azimuth angle in degrees title: Azimuth content: @@ -910,12 +887,12 @@ components: uri: '#/components/schemas/UriReference' propertyName: source oneOf: - - $ref: '#/components/schemas/MediaAssetReference' - - $ref: '#/components/schemas/UriReference' - - $ref: '#/components/schemas/DataBase64Reference' + - $ref: '#/components/schemas/MediaAssetReference' + - $ref: '#/components/schemas/UriReference' + - $ref: '#/components/schemas/DataBase64Reference' title: Content required: - - content + - content title: SphericallyLocatedContent type: object SphericallyLocatedContent-Output: @@ -923,29 +900,29 @@ components: properties: azimuth: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' title: Azimuth data_base64: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Data Base64 extension: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: File extension without dot examples: - - jpg - - png - - pdf - - txt + - jpg + - png + - pdf + - txt title: Extension uri: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Uri title: SphericallyLocatedContent type: object @@ -954,15 +931,15 @@ components: properties: semantics_metadata: anyOf: - - $ref: '#/components/schemas/WorldSemanticsMetadata' - - type: 'null' + - $ref: '#/components/schemas/WorldSemanticsMetadata' + - type: 'null' description: Semantic metadata for the world spz_urls: anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' + - additionalProperties: + type: string + type: object + - type: 'null' description: URLs for SPZ format Gaussian splat files title: Spz Urls title: SplatAssets @@ -972,16 +949,16 @@ components: properties: curl_example: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Optional curl example for convenience title: Curl Example required_headers: anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' + - additionalProperties: + type: string + type: object + - type: 'null' description: Headers that MUST be included when uploading (e.g. Content-Type) title: Required Headers upload_method: @@ -993,8 +970,8 @@ components: title: Upload Url type: string required: - - upload_url - - upload_method + - upload_url + - upload_method title: UploadUrlInfo type: object UriReference: @@ -1010,7 +987,7 @@ components: title: Uri type: string required: - - uri + - uri title: UriReference type: object ValidationError: @@ -1018,8 +995,8 @@ components: loc: items: anyOf: - - type: string - - type: integer + - type: string + - type: integer title: Location type: array msg: @@ -1029,30 +1006,32 @@ components: title: Error Type type: string required: - - loc - - msg - - type + - loc + - msg + - type title: ValidationError type: object VideoPrompt-Input: - description: |- - Video-to-world generation. + description: 'Video-to-world generation. + Generates a world from a video. text_prompt is optional. + Recommended video formats: mp4, webm, mov, avi. - Maximum video size: 100MB. + + Maximum video size: 100MB.' properties: disable_recaption: anyOf: - - type: boolean - - type: 'null' + - type: boolean + - type: 'null' description: If True, use text_prompt as-is without recaptioning title: Disable Recaption text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Optional text guidance (auto-generated if not provided) title: Text Prompt type: @@ -1069,12 +1048,12 @@ components: uri: '#/components/schemas/UriReference' propertyName: source oneOf: - - $ref: '#/components/schemas/MediaAssetReference' - - $ref: '#/components/schemas/UriReference' - - $ref: '#/components/schemas/DataBase64Reference' + - $ref: '#/components/schemas/MediaAssetReference' + - $ref: '#/components/schemas/UriReference' + - $ref: '#/components/schemas/DataBase64Reference' title: Video Prompt required: - - video_prompt + - video_prompt title: VideoPrompt type: object VideoPrompt-Output: @@ -1082,8 +1061,8 @@ components: properties: text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: video @@ -1093,7 +1072,7 @@ components: video_prompt: $ref: '#/components/schemas/Content' required: - - video_prompt + - video_prompt title: VideoPrompt type: object World: @@ -1101,14 +1080,14 @@ components: properties: assets: anyOf: - - $ref: '#/components/schemas/WorldAssets' - - type: 'null' + - $ref: '#/components/schemas/WorldAssets' + - type: 'null' description: Generated world assets created_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Creation timestamp title: Created At display_name: @@ -1117,28 +1096,28 @@ components: type: string model: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Model used for generation title: Model permission: anyOf: - - $ref: '#/components/schemas/Permission' - - type: 'null' + - $ref: '#/components/schemas/Permission' + - type: 'null' description: Access control permissions for the world tags: anyOf: - - items: - type: string - type: array - - type: 'null' + - items: + type: string + type: array + - type: 'null' description: Tags associated with the world title: Tags updated_at: anyOf: - - format: date-time - type: string - - type: 'null' + - format: date-time + type: string + - type: 'null' description: Last update timestamp title: Updated At world_id: @@ -1151,29 +1130,29 @@ components: type: string world_prompt: anyOf: - - discriminator: - mapping: - depth-pano: '#/components/schemas/DepthPanoPrompt' - image: '#/components/schemas/Prompt' - inpaint-pano: '#/components/schemas/InpaintPanoPrompt' - multi-image: '#/components/schemas/MultiImagePrompt-Output' - text: '#/components/schemas/WorldTextPrompt-Output' - video: '#/components/schemas/VideoPrompt-Output' - propertyName: type - oneOf: - - $ref: '#/components/schemas/WorldTextPrompt-Output' - - $ref: '#/components/schemas/Prompt' - - $ref: '#/components/schemas/MultiImagePrompt-Output' - - $ref: '#/components/schemas/VideoPrompt-Output' - - $ref: '#/components/schemas/DepthPanoPrompt' - - $ref: '#/components/schemas/InpaintPanoPrompt' - - type: 'null' + - discriminator: + mapping: + depth-pano: '#/components/schemas/DepthPanoPrompt' + image: '#/components/schemas/Prompt' + inpaint-pano: '#/components/schemas/InpaintPanoPrompt' + multi-image: '#/components/schemas/MultiImagePrompt-Output' + text: '#/components/schemas/WorldTextPrompt-Output' + video: '#/components/schemas/VideoPrompt-Output' + propertyName: type + oneOf: + - $ref: '#/components/schemas/WorldTextPrompt-Output' + - $ref: '#/components/schemas/Prompt' + - $ref: '#/components/schemas/MultiImagePrompt-Output' + - $ref: '#/components/schemas/VideoPrompt-Output' + - $ref: '#/components/schemas/DepthPanoPrompt' + - $ref: '#/components/schemas/InpaintPanoPrompt' + - type: 'null' description: World prompt title: World Prompt required: - - world_id - - display_name - - world_marble_url + - world_id + - display_name + - world_marble_url title: World type: object WorldAssets: @@ -1181,29 +1160,29 @@ components: properties: caption: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: AI-generated description of the world title: Caption imagery: anyOf: - - $ref: '#/components/schemas/ImageryAssets' - - type: 'null' + - $ref: '#/components/schemas/ImageryAssets' + - type: 'null' description: Imagery assets mesh: anyOf: - - $ref: '#/components/schemas/MeshAssets' - - type: 'null' + - $ref: '#/components/schemas/MeshAssets' + - type: 'null' description: Mesh assets splats: anyOf: - - $ref: '#/components/schemas/SplatAssets' - - type: 'null' + - $ref: '#/components/schemas/SplatAssets' + - type: 'null' description: Gaussian splat assets thumbnail_url: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Thumbnail URL for the world title: Thumbnail Url title: WorldAssets @@ -1220,8 +1199,8 @@ components: properties: ground_plane_offset: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' title: Ground Plane Offset description: | Vertical (Y-axis) offset, in meters, of the detected ground plane @@ -1229,8 +1208,8 @@ components: `metric_scale_factor` to place the ground at y=0. metric_scale_factor: anyOf: - - type: number - - type: 'null' + - type: number + - type: 'null' title: Metric Scale Factor description: | Multiplicative factor that converts raw asset coordinates to @@ -1240,21 +1219,21 @@ components: title: WorldSemanticsMetadata type: object WorldTextPrompt-Input: - description: |- - Text-to-world generation. + description: 'Text-to-world generation. + - Generates a world from a text description. text_prompt is REQUIRED. + Generates a world from a text description. text_prompt is REQUIRED.' properties: disable_recaption: anyOf: - - type: boolean - - type: 'null' + - type: boolean + - type: 'null' description: If True, use text_prompt as-is without recaptioning title: Disable Recaption text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' description: Optional text guidance (auto-generated if not provided) title: Text Prompt type: @@ -1269,8 +1248,8 @@ components: properties: text_prompt: anyOf: - - type: string - - type: 'null' + - type: string + - type: 'null' title: Text Prompt type: const: text @@ -1280,76 +1259,74 @@ components: title: WorldTextPrompt type: object WorldsGenerateRequest: - description: >- - Request to generate a world from text, image, multi-image, or video + description: Request to generate a world from text, image, multi-image, or video input. examples: - - display_name: Enchanted Forest - model: marble-1.0 - permission: - public: false - seed: 42 - tags: - - fantasy - - nature - world_prompt: - text_prompt: A mystical forest with glowing mushrooms - type: text - - display_name: World from Image - model: marble-1.0-draft - world_prompt: - image_prompt: + - display_name: Enchanted Forest + model: marble-1.0 + permission: + public: false + seed: 42 + tags: + - fantasy + - nature + world_prompt: + text_prompt: A mystical forest with glowing mushrooms + type: text + - display_name: World from Image + model: marble-1.0-draft + world_prompt: + image_prompt: + source: uri + uri: https://example.com/my-image.jpg + is_pano: false + text_prompt: A beautiful landscape + type: image + - permission: + public: true + world_prompt: + type: video + video_prompt: + media_asset_id: 550e8400e29b41d4a716446655440000 + source: media_asset + - display_name: World from Multiple Images + model: marble-1.1 + world_prompt: + multi_image_prompt: + - azimuth: 0 + content: + source: uri + uri: https://example.com/image1.jpg + - azimuth: 180 + content: source: uri - uri: https://example.com/my-image.jpg - is_pano: false - text_prompt: A beautiful landscape - type: image - - permission: - public: true - world_prompt: - type: video - video_prompt: - media_asset_id: 550e8400e29b41d4a716446655440000 - source: media_asset - - display_name: World from Multiple Images - model: marble-1.1 - world_prompt: - multi_image_prompt: - - azimuth: 0 - content: - source: uri - uri: https://example.com/image1.jpg - - azimuth: 180 - content: - source: uri - uri: https://example.com/image2.jpg - type: multi-image + uri: https://example.com/image2.jpg + type: multi-image properties: display_name: anyOf: - - maxLength: 64 - type: string - - type: 'null' + - maxLength: 64 + type: string + - type: 'null' description: Optional display name (max 64 characters) title: Display Name model: anyOf: - - enum: - - marble-1.0-draft - - marble-1.0 - - marble-1.1 - - marble-1.1-plus - type: string - - enum: - - Marble 0.1-mini - - Marble 0.1-plus - - Marble 1.1-plus - type: string + - enum: + - marble-1.0-draft + - marble-1.0 + - marble-1.1 + - marble-1.1-plus + type: string + - enum: + - Marble 0.1-mini + - Marble 0.1-plus + - Marble 1.1-plus + type: string default: marble-1.0 - description: >- - The model to use for generation. marble-1.1-plus includes dynamic - world sizing. Legacy names ('Marble 0.1-plus', etc.) still work but - are deprecated and will be removed in a future release. + description: The model to use for generation. marble-1.1-plus includes dynamic + world sizing. Legacy names ('Marble 0.1-plus', etc.) still work but are + deprecated and will be removed in a future release. title: Model permission: $ref: '#/components/schemas/Permission' @@ -1361,19 +1338,19 @@ components: description: The permission for the world seed: anyOf: - - maximum: 4294967295 - minimum: 0 - type: integer - - type: 'null' + - maximum: 4294967295.0 + minimum: 0.0 + type: integer + - type: 'null' description: Random seed for generation title: Seed tags: anyOf: - - items: - type: string - maxItems: 10 - type: array - - type: 'null' + - items: + type: string + maxItems: 10 + type: array + - type: 'null' description: Optional tags for the world (max 10 tags, each up to 32 characters) title: Tags world_prompt: @@ -1386,13 +1363,13 @@ components: video: '#/components/schemas/VideoPrompt-Input' propertyName: type oneOf: - - $ref: '#/components/schemas/WorldTextPrompt-Input' - - $ref: '#/components/schemas/ImagePrompt' - - $ref: '#/components/schemas/MultiImagePrompt-Input' - - $ref: '#/components/schemas/VideoPrompt-Input' + - $ref: '#/components/schemas/WorldTextPrompt-Input' + - $ref: '#/components/schemas/ImagePrompt' + - $ref: '#/components/schemas/MultiImagePrompt-Input' + - $ref: '#/components/schemas/VideoPrompt-Input' title: World Prompt required: - - world_prompt + - world_prompt title: WorldsGenerateRequest type: object securitySchemes: @@ -1408,6 +1385,21 @@ info: version: 1.0.0 openapi: 3.1.0 paths: + /marble/v1/credits: + get: + description: "Get remaining API credits for the authenticated user.\n\nReturns:\n\ + \ CreditsResponse with the current aggregate API credit balance.\n\nRaises:\n\ + \ HTTPException: 404 if the caller is not an API-enabled user\n HTTPException:\ + \ 503 if the billing backend is unavailable" + operationId: get_credits_marble_v1_credits_get + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreditsResponse' + description: Successful Response + summary: Get Credits /healthz: get: description: Health check endpoint for Kubernetes probes. @@ -1424,28 +1416,19 @@ paths: summary: Healthz /marble/v1/media-assets/{media_asset_id}: get: - description: |- - Get a media asset by ID. - - Retrieves metadata for a previously created media asset. - - Args: - media_asset_id: The media asset identifier. - - Returns: - MediaAsset object with media_asset_id, file_name, extension, kind, - metadata, created_at, and updated_at. - - Raises: - HTTPException: 404 if not found + description: "Get a media asset by ID.\n\nRetrieves metadata for a previously\ + \ created media asset.\n\nArgs:\n media_asset_id: The media asset identifier.\n\ + \nReturns:\n MediaAsset object with media_asset_id, file_name, extension,\ + \ kind,\n metadata, created_at, and updated_at.\n\nRaises:\n HTTPException:\ + \ 404 if not found" operationId: get_media_asset_marble_v1_media_assets__media_asset_id__get parameters: - - in: path - name: media_asset_id - required: true - schema: - title: Media Asset Id - type: string + - in: path + name: media_asset_id + required: true + schema: + title: Media Asset Id + type: string responses: '200': content: @@ -1462,104 +1445,31 @@ paths: summary: Get Media Asset /marble/v1/media-assets:prepare_upload: post: - description: >- - Prepare a media asset upload for use in world generation. - - - This API endpoint creates a media asset record and returns a signed - upload URL. - - Use this workflow to upload images or videos that you want to reference - in world - - generation requests. - - - ## Workflow - - - 1. **Prepare Upload** (this endpoint): Get a `media_asset_id` and - `upload_url` - - 2. **Upload File**: Use the signed URL to upload your file - - 3. **Generate World**: Reference the `media_asset_id` in - `/worlds:generate` with - source type "media_asset" - - ## Request Parameters - - - - `file_name`: Your file's name (e.g., "landscape.jpg") - - - `extension`: File extension without dot (e.g., "jpg", "png", "mp4") - - - `kind`: Either "image" or "video" - - - `metadata`: Optional custom metadata object - - - ## Response - - - Returns a `MediaAssetPrepareUploadResponse` containing: - - - - `media_asset`: Object with `media_asset_id` (use this in world - generation) - - - `upload_info`: Object with `upload_url`, `required_headers`, and - `curl_example` - - - ## Uploading Your File - - - Use the returned `upload_url` and `required_headers` to upload your - file: - - - ```bash - - curl --request PUT \ - --url \ - --header "Content-Type: " \ - --header ": " \ - --upload-file /path/to/your/file - ``` - - - Replace: - - - ``: The `upload_url` from the response - - - ``: MIME type (e.g., `image/png`, `image/jpeg`, - `video/mp4`) - - - `: `: Each header from `required_headers` - - - `/path/to/your/file`: Path to your local file - - - ## Example Usage in World Generation - - - After uploading, use the `media_asset_id` in a world generation request: - - - ```json - - { - "world_prompt": { - "type": "image", - "image_prompt": { - "source": "media_asset", - "media_asset_id": "" - } - } - } - - ``` + description: "Prepare a media asset upload for use in world generation.\n\n\ + This API endpoint creates a media asset record and returns a signed upload\ + \ URL.\nUse this workflow to upload images or videos that you want to reference\ + \ in world\ngeneration requests.\n\n## Workflow\n\n1. **Prepare Upload** (this\ + \ endpoint): Get a `media_asset_id` and `upload_url`\n2. **Upload File**:\ + \ Use the signed URL to upload your file\n3. **Generate World**: Reference\ + \ the `media_asset_id` in `/worlds:generate` with\n source type \"media_asset\"\ + \n\n## Request Parameters\n\n- `file_name`: Your file's name (e.g., \"landscape.jpg\"\ + )\n- `extension`: File extension without dot (e.g., \"jpg\", \"png\", \"mp4\"\ + )\n- `kind`: Either \"image\" or \"video\"\n- `metadata`: Optional custom\ + \ metadata object\n\n## Response\n\nReturns a `MediaAssetPrepareUploadResponse`\ + \ containing:\n\n- `media_asset`: Object with `media_asset_id` (use this in\ + \ world generation)\n- `upload_info`: Object with `upload_url`, `required_headers`,\ + \ and `curl_example`\n\n## Uploading Your File\n\nUse the returned `upload_url`\ + \ and `required_headers` to upload your file:\n\n```bash\ncurl --request PUT\ + \ \\\n --url \\\n --header \"Content-Type: \"\ + \ \\\n --header \": \" \\\n --upload-file /path/to/your/file\n\ + ```\n\nReplace:\n- ``: The `upload_url` from the response\n- ``:\ + \ MIME type (e.g., `image/png`, `image/jpeg`, `video/mp4`)\n- `:\ + \ `: Each header from `required_headers`\n- `/path/to/your/file`:\ + \ Path to your local file\n\n## Example Usage in World Generation\n\nAfter\ + \ uploading, use the `media_asset_id` in a world generation request:\n\n```json\n\ + {\n \"world_prompt\": {\n \"type\": \"image\",\n \"image_prompt\":\ + \ {\n \"source\": \"media_asset\",\n \"media_asset_id\": \"\"\ + \n }\n }\n}\n```" operationId: prepare_media_asset_upload_marble_v1_media_assets_prepare_upload_post requestBody: content: @@ -1583,45 +1493,32 @@ paths: summary: Prepare a media asset upload /marble/v1/operations/{operation_id}: get: - description: |- - Get an operation by ID. - - Poll this endpoint to check the status of a long-running operation. - When done=true, the response field contains the generated world. - - Args: - operation_id: The operation identifier from /worlds:generate. - - Returns: - GetOperationResponse[World] with: - - operation_id: Operation identifier - - created_at: Creation timestamp - - updated_at: Last update timestamp - - expires_at: Expiration timestamp - - done: true when complete, false while in progress - - error: Error details if failed, null otherwise - - metadata: Progress information and world_id - - response: Generated World if done=true, null otherwise - - Raises: - HTTPException: 401 if unauthorized - HTTPException: 404 if operation not found - HTTPException: 500 if request fails + description: "Get an operation by ID.\n\nPoll this endpoint to check the status\ + \ of a long-running operation.\nWhen done=true, the response field contains\ + \ the generated world.\n\nArgs:\n operation_id: The operation identifier\ + \ from /worlds:generate.\n\nReturns:\n GetOperationResponse[World] with:\n\ + \ - operation_id: Operation identifier\n - created_at: Creation\ + \ timestamp\n - updated_at: Last update timestamp\n - expires_at:\ + \ Expiration timestamp\n - done: true when complete, false while in\ + \ progress\n - error: Error details if failed, null otherwise\n \ + \ - metadata: Progress information and world_id\n - response: Generated\ + \ World if done=true, null otherwise\n\nRaises:\n HTTPException: 401 if\ + \ unauthorized\n HTTPException: 404 if operation not found\n HTTPException:\ + \ 500 if request fails" operationId: get_operation_marble_v1_operations__operation_id__get parameters: - - in: path - name: operation_id - required: true - schema: - title: Operation Id - type: string + - in: path + name: operation_id + required: true + schema: + title: Operation Id + type: string responses: '200': content: application/json: schema: - $ref: >- - #/components/schemas/GetOperationResponse_Union_World__PanoDepthToRgbResult__ + $ref: '#/components/schemas/GetOperationResponse_Union_World__PanoDepthToRgbResult__' description: Successful Response '422': content: @@ -1632,49 +1529,19 @@ paths: summary: Get Operation /marble/v1/pano:depth_to_rgb: post: - description: >- - Generate an RGB panorama from a depth panorama. - - - Provide a depth panorama and a text prompt - - describing the desired appearance. The depth map - - supplies the scene geometry; the model synthesizes - - textures that match that geometry and returns a - - panoramic RGB image. - - - Accepted depth inputs: - - - * **EXR**: float depth values. Omit - ``z_min`` and ``z_max``. - * **PNG**: depth values normalized to [0, 1]. - Provide both ``z_min`` and ``z_max`` so the - service can decode the PNG correctly. - - For a complete PNG-based workflow, see the - - [web-chisel-depth-png - example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png). - - - Returns a long-running ``Operation``. Poll - - ``GET /operations/{operation_id}`` until - - ``done`` is ``true``, then read the generated - - panorama URL from ``response.pano_url``. - - - Raises: - HTTPException: 400 if invalid request - HTTPException: 402 if insufficient credits - HTTPException: 500 if generation could not start + description: "Generate an RGB panorama from a depth panorama.\n\nProvide a depth\ + \ panorama and a text prompt\ndescribing the desired appearance. The depth\ + \ map\nsupplies the scene geometry; the model synthesizes\ntextures that match\ + \ that geometry and returns a\npanoramic RGB image.\n\nAccepted depth inputs:\n\ + \n* **EXR**: float depth values. Omit\n ``z_min`` and ``z_max``.\n* **PNG**:\ + \ depth values normalized to [0, 1].\n Provide both ``z_min`` and ``z_max``\ + \ so the\n service can decode the PNG correctly.\n\nFor a complete PNG-based\ + \ workflow, see the\n[web-chisel-depth-png example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png).\n\ + \nReturns a long-running ``Operation``. Poll\n``GET /operations/{operation_id}``\ + \ until\n``done`` is ``true``, then read the generated\npanorama URL from\ + \ ``response.pano_url``.\n\nRaises:\n HTTPException: 400 if invalid request\n\ + \ HTTPException: 402 if insufficient credits\n HTTPException: 500 if\ + \ generation could not start" operationId: pano_depth_to_rgb_marble_v1_pano_depth_to_rgb_post requestBody: content: @@ -1689,6 +1556,16 @@ paths: schema: $ref: '#/components/schemas/Operation_PanoDepthToRgbResult_' description: Successful Response + '402': + content: + application/json: + example: + detail: Insufficient API credits to start this request. Add credits + or enable auto-refill at https://platform.worldlabs.ai/billing. + schema: + additionalProperties: true + type: object + description: Insufficient Credits '422': content: application/json: @@ -1698,30 +1575,20 @@ paths: summary: Pano Depth To Rgb /marble/v1/worlds/{world_id}: delete: - description: |- - Delete a world by ID. - - Permanently deletes a world and its associated assets. - Only the world owner can delete a world. - - Args: - world_id: The unique identifier of the world to delete. - - Returns: - DeleteWorldResponse confirming the deletion. - - Raises: - HTTPException: 403 if user is not the world owner - HTTPException: 404 if world not found - HTTPException: 500 if deletion fails + description: "Delete a world by ID.\n\nPermanently deletes a world and its associated\ + \ assets.\nOnly the world owner can delete a world.\n\nArgs:\n world_id:\ + \ The unique identifier of the world to delete.\n\nReturns:\n DeleteWorldResponse\ + \ confirming the deletion.\n\nRaises:\n HTTPException: 403 if user is not\ + \ the world owner\n HTTPException: 404 if world not found\n HTTPException:\ + \ 500 if deletion fails" operationId: delete_world_marble_v1_worlds__world_id__delete parameters: - - in: path - name: world_id - required: true - schema: - title: World Id - type: string + - in: path + name: world_id + required: true + schema: + title: World Id + type: string responses: '200': content: @@ -1737,33 +1604,21 @@ paths: description: Validation Error summary: Delete World get: - description: >- - Get a world by ID. - - - Retrieves a world's details including generated assets if available. - - Only the world owner or users with access to public worlds can retrieve - them. - - - Args: - world_id: The unique identifier of the world. - - Returns: - World object with world_id, display_name, tags, assets, created_at, - updated_at, permission, model, world_prompt, and world_marble_url. - - Raises: - HTTPException: 404 if world not found or access denied + description: "Get a world by ID.\n\nRetrieves a world's details including generated\ + \ assets if available.\nOnly the world owner or users with access to public\ + \ worlds can retrieve them.\n\nArgs:\n world_id: The unique identifier\ + \ of the world.\n\nReturns:\n World object with world_id, display_name,\ + \ tags, assets, created_at,\n updated_at, permission, model, world_prompt,\ + \ and world_marble_url.\n\nRaises:\n HTTPException: 404 if world not found\ + \ or access denied" operationId: get_world_marble_v1_worlds__world_id__get parameters: - - in: path - name: world_id - required: true - schema: - title: World Id - type: string + - in: path + name: world_id + required: true + schema: + title: World Id + type: string responses: '200': content: @@ -1780,25 +1635,16 @@ paths: summary: Get World /marble/v1/worlds:generate: post: - description: |- - Start world generation. - - Creates a new world generation job and returns a long-running operation. - Poll the /operations/{operation_id} endpoint to check generation status - and retrieve the generated world when complete. - - Args: - request: The world generation request containing world_prompt, display_name, - tags, model, seed, and permission settings. - - Returns: - GenerateWorldResponse with operation_id and timestamps. Use the operation_id - to poll for completion. - - Raises: - HTTPException: 400 if invalid request or content violates policies - HTTPException: 402 if insufficient credits - HTTPException: 500 if generation could not be started + description: "Start world generation.\n\nCreates a new world generation job\ + \ and returns a long-running operation.\nPoll the /operations/{operation_id}\ + \ endpoint to check generation status\nand retrieve the generated world when\ + \ complete.\n\nArgs:\n request: The world generation request containing\ + \ world_prompt, display_name,\n tags, model, seed, and permission settings.\n\ + \nReturns:\n GenerateWorldResponse with operation_id and timestamps. Use\ + \ the operation_id\n to poll for completion.\n\nRaises:\n HTTPException:\ + \ 400 if invalid request or content violates policies\n HTTPException:\ + \ 402 if insufficient credits\n HTTPException: 500 if generation could\ + \ not be started" operationId: generate_world_marble_v1_worlds_generate_post requestBody: content: @@ -1813,6 +1659,16 @@ paths: schema: $ref: '#/components/schemas/GenerateWorldResponse' description: Successful Response + '402': + content: + application/json: + example: + detail: Insufficient API credits to start this request. Add credits + or enable auto-refill at https://platform.worldlabs.ai/billing. + schema: + additionalProperties: true + type: object + description: Insufficient Credits '422': content: application/json: @@ -1822,32 +1678,19 @@ paths: summary: Generate World /marble/v1/worlds:list: post: - description: >- - List worlds with optional filters. - - - Returns worlds created through the API with optional filtering and - pagination. - - - Args: - request: List request with optional filters: - - page_size: Number of results per page (default: 10) - - page_token: Pagination token from previous response - - status: Filter by status (e.g., "COMPLETED") - - model: Filter by model name (e.g., "marble-1.0-plus") - - tags: Filter by tags (matches worlds with any tag) - - is_public: Filter by visibility (true=public, false=private, null=all) - - created_after: Filter by creation time (after timestamp) - - created_before: Filter by creation time (before timestamp) - - sort_by: Sort order ("created_at" or "updated_at") - - Returns: - ListWorldsResponse with worlds list and next_page_token for pagination. - - Raises: - HTTPException: 400 if invalid parameters - HTTPException: 500 if request fails + description: "List worlds with optional filters.\n\nReturns worlds created through\ + \ the API with optional filtering and pagination.\n\nArgs:\n request: List\ + \ request with optional filters:\n - page_size: Number of results per\ + \ page (default: 10)\n - page_token: Pagination token from previous\ + \ response\n - status: Filter by status (e.g., \"COMPLETED\")\n \ + \ - model: Filter by model name (e.g., \"marble-1.0-plus\")\n -\ + \ tags: Filter by tags (matches worlds with any tag)\n - is_public:\ + \ Filter by visibility (true=public, false=private, null=all)\n - created_after:\ + \ Filter by creation time (after timestamp)\n - created_before: Filter\ + \ by creation time (before timestamp)\n - sort_by: Sort order (\"created_at\"\ + \ or \"updated_at\")\n\nReturns:\n ListWorldsResponse with worlds list\ + \ and next_page_token for pagination.\n\nRaises:\n HTTPException: 400 if\ + \ invalid parameters\n HTTPException: 500 if request fails" operationId: list_worlds_marble_v1_worlds_list_post requestBody: content: @@ -1870,7 +1713,7 @@ paths: description: Validation Error summary: List Worlds security: - - ApiKeyAuth: [] +- ApiKeyAuth: [] servers: - - description: World API - url: https://api.worldlabs.ai +- description: World API + url: https://api.worldlabs.ai