Skip to main content

Quickstart

1

Get an API key

1
Sign in to the World Labs Platform with your Marble account.If you don’t have a Marble account, you’ll be prompted to create one.
2
Visit the billing page.Add a payment method to your account and then purchase some credits to get started.
3
Generate an API key from the API keys page.
Save your API key in a secure location and never share it with anyone.
2

Create your first world

To verify your development setup is working, we recommend creating a world from only a text prompt.You can also create a world from an image, multiple images of the same scene, or a video.
Iterate more quickly with Marble 0.1-mini (equivalent to Draft in Marble).This example uses Marble 0.1-plus by default for best quality. If you’re iterating or debugging, you can use Marble 0.1-mini for much faster (30-45s) and cheaper generations.To use it, add "model": "Marble 0.1-mini" to your request body.
1
Make a POST request to the /marble/v1/worlds:generate endpoint.
Request
curl -X POST 'https://api.worldlabs.ai/marble/v1/worlds:generate' \
  -H 'Content-Type: application/json' \
  -H 'WLT-Api-Key: YOUR_API_KEY' \
  -d '{
    "display_name": "Mystical Forest",
    "world_prompt": {
      "type": "text",
      "text_prompt": "A mystical forest with glowing mushrooms"
    }
  }'
This will return an Operation object.
{
  "operation_id": "20bffbb1-4ba7-453f-a116-93eaw1a6843e",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z",
  "expires_at": "2025-01-15T11:30:00Z",
  "done": false,
  "error": null,
  "metadata": null,
  "response": null
}
2
Poll the /marble/v1/operations/{operation_id} endpoint until the operation is done.
curl -X GET 'https://api.worldlabs.ai/marble/v1/operations/20bffbb1-4ba7-453f-a116-93eaw1a6843e' \
  -H 'WLT-Api-Key: YOUR_API_KEY'
This will return an Operation object. If the operation is not done, it will return a 200 status code and the Operation object will have a done field set to false:
{
  "operation_id": "20bffbb1-4ba7-453f-a116-93eaw1a6843e",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z",
  "expires_at": "2025-01-15T11:30:00Z",
  "done": false,
  "error": null,
  "metadata": {
    "progress": { "status": "IN_PROGRESS", "description": "World generation in progress" },
    "world_id": "dc2c65e4-68d3-4210-a01e-7a54cc9ded2a"
  },
  "response": null
}
World generation should take about 5 minutes to complete. Once the world is generated, the done field will be set to true and the response field will contain the generated World:
{
  "operation_id": "20bffbb1-4ba7-453f-a116-93eab1a6843e",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:35:00Z",
  "expires_at": "2025-01-15T11:30:00Z",
  "done": true,
  "error": null,
  "metadata": {
    "progress": {
      "status": "SUCCEEDED",
      "description": "World generation completed successfully"
    },
    "world_id": "dc2c65e4-68d3-4210-a01e-7a54cc9ded2a"
  },
  "response": {
    "id": "dc2c65e4-68d3-4210-a01e-7a54cc9ded2a",
    "display_name": "",
    "tags": null,
    "world_marble_url": "https://marble.worldlabs.ai/world/dc2c65e4-68d3-4210-a01e-7a54cc9ded2a",
    "assets": {
      "caption": "The scene is a fantastical forest...",
      "thumbnail_url": "<thumbnail_url>",
      "splats": {
        "spz_urls": {
          "500k": "<500k_spz_url>",
          "100k": "<100k_spz_url>",
          "full_res": "<full_res_spz_url>"
        }
      },
      "mesh": {
        "collider_mesh_url": "<collider_mesh_url>"
      },
      "imagery": {
        "pano_url": "<pano_url>"
      }
    },
    "created_at": null,
    "updated_at": null,
    "permission": null,
    "world_prompt": null,
    "model": null
  }
}
The response field contains a snapshot of the World at the time the operation completed. This allows you to access the generated assets without making a separate API call. Note that some fields like display_name, created_at, updated_at, world_prompt, and model may be empty or null in this snapshot. Use the GET /marble/v1/worlds/{world_id} endpoint to fetch the complete, up-to-date world.
You can view the generated world in Marble at https://marble.worldlabs.ai/world/{world_id}.
3

(Optional) Get the latest world

If you need to fetch the most up-to-date version of the world later, use the world_id to retrieve it.
Request
curl -X GET 'https://api.worldlabs.ai/marble/v1/worlds/dc2c65e4-68d3-4210-a01e-7a54cc9ded2a' \
  -H 'WLT-Api-Key: YOUR_API_KEY'
This returns the latest version of the world:
{
  "world": {
    "id": "dc2c65e4-68d3-4210-a01e-7a54cc9ded2a",
    "display_name": "Mystical Forest",
    "tags": null,
    "world_marble_url": "https://marble.worldlabs.ai/world/dc2c65e4-68d3-4210-a01e-7a54cc9ded2a",
    "assets": {
      "caption": "The scene is a fantastical forest...",
      "thumbnail_url": "<thumbnail_url>",
      "splats": {
        "spz_urls": {
          "500k": "<500k_spz_url>",
          "full_res": "<full_res_spz_url>",
          "100k": "<100k_spz_url>"
        }
      },
      "mesh": {
        "collider_mesh_url": "<collider_mesh_url>"
      },
      "imagery": {
        "pano_url": "<pano_url>"
      }
    },
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:35:00Z",
    "permission": null,
    "world_prompt": {
      "type": "text",
      "text_prompt": "The scene is a fantastical forest..."
    },
    "model": "Marble 0.1-plus"
  }
}
The world object includes:
  • assets.splats.spz_urls: 3D Gaussian splat files in SPZ format (100k, 500k, and full resolution)
  • assets.mesh.collider_mesh_url: Collider mesh in GLB format
  • assets.imagery.pano_url: Panorama image
  • assets.caption: AI-generated description of the world
  • assets.thumbnail_url: Thumbnail image for the world
  • world_prompt: The prompt used to generate the world (may be recaptioned)
  • model: The model used for generation