You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/adapters/worldlabs.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ keywords:
12
12
- adapter
13
13
---
14
14
15
-
You want a finished 3D world from a prompt, an image, or a video. World Labs Marble generates splat files, a mesh, and a viewer URL. Generation takes a few minutes.
15
+
You want a finished 3D world from a prompt, an image, or a video. World Labs Marble generates splat files, a mesh, and a viewer URL. Generation often takes several minutes.
16
16
17
17
Use `worldlabsWorld()` with `generateWorld()`. This adapter does not support `chat()`.
prompt: 'A mystical forest with glowing mushrooms',
48
+
timeout: 12*60*1000,
48
49
})
49
50
```
50
51
51
-
`world.url` is the Marble viewer URL (`https://marble.worldlabs.ai/world/{id}`). `world.assets`has splat, mesh, panorama, and thumbnail links when the job finishes.
52
+
`world.url` is the Marble viewer URL (`https://marble.worldlabs.ai/world/{id}`). Do not iframe it. `world.assets`is optional. Splat, mesh, panorama, and thumbnail links appear only when the World Labs response includes them. Those URLs are often signed CDN links.
52
53
53
-
World Labs bills in credits per generation. The call waits until the world is ready (about 5 minutes). Pass a long `timeout` on serverless, or set `wait: false` and poll later.
54
+
World Labs bills in credits per generation. The call waits until the world is ready (often several minutes). Pass a long `timeout` on serverless, or set `wait: false` and poll later.
When `wait` is `false`, `world.status` is `waiting` and `world.operationId` is set. Call `generateWorld` again with `wait: true` only starts a new job. Poll the World Labs operations API with that id, or keep `wait` at the default.
When `wait` is `false`, `world.status` is `waiting` and `world.operationId` is set. This adapter cannot resume that id. Call `generateWorld` again with `wait: true` only starts a new job. Poll `GET /marble/v1/operations/{operationId}` yourself, or keep `wait` at the default.
116
106
117
107
## What you have now
118
108
119
-
A server call that generates a Marble world and returns the viewer URL plus asset links. The media example loads `world.assets.splats.spzUrls` in Spark so you can walk the scene in the page. You can also open `world.url`. Splat export needs a World Labs plan that returns those files.
109
+
A server call that generates a Marble world and returns the viewer URL plus optional asset links. The media example picks one SPZ (prefers `500k`) and loads it in Spark through `/api/marble-splat`. If no splat URL is present, it shows a thumbnail and an Open in Marble link.
Copy file name to clipboardExpand all lines: docs/media/world-generation.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ keywords:
18
18
19
19
# World Generation (Experimental)
20
20
21
-
You want a world from a prompt. Some providers open a live session you can steer. Other providers generate a finished 3D world you can view and download.
21
+
You want a world from a prompt. Some providers open a live session you can steer. Other providers generate a finished 3D world. Open `world.url` to view it. Asset URLs on `world.assets` are often signed.
22
22
23
23
Call `generateWorld()` on the server with a world adapter. Reactor mints a session token. World Labs returns a Marble viewer URL after the job finishes.
Happy Oyster (`happy-oyster-adventure`, `happy-oyster-director`) uses `createWorld` and `startTravel` after connect. See the [Reactor adapter](../adapters/reactor) for every id. Helios also works with `generateLiveVideo()` and `reactorVideo()`. See [Live Generation](./live-generation).
163
163
164
-
A full app lives in [`examples/ts-react-media`](https://github.com/TanStack/ai/tree/main/examples/ts-react-media). Open the World tab. Pick a Reactor model for a live stream, or a Marble model for a finished 3D world. Marble worlds play in the page with Spark.
164
+
A full app lives in [`examples/ts-react-media`](https://github.com/TanStack/ai/tree/main/examples/ts-react-media). Open the World tab. Pick a Reactor model for a live stream, or a Marble model for a finished 3D world. If splat files are present, the example loads one SPZ in Spark. If not, it shows a thumbnail and an Open in Marble link.
165
165
166
166
## Finished 3D worlds (World Labs)
167
167
@@ -178,8 +178,8 @@ const world = await generateWorld({
178
178
})
179
179
```
180
180
181
-
`world.url` is the Marble viewer. `world.assets`has splat, mesh, and panorama URLs. See the [World Labs adapter](../adapters/worldlabs) for image and video inputs, models, and `wait: false`.
181
+
`world.url` is the Marble viewer. Do not iframe it. `world.assets`is optional and holds splat, mesh, and panorama URLs when the provider returns them. See the [World Labs adapter](../adapters/worldlabs) for image and video inputs, models, and `wait: false`. `wait: false` returns `operationId`. This SDK cannot resume that id.
182
182
183
183
## What you have now
184
184
185
-
A server route that mints a live world session, or a server call that returns a finished Marble world. For Reactor, connect in the browser and change the prompt to steer the stream. The media example can save a Reactor session as MP4 when the model has recording enabled, and download Marble splat files when the plan returns them.
185
+
A server route that mints a live world session, or a server call that returns a finished Marble world. For Reactor, connect in the browser and change the prompt to steer the stream. The media example can save a Reactor session as MP4 when recording is enabled for that model or plan, and download Marble files when the response includes them.
0 commit comments