# World Labs

> Generate, export, and manage 3D Marble worlds and their media assets.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/world-labs

## Actions

### Delete a world

Delete a world.

**Inputs**

- World (`world_id`, text, required): World id.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "world_id": "example"
  }
}
```

### Export a world

Export a world.

**Inputs**

- World (`world_id`, text, required): World id.
- Asset type (`asset_type`, text, required): Asset family to export: 'splats' or 'mesh'. One of: `splats`, `mesh`.
- Format (`format`, text, required): Requested export format. One of: `ply`, `glb`.
- Mesh variant (`mesh_variant`, text): Mesh variant to return when an HQ mesh already exists. One of: `textured`, `vertex_colored` (Vertex colored).
- Resolution (`resolution`, text): Splat resolution to convert when exporting splats as PLY. One of: `full_res` (Full res), `500k`, `150k`, `100k`.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "cost": {
      "line_items": [
        {
          "credits": 1,
          "name": "example"
        }
      ],
      "total_credits": 1
    },
    "created_at": "example",
    "done": true,
    "error": {
      "code": 1,
      "message": "example"
    },
    "expires_at": "example",
    "metadata": {},
    "operation_id": "example",
    "response": {
      "asset_type": "splats",
      "format": "ply",
      "mesh_variant": "textured",
      "resolution": "example",
      "url": "example"
    },
    "updated_at": "example"
  }
}
```

### Generate a world

Generate a world.

**Inputs**

- Display name (`display_name`, text): Optional human-readable title for the world (max 64 characters). Stored as world metadata and returned in world responses; does not affect generation. If omitted, World Labs may generate a title from the prompt.
- Model (`model`, text): 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. One of: `marble-1.0-draft`, `marble-1.0`, `marble-1.1`, `marble-1.1-plus`, `Marble 0.1-mini`, `Marble 0.1-plus`, `Marble 1.1-plus`.
- Permission (`permission`, object): The permission for the world.
- Seed (`seed`, number): Random seed for generation. From 0.0 to 4294967295.0.
- Tags (`tags`, list): Optional tags for the world (max 10 tags, each up to 32 characters).
- Text prompt (`text_prompt`, text): Describe the world to generate in plain text.
- World prompt (`world_prompt`, object): Structured prompt for an image, video, or depth panorama.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "cost": {
      "line_items": [
        {
          "credits": 1,
          "name": "example"
        }
      ],
      "total_credits": 1
    },
    "created_at": "example",
    "done": true,
    "error": {
      "code": 1,
      "message": "example"
    },
    "expires_at": "example",
    "metadata": {},
    "operation_id": "example",
    "response": "example",
    "updated_at": "example"
  }
}
```

### Generate an RGB panorama from depth

Generate an RGB panorama from depth.

**Inputs**

- Depth pano image (`depth_pano_image`, object, required): Depth panorama image (EXR or PNG). Provide via URI, media_asset, or base64 (max 100 MB).
- Seed (`seed`, number): Random seed for reproducible generation. From 0.0 to 4294967295.0.
- Text prompt (`text_prompt`, text, required): Text description of the desired appearance.
- Z max (`z_max`, number): 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.
- Z min (`z_min`, number): Minimum depth. Required for PNG depth maps (normalized to [0, 1]). Must be provided together with z_max. Omit for EXR depth maps.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "cost": {
      "line_items": [
        {
          "credits": 1,
          "name": "example"
        }
      ],
      "total_credits": 1
    },
    "created_at": "example",
    "done": true,
    "error": {
      "code": 1,
      "message": "example"
    },
    "expires_at": "example",
    "metadata": {},
    "operation_id": "example",
    "response": {
      "pano_url": "example"
    },
    "updated_at": "example"
  }
}
```

### Get a media asset

Get a media asset.

**Inputs**

- Media asset ID (`media_asset_id`, text, required): Media asset id.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "extension": "example",
    "file_name": "example",
    "kind": "image",
    "media_asset_id": "example",
    "metadata": {},
    "updated_at": "example"
  }
}
```

### Get a world

Get a world.

**Inputs**

- World (`world_id`, text, required): World id.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "assets": {
      "caption": "example",
      "imagery": {
        "pano_url": "example"
      },
      "mesh": {
        "collider_mesh_url": "example",
        "full_res_mesh_url": "example",
        "hq_mesh_url": "example"
      },
      "splats": {
        "semantics_metadata": {
          "ground_plane_offset": 1,
          "metric_scale_factor": 1
        },
        "spz_urls": {}
      },
      "thumbnail_url": "example"
    },
    "created_at": "example",
    "display_name": "example",
    "model": "example",
    "permission": {
      "allow_id_access": true,
      "allowed_readers": [
        "example"
      ],
      "allowed_writers": [
        "example"
      ],
      "public": true
    },
    "tags": [
      "example"
    ],
    "updated_at": "example",
    "world_id": "example",
    "world_marble_url": "example",
    "world_prompt": {
      "depth_pano_image": {
        "data_base64": "example",
        "extension": "example",
        "uri": "example"
      },
      "image_prompt": {
        "data_base64": "example",
        "extension": "example",
        "uri": "example"
      },
      "is_pano": true,
      "multi_image_prompt": [
        {
          "azimuth": 1,
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        }
      ],
      "pano_image": {
        "data_base64": "example",
        "extension": "example",
        "uri": "example"
      },
      "pano_mask": {
        "data_base64": "example",
        "extension": "example",
        "uri": "example"
      },
      "reconstruct_images": true,
      "text_prompt": "example",
      "type": "inpaint-pano",
      "video_prompt": {
        "data_base64": "example",
        "extension": "example",
        "uri": "example"
      },
      "z_max": 1,
      "z_min": 1
    }
  }
}
```

### Get credit balance

Get credit balance.

**Inputs**: None.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "remaining_credits": 1
  }
}
```

### Get operation status

Get operation status.

**Inputs**

- Operation ID (`operation_id`, text, required): Operation id.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "cost": {
      "line_items": [
        {
          "credits": 1,
          "name": "example"
        }
      ],
      "total_credits": 1
    },
    "created_at": "example",
    "done": true,
    "error": {
      "code": 1,
      "message": "example"
    },
    "expires_at": "example",
    "metadata": {},
    "operation_id": "example",
    "response": {
      "asset_type": "splats",
      "assets": {
        "caption": "example",
        "imagery": {
          "pano_url": "example"
        },
        "mesh": {
          "collider_mesh_url": "example",
          "full_res_mesh_url": "example",
          "hq_mesh_url": "example"
        },
        "splats": {
          "semantics_metadata": {},
          "spz_urls": {}
        },
        "thumbnail_url": "example"
      },
      "created_at": "example",
      "display_name": "example",
      "format": "ply",
      "mesh_variant": "textured",
      "model": "example",
      "pano_url": "example",
      "permission": {
        "allow_id_access": true,
        "allowed_readers": [
          "example"
        ],
        "allowed_writers": [
          "example"
        ],
        "public": true
      },
      "resolution": "example",
      "tags": [
        "example"
      ],
      "updated_at": "example",
      "url": "example",
      "world_id": "example",
      "world_marble_url": "example",
      "world_prompt": {
        "depth_pano_image": {
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        },
        "image_prompt": {
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        },
        "is_pano": true,
        "multi_image_prompt": [
          {}
        ],
        "pano_image": {
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        },
        "pano_mask": {
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        },
        "reconstruct_images": true,
        "text_prompt": "example",
        "type": "inpaint-pano",
        "video_prompt": {
          "data_base64": "example",
          "extension": "example",
          "uri": "example"
        },
        "z_max": 1,
        "z_min": 1
      }
    },
    "updated_at": "example"
  }
}
```

### List worlds

List worlds.

**Inputs**

- Created after (`created_after`, date and time): Filter worlds created after this timestamp (inclusive).
- Created before (`created_before`, date and time): Filter worlds created before this timestamp (exclusive).
- Is public (`is_public`, true/false): Filter by visibility. true=public only, false=private only, null=all.
- Model (`model`, text): Filter by model used for generation. Legacy names are deprecated; use the new lowercase names. One of: `marble-1.0-draft`, `marble-1.0`, `marble-1.1`, `marble-1.1-plus`, `Marble 0.1-mini`, `Marble 0.1-plus`, `Marble 1.1-plus`.
- Page size (`page_size`, number): Number of results per page (1-100). From 1.0 to 100.0.
- Page token (`page_token`, text): Cursor token for pagination (opaque base64 string from previous response). Use cursor from next_page_token in previous response for consistent pagination.
- Sort by (`sort_by`, text): Sort results by created_at or updated_at. One of: `created_at` (Created at), `updated_at` (Updated at).
- Status (`status`, text): Filter by world status. One of: `SUCCEEDED`, `PENDING`, `FAILED`, `RUNNING`.
- Tags (`tags`, list): Filter by tags (returns worlds with ANY of these tags).

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "next_page_token": "example",
    "worlds": [
      {
        "assets": {
          "caption": "example",
          "imagery": {},
          "mesh": {},
          "splats": {},
          "thumbnail_url": "example"
        },
        "created_at": "example",
        "display_name": "example",
        "model": "example",
        "permission": {
          "allow_id_access": true,
          "allowed_readers": [
            {}
          ],
          "allowed_writers": [
            {}
          ],
          "public": true
        },
        "tags": [
          "example"
        ],
        "updated_at": "example",
        "world_id": "example",
        "world_marble_url": "example",
        "world_prompt": {
          "depth_pano_image": {},
          "image_prompt": {},
          "is_pano": true,
          "multi_image_prompt": [
            {}
          ],
          "pano_image": {},
          "pano_mask": {},
          "reconstruct_images": true,
          "text_prompt": "example",
          "type": "inpaint-pano",
          "video_prompt": {},
          "z_max": 1,
          "z_min": 1
        }
      }
    ]
  }
}
```

### Prepare a media upload

Prepare a media upload.

**Inputs**

- Extension (`extension`, text): File extension without dot.
- File name (`file_name`, text, required): File name.
- Media kind (`media_kind`, text, required): High-level media type. One of: `image`, `video`.
- Metadata (`metadata`, object): Optional application-specific metadata.

**Outputs**

- `data` (object): The response from World Labs.

**Example output**

```json
{
  "data": {
    "media_asset": {
      "created_at": "example",
      "extension": "example",
      "file_name": "example",
      "kind": "image",
      "media_asset_id": "example",
      "metadata": {},
      "updated_at": "example"
    },
    "upload_info": {
      "curl_example": "example",
      "required_headers": {},
      "upload_method": "example",
      "upload_url": "example"
    }
  }
}
```
