> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Ambil Status World

> Mengambil status dan hasil tugas pembuatan world World Labs Marble

Polling endpoint ini untuk memeriksa status tugas World Labs Marble. Jika respons create menyertakan `poll_url`, gunakan URL tersebut.

## Parameter Path

<ParamField path="id" type="string" required>
  ID tugas world generation.
</ParamField>

## Respons

<ResponseField name="id" type="string">
  ID tugas publik.
</ResponseField>

<ResponseField name="task_id" type="string">
  Alias identifier tugas asinkron.
</ResponseField>

<ResponseField name="operation_id" type="string">
  ID operasi World Labs.
</ResponseField>

<ResponseField name="status" type="string">
  Status tugas: `pending`, `processing`, `completed`, `failed`, atau `timeout`.
</ResponseField>

<ResponseField name="world_id" type="string">
  ID dunia World Labs saat selesai.
</ResponseField>

<ResponseField name="world_marble_url" type="string">
  URL dunia Marble yang dihasilkan saat selesai.
</ResponseField>

<ResponseField name="model_url" type="string">
  Alias untuk URL world/model utama yang dihasilkan.
</ResponseField>

<ResponseField name="glb_url" type="string">
  URL GLB collider mesh jika tersedia.
</ResponseField>

<ResponseField name="pano_url" type="string">
  URL gambar panorama jika tersedia.
</ResponseField>

<ResponseField name="thumbnail_url" type="string">
  URL thumbnail jika tersedia.
</ResponseField>

<ResponseField name="caption" type="string">
  Caption upstream untuk world yang dihasilkan.
</ResponseField>

<ResponseField name="cost" type="object">
  Detail biaya operation upstream jika tersedia, termasuk `total_credits`.
</ResponseField>

<ResponseField name="error" type="string">
  Pesan error saat tugas gagal.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.tokenlab.sh/v1/worlds/generations/ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
    -H "Authorization: Bearer sk-your-api-key"
  ```

  ```python Python theme={null}
  import requests
  import time

  task_id = "ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

  while True:
      response = requests.get(
          f"https://api.tokenlab.sh/v1/worlds/generations/{task_id}",
          headers={"Authorization": "Bearer sk-your-api-key"},
      )
      result = response.json()
      if result["status"] in ["completed", "failed", "timeout"]:
          print(result)
          break
      time.sleep(10)
  ```

  ```javascript JavaScript theme={null}
  const taskId = 'ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
  const response = await fetch(`https://api.tokenlab.sh/v1/worlds/generations/${taskId}`, {
    headers: { Authorization: 'Bearer sk-your-api-key' }
  });

  const result = await response.json();
  console.log(result.status, result.world_marble_url);
  ```
</RequestExample>
