@tanstack/ai-worldlabs 0.0.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -2
  3. package/dist/esm/adapters/world.d.ts +38 -0
  4. package/dist/esm/adapters/world.js +314 -0
  5. package/dist/esm/adapters/world.js.map +1 -0
  6. package/dist/esm/byok.d.ts +1 -0
  7. package/dist/esm/byok.js +11 -0
  8. package/dist/esm/byok.js.map +1 -0
  9. package/dist/esm/generated/client/client.gen.d.ts +2 -0
  10. package/dist/esm/generated/client/client.gen.js +174 -0
  11. package/dist/esm/generated/client/client.gen.js.map +1 -0
  12. package/dist/esm/generated/client/index.d.ts +10 -0
  13. package/dist/esm/generated/client/index.js +5 -0
  14. package/dist/esm/generated/client/types.gen.d.ts +120 -0
  15. package/dist/esm/generated/client/utils.gen.d.ts +37 -0
  16. package/dist/esm/generated/client/utils.gen.js +177 -0
  17. package/dist/esm/generated/client/utils.gen.js.map +1 -0
  18. package/dist/esm/generated/client.d.ts +1 -0
  19. package/dist/esm/generated/client.gen.d.ts +12 -0
  20. package/dist/esm/generated/client.gen.js +9 -0
  21. package/dist/esm/generated/client.gen.js.map +1 -0
  22. package/dist/esm/generated/client.js +5 -0
  23. package/dist/esm/generated/core/auth.gen.d.ts +25 -0
  24. package/dist/esm/generated/core/auth.gen.js +12 -0
  25. package/dist/esm/generated/core/auth.gen.js.map +1 -0
  26. package/dist/esm/generated/core/bodySerializer.gen.d.ts +25 -0
  27. package/dist/esm/generated/core/bodySerializer.gen.js +6 -0
  28. package/dist/esm/generated/core/bodySerializer.gen.js.map +1 -0
  29. package/dist/esm/generated/core/params.gen.d.ts +43 -0
  30. package/dist/esm/generated/core/params.gen.js +9 -0
  31. package/dist/esm/generated/core/params.gen.js.map +1 -0
  32. package/dist/esm/generated/core/pathSerializer.gen.d.ts +33 -0
  33. package/dist/esm/generated/core/pathSerializer.gen.js +82 -0
  34. package/dist/esm/generated/core/pathSerializer.gen.js.map +1 -0
  35. package/dist/esm/generated/core/queryKeySerializer.gen.d.ts +18 -0
  36. package/dist/esm/generated/core/serverSentEvents.gen.d.ts +71 -0
  37. package/dist/esm/generated/core/serverSentEvents.gen.js +96 -0
  38. package/dist/esm/generated/core/serverSentEvents.gen.js.map +1 -0
  39. package/dist/esm/generated/core/types.gen.d.ts +83 -0
  40. package/dist/esm/generated/core/utils.gen.d.ts +19 -0
  41. package/dist/esm/generated/core/utils.gen.js +78 -0
  42. package/dist/esm/generated/core/utils.gen.js.map +1 -0
  43. package/dist/esm/generated/index.d.ts +2 -0
  44. package/dist/esm/generated/sdk.gen.d.ts +275 -0
  45. package/dist/esm/generated/sdk.gen.js +79 -0
  46. package/dist/esm/generated/sdk.gen.js.map +1 -0
  47. package/dist/esm/generated/types.gen.d.ts +1610 -0
  48. package/dist/esm/index.d.ts +5 -0
  49. package/dist/esm/index.js +4 -0
  50. package/dist/esm/model-meta.d.ts +63 -0
  51. package/dist/esm/model-meta.js +17 -0
  52. package/dist/esm/model-meta.js.map +1 -0
  53. package/dist/esm/utils/client.d.ts +16 -0
  54. package/dist/esm/utils/client.js +35 -0
  55. package/dist/esm/utils/client.js.map +1 -0
  56. package/package.json +55 -6
  57. package/src/adapters/world.ts +535 -0
  58. package/src/byok.ts +7 -0
  59. package/src/generated/client/client.gen.ts +301 -0
  60. package/src/generated/client/index.ts +27 -0
  61. package/src/generated/client/types.gen.ts +247 -0
  62. package/src/generated/client/utils.gen.ts +332 -0
  63. package/src/generated/client.gen.ts +26 -0
  64. package/src/generated/client.ts +3 -0
  65. package/src/generated/core/auth.gen.ts +48 -0
  66. package/src/generated/core/bodySerializer.gen.ts +96 -0
  67. package/src/generated/core/params.gen.ts +186 -0
  68. package/src/generated/core/pathSerializer.gen.ts +186 -0
  69. package/src/generated/core/queryKeySerializer.gen.ts +139 -0
  70. package/src/generated/core/serverSentEvents.gen.ts +265 -0
  71. package/src/generated/core/types.gen.ts +124 -0
  72. package/src/generated/core/utils.gen.ts +146 -0
  73. package/src/generated/index.ts +113 -0
  74. package/src/generated/sdk.gen.ts +531 -0
  75. package/src/generated/types.gen.ts +1767 -0
  76. package/src/index.ts +20 -0
  77. package/src/model-meta.ts +79 -0
  78. package/src/utils/client.ts +50 -0
@@ -0,0 +1,531 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type {
4
+ Client,
5
+ ClientMeta,
6
+ Options as Options2,
7
+ RequestResult,
8
+ TDataShape,
9
+ } from './client'
10
+ import { client } from './client.gen'
11
+ import type {
12
+ DeleteWorldMarbleV1WorldsWorldIdDeleteData,
13
+ DeleteWorldMarbleV1WorldsWorldIdDeleteErrors,
14
+ DeleteWorldMarbleV1WorldsWorldIdDeleteResponses,
15
+ ExportWorldMarbleV1WorldsWorldIdExportPostData,
16
+ ExportWorldMarbleV1WorldsWorldIdExportPostErrors,
17
+ ExportWorldMarbleV1WorldsWorldIdExportPostResponses,
18
+ GenerateWorldMarbleV1WorldsGeneratePostData,
19
+ GenerateWorldMarbleV1WorldsGeneratePostErrors,
20
+ GenerateWorldMarbleV1WorldsGeneratePostResponses,
21
+ GetCreditsMarbleV1CreditsGetData,
22
+ GetCreditsMarbleV1CreditsGetResponses,
23
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetData,
24
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetErrors,
25
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponses,
26
+ GetOperationMarbleV1OperationsOperationIdGetData,
27
+ GetOperationMarbleV1OperationsOperationIdGetErrors,
28
+ GetOperationMarbleV1OperationsOperationIdGetResponses,
29
+ GetWorldMarbleV1WorldsWorldIdGetData,
30
+ GetWorldMarbleV1WorldsWorldIdGetErrors,
31
+ GetWorldMarbleV1WorldsWorldIdGetResponses,
32
+ ListWorldsMarbleV1WorldsListPostData,
33
+ ListWorldsMarbleV1WorldsListPostErrors,
34
+ ListWorldsMarbleV1WorldsListPostResponses,
35
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostData,
36
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostErrors,
37
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponses,
38
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostData,
39
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostErrors,
40
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostResponses,
41
+ } from './types.gen'
42
+
43
+ export type Options<
44
+ TData extends TDataShape = TDataShape,
45
+ ThrowOnError extends boolean = boolean,
46
+ TResponse = unknown,
47
+ > = Options2<TData, ThrowOnError, TResponse> & {
48
+ /**
49
+ * You can provide a client instance returned by `createClient()` instead of
50
+ * individual options. This might be also useful if you want to implement a
51
+ * custom client.
52
+ */
53
+ client?: Client
54
+ /**
55
+ * You can pass arbitrary values through the `meta` object. This can be
56
+ * used to access values that aren't defined as part of the SDK function.
57
+ */
58
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta
59
+ }
60
+
61
+ /**
62
+ * Get Credits
63
+ *
64
+ * Get remaining API credits for the authenticated user.
65
+ *
66
+ * Returns:
67
+ * CreditsResponse with the current aggregate API credit balance.
68
+ *
69
+ * Raises:
70
+ * HTTPException: 404 if the caller is not an API-enabled user
71
+ * HTTPException: 503 if the billing backend is unavailable
72
+ */
73
+ export const getCreditsMarbleV1CreditsGet = <
74
+ ThrowOnError extends boolean = false,
75
+ >(
76
+ options?: Options<GetCreditsMarbleV1CreditsGetData, ThrowOnError>,
77
+ ): RequestResult<
78
+ GetCreditsMarbleV1CreditsGetResponses,
79
+ unknown,
80
+ ThrowOnError
81
+ > =>
82
+ (options?.client ?? client).get<
83
+ GetCreditsMarbleV1CreditsGetResponses,
84
+ unknown,
85
+ ThrowOnError
86
+ >({
87
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
88
+ url: '/marble/v1/credits',
89
+ ...options,
90
+ })
91
+
92
+ /**
93
+ * Get Media Asset
94
+ *
95
+ * Get a media asset by ID.
96
+ *
97
+ * Retrieves metadata for a previously created media asset.
98
+ *
99
+ * Args:
100
+ * media_asset_id: The media asset identifier.
101
+ *
102
+ * Returns:
103
+ * MediaAsset object with media_asset_id, file_name, extension, kind,
104
+ * metadata, created_at, and updated_at.
105
+ *
106
+ * Raises:
107
+ * HTTPException: 404 if not found
108
+ */
109
+ export const getMediaAssetMarbleV1MediaAssetsMediaAssetIdGet = <
110
+ ThrowOnError extends boolean = false,
111
+ >(
112
+ options: Options<
113
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetData,
114
+ ThrowOnError
115
+ >,
116
+ ): RequestResult<
117
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponses,
118
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetErrors,
119
+ ThrowOnError
120
+ > =>
121
+ (options.client ?? client).get<
122
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponses,
123
+ GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetErrors,
124
+ ThrowOnError
125
+ >({
126
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
127
+ url: '/marble/v1/media-assets/{media_asset_id}',
128
+ ...options,
129
+ })
130
+
131
+ /**
132
+ * Prepare a media asset upload
133
+ *
134
+ * Prepare a media asset upload for use in world generation.
135
+ *
136
+ * This API endpoint creates a media asset record and returns a signed upload URL.
137
+ * Use this workflow to upload images or videos that you want to reference in world
138
+ * generation requests.
139
+ *
140
+ * ## Workflow
141
+ *
142
+ * 1. **Prepare Upload** (this endpoint): Get a `media_asset_id` and `upload_url`
143
+ * 2. **Upload File**: Use the signed URL to upload your file
144
+ * 3. **Generate World**: Reference the `media_asset_id` in `/worlds:generate` with
145
+ * source type "media_asset"
146
+ *
147
+ * ## Request Parameters
148
+ *
149
+ * - `file_name`: Your file's name (e.g., "landscape.jpg")
150
+ * - `extension`: File extension without dot (e.g., "jpg", "png", "mp4")
151
+ * - `kind`: Either "image" or "video"
152
+ * - `metadata`: Optional custom metadata object
153
+ *
154
+ * ## Response
155
+ *
156
+ * Returns a `MediaAssetPrepareUploadResponse` containing:
157
+ *
158
+ * - `media_asset`: Object with `media_asset_id` (use this in world generation)
159
+ * - `upload_info`: Object with `upload_url`, `required_headers`, and `curl_example`
160
+ *
161
+ * ## Uploading Your File
162
+ *
163
+ * Use the returned `upload_url` and `required_headers` to upload your file:
164
+ *
165
+ * ```bash
166
+ * curl --request PUT \
167
+ * --url <upload_url> \
168
+ * --header "Content-Type: <content-type>" \
169
+ * --header "<header-name>: <header-value>" \
170
+ * --upload-file /path/to/your/file
171
+ * ```
172
+ *
173
+ * Replace:
174
+ * - `<upload_url>`: The `upload_url` from the response
175
+ * - `<content-type>`: MIME type (e.g., `image/png`, `image/jpeg`, `video/mp4`)
176
+ * - `<header-name>: <header-value>`: Each header from `required_headers`
177
+ * - `/path/to/your/file`: Path to your local file
178
+ *
179
+ * ## Example Usage in World Generation
180
+ *
181
+ * After uploading, use the `media_asset_id` in a world generation request:
182
+ *
183
+ * ```json
184
+ * {
185
+ * "world_prompt": {
186
+ * "type": "image",
187
+ * "image_prompt": {
188
+ * "source": "media_asset",
189
+ * "media_asset_id": "<your-media-asset-id>"
190
+ * }
191
+ * }
192
+ * }
193
+ * ```
194
+ */
195
+ export const prepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPost = <
196
+ ThrowOnError extends boolean = false,
197
+ >(
198
+ options: Options<
199
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostData,
200
+ ThrowOnError
201
+ >,
202
+ ): RequestResult<
203
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostResponses,
204
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostErrors,
205
+ ThrowOnError
206
+ > =>
207
+ (options.client ?? client).post<
208
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostResponses,
209
+ PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostErrors,
210
+ ThrowOnError
211
+ >({
212
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
213
+ url: '/marble/v1/media-assets:prepare_upload',
214
+ ...options,
215
+ headers: {
216
+ 'Content-Type': 'application/json',
217
+ ...options.headers,
218
+ },
219
+ })
220
+
221
+ /**
222
+ * Get Operation
223
+ *
224
+ * Get an operation by ID.
225
+ *
226
+ * Poll this endpoint to check the status of a long-running operation.
227
+ * When done=true, the response field contains the generated world.
228
+ *
229
+ * Args:
230
+ * operation_id: The operation identifier from /worlds:generate.
231
+ *
232
+ * Returns:
233
+ * GetOperationResponse[World] with:
234
+ * - operation_id: Operation identifier
235
+ * - created_at: Creation timestamp
236
+ * - updated_at: Last update timestamp
237
+ * - expires_at: Expiration timestamp
238
+ * - done: true when complete, false while in progress
239
+ * - error: Error details if failed, null otherwise
240
+ * - metadata: Progress information and world_id
241
+ * - response: Generated World if done=true, null otherwise
242
+ * - cost: Settled credit cost breakdown; populated only when the
243
+ * operation completed successfully (done=true with no error)
244
+ * and a public price is known for its operation type. Failed
245
+ * or in-progress operations return null.
246
+ *
247
+ * Raises:
248
+ * HTTPException: 401 if unauthorized
249
+ * HTTPException: 404 if operation not found
250
+ * HTTPException: 500 if request fails
251
+ */
252
+ export const getOperationMarbleV1OperationsOperationIdGet = <
253
+ ThrowOnError extends boolean = false,
254
+ >(
255
+ options: Options<
256
+ GetOperationMarbleV1OperationsOperationIdGetData,
257
+ ThrowOnError
258
+ >,
259
+ ): RequestResult<
260
+ GetOperationMarbleV1OperationsOperationIdGetResponses,
261
+ GetOperationMarbleV1OperationsOperationIdGetErrors,
262
+ ThrowOnError
263
+ > =>
264
+ (options.client ?? client).get<
265
+ GetOperationMarbleV1OperationsOperationIdGetResponses,
266
+ GetOperationMarbleV1OperationsOperationIdGetErrors,
267
+ ThrowOnError
268
+ >({
269
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
270
+ url: '/marble/v1/operations/{operation_id}',
271
+ ...options,
272
+ })
273
+
274
+ /**
275
+ * Pano Depth To Rgb
276
+ *
277
+ * Generate an RGB panorama from a depth panorama.
278
+ *
279
+ * Provide a depth panorama and a text prompt
280
+ * describing the desired appearance. The depth map
281
+ * supplies the scene geometry; the model synthesizes
282
+ * textures that match that geometry and returns a
283
+ * panoramic RGB image.
284
+ *
285
+ * Accepted depth inputs:
286
+ *
287
+ * * **EXR**: float depth values. Omit
288
+ * ``z_min`` and ``z_max``.
289
+ * * **PNG**: depth values normalized to [0, 1].
290
+ * Provide both ``z_min`` and ``z_max`` so the
291
+ * service can decode the PNG correctly.
292
+ *
293
+ * For a complete PNG-based workflow, see the
294
+ * [web-chisel-depth-png example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png).
295
+ *
296
+ * Returns a long-running ``Operation``. Poll
297
+ * ``GET /operations/{operation_id}`` until
298
+ * ``done`` is ``true``, then read the generated
299
+ * panorama URL from ``response.pano_url``.
300
+ *
301
+ * Raises:
302
+ * HTTPException: 400 if invalid request
303
+ * HTTPException: 402 if insufficient credits
304
+ * HTTPException: 500 if generation could not start
305
+ */
306
+ export const panoDepthToRgbMarbleV1PanoDepthToRgbPost = <
307
+ ThrowOnError extends boolean = false,
308
+ >(
309
+ options: Options<PanoDepthToRgbMarbleV1PanoDepthToRgbPostData, ThrowOnError>,
310
+ ): RequestResult<
311
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponses,
312
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostErrors,
313
+ ThrowOnError
314
+ > =>
315
+ (options.client ?? client).post<
316
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostResponses,
317
+ PanoDepthToRgbMarbleV1PanoDepthToRgbPostErrors,
318
+ ThrowOnError
319
+ >({
320
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
321
+ url: '/marble/v1/pano:depth_to_rgb',
322
+ ...options,
323
+ headers: {
324
+ 'Content-Type': 'application/json',
325
+ ...options.headers,
326
+ },
327
+ })
328
+
329
+ /**
330
+ * Delete World
331
+ *
332
+ * Delete a world by ID.
333
+ *
334
+ * Permanently deletes a world and its associated assets.
335
+ * Only the world owner can delete a world.
336
+ *
337
+ * Args:
338
+ * world_id: The unique identifier of the world to delete.
339
+ *
340
+ * Returns:
341
+ * DeleteWorldResponse confirming the deletion.
342
+ *
343
+ * Raises:
344
+ * HTTPException: 403 if user is not the world owner
345
+ * HTTPException: 404 if world not found
346
+ * HTTPException: 500 if deletion fails
347
+ */
348
+ export const deleteWorldMarbleV1WorldsWorldIdDelete = <
349
+ ThrowOnError extends boolean = false,
350
+ >(
351
+ options: Options<DeleteWorldMarbleV1WorldsWorldIdDeleteData, ThrowOnError>,
352
+ ): RequestResult<
353
+ DeleteWorldMarbleV1WorldsWorldIdDeleteResponses,
354
+ DeleteWorldMarbleV1WorldsWorldIdDeleteErrors,
355
+ ThrowOnError
356
+ > =>
357
+ (options.client ?? client).delete<
358
+ DeleteWorldMarbleV1WorldsWorldIdDeleteResponses,
359
+ DeleteWorldMarbleV1WorldsWorldIdDeleteErrors,
360
+ ThrowOnError
361
+ >({
362
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
363
+ url: '/marble/v1/worlds/{world_id}',
364
+ ...options,
365
+ })
366
+
367
+ /**
368
+ * Get World
369
+ *
370
+ * Get a world by ID.
371
+ *
372
+ * Retrieves a world's details including generated assets if available.
373
+ * Only the world owner or users with access to public worlds can retrieve them.
374
+ *
375
+ * Args:
376
+ * world_id: The unique identifier of the world.
377
+ *
378
+ * Returns:
379
+ * World object with world_id, display_name, tags, assets, created_at,
380
+ * updated_at, permission, model, world_prompt, and world_marble_url.
381
+ *
382
+ * Raises:
383
+ * HTTPException: 404 if world not found or access denied
384
+ */
385
+ export const getWorldMarbleV1WorldsWorldIdGet = <
386
+ ThrowOnError extends boolean = false,
387
+ >(
388
+ options: Options<GetWorldMarbleV1WorldsWorldIdGetData, ThrowOnError>,
389
+ ): RequestResult<
390
+ GetWorldMarbleV1WorldsWorldIdGetResponses,
391
+ GetWorldMarbleV1WorldsWorldIdGetErrors,
392
+ ThrowOnError
393
+ > =>
394
+ (options.client ?? client).get<
395
+ GetWorldMarbleV1WorldsWorldIdGetResponses,
396
+ GetWorldMarbleV1WorldsWorldIdGetErrors,
397
+ ThrowOnError
398
+ >({
399
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
400
+ url: '/marble/v1/worlds/{world_id}',
401
+ ...options,
402
+ })
403
+
404
+ /**
405
+ * Export World
406
+ *
407
+ * Export a generated world asset.
408
+ *
409
+ * PLY splat exports are converted synchronously, cached in GCS, and returned
410
+ * as completed operations. HQ mesh exports reuse the existing async mesh
411
+ * export service and return an in-progress operation.
412
+ */
413
+ export const exportWorldMarbleV1WorldsWorldIdExportPost = <
414
+ ThrowOnError extends boolean = false,
415
+ >(
416
+ options: Options<
417
+ ExportWorldMarbleV1WorldsWorldIdExportPostData,
418
+ ThrowOnError
419
+ >,
420
+ ): RequestResult<
421
+ ExportWorldMarbleV1WorldsWorldIdExportPostResponses,
422
+ ExportWorldMarbleV1WorldsWorldIdExportPostErrors,
423
+ ThrowOnError
424
+ > =>
425
+ (options.client ?? client).post<
426
+ ExportWorldMarbleV1WorldsWorldIdExportPostResponses,
427
+ ExportWorldMarbleV1WorldsWorldIdExportPostErrors,
428
+ ThrowOnError
429
+ >({
430
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
431
+ url: '/marble/v1/worlds/{world_id}:export',
432
+ ...options,
433
+ headers: {
434
+ 'Content-Type': 'application/json',
435
+ ...options.headers,
436
+ },
437
+ })
438
+
439
+ /**
440
+ * Generate World
441
+ *
442
+ * Start world generation.
443
+ *
444
+ * Creates a new world generation job and returns a long-running operation.
445
+ * Poll the /operations/{operation_id} endpoint to check generation status
446
+ * and retrieve the generated world when complete.
447
+ *
448
+ * Args:
449
+ * request: The world generation request containing world_prompt, display_name,
450
+ * tags, model, seed, and permission settings.
451
+ *
452
+ * Returns:
453
+ * GenerateWorldResponse with operation_id and timestamps. Use the operation_id
454
+ * to poll for completion.
455
+ *
456
+ * Raises:
457
+ * HTTPException: 400 if invalid request or content violates policies
458
+ * HTTPException: 402 if insufficient credits
459
+ * HTTPException: 500 if generation could not be started
460
+ */
461
+ export const generateWorldMarbleV1WorldsGeneratePost = <
462
+ ThrowOnError extends boolean = false,
463
+ >(
464
+ options: Options<GenerateWorldMarbleV1WorldsGeneratePostData, ThrowOnError>,
465
+ ): RequestResult<
466
+ GenerateWorldMarbleV1WorldsGeneratePostResponses,
467
+ GenerateWorldMarbleV1WorldsGeneratePostErrors,
468
+ ThrowOnError
469
+ > =>
470
+ (options.client ?? client).post<
471
+ GenerateWorldMarbleV1WorldsGeneratePostResponses,
472
+ GenerateWorldMarbleV1WorldsGeneratePostErrors,
473
+ ThrowOnError
474
+ >({
475
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
476
+ url: '/marble/v1/worlds:generate',
477
+ ...options,
478
+ headers: {
479
+ 'Content-Type': 'application/json',
480
+ ...options.headers,
481
+ },
482
+ })
483
+
484
+ /**
485
+ * List Worlds
486
+ *
487
+ * List worlds with optional filters.
488
+ *
489
+ * Returns worlds created through the API with optional filtering and pagination.
490
+ *
491
+ * Args:
492
+ * request: List request with optional filters:
493
+ * - page_size: Number of results per page (default: 10)
494
+ * - page_token: Pagination token from previous response
495
+ * - status: Filter by status (e.g., "COMPLETED")
496
+ * - model: Filter by model name (e.g., "marble-1.0-plus")
497
+ * - tags: Filter by tags (matches worlds with any tag)
498
+ * - is_public: Filter by visibility (true=public, false=private, null=all)
499
+ * - created_after: Filter by creation time (after timestamp)
500
+ * - created_before: Filter by creation time (before timestamp)
501
+ * - sort_by: Sort order ("created_at" or "updated_at")
502
+ *
503
+ * Returns:
504
+ * ListWorldsResponse with worlds list and next_page_token for pagination.
505
+ *
506
+ * Raises:
507
+ * HTTPException: 400 if invalid parameters
508
+ * HTTPException: 500 if request fails
509
+ */
510
+ export const listWorldsMarbleV1WorldsListPost = <
511
+ ThrowOnError extends boolean = false,
512
+ >(
513
+ options: Options<ListWorldsMarbleV1WorldsListPostData, ThrowOnError>,
514
+ ): RequestResult<
515
+ ListWorldsMarbleV1WorldsListPostResponses,
516
+ ListWorldsMarbleV1WorldsListPostErrors,
517
+ ThrowOnError
518
+ > =>
519
+ (options.client ?? client).post<
520
+ ListWorldsMarbleV1WorldsListPostResponses,
521
+ ListWorldsMarbleV1WorldsListPostErrors,
522
+ ThrowOnError
523
+ >({
524
+ security: [{ name: 'WLT-Api-Key', type: 'apiKey' }],
525
+ url: '/marble/v1/worlds:list',
526
+ ...options,
527
+ headers: {
528
+ 'Content-Type': 'application/json',
529
+ ...options.headers,
530
+ },
531
+ })