> ## 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.

# World 상태 가져오기

> World Labs Marble 월드 생성 작업의 상태와 결과를 가져옵니다

이 엔드포인트를 폴링하여 World Labs Marble 생성 작업 상태를 확인합니다. 생성 응답에 `poll_url`이 있으면 해당 URL을 우선 사용하세요.

## 경로 매개변수

<ParamField path="id" type="string" required>
  월드 생성 작업 ID입니다.
</ParamField>

## 응답

<ResponseField name="id" type="string">
  공개 작업 ID입니다.
</ResponseField>

<ResponseField name="task_id" type="string">
  비동기 작업 식별자 별칭입니다.
</ResponseField>

<ResponseField name="operation_id" type="string">
  업스트림 World Labs 작업 ID입니다.
</ResponseField>

<ResponseField name="status" type="string">
  작업 상태: `pending`, `processing`, `completed`, `failed`, `timeout`.
</ResponseField>

<ResponseField name="world_id" type="string">
  완료 시 업스트림 World Labs 월드 ID입니다.
</ResponseField>

<ResponseField name="world_marble_url" type="string">
  완료 시 생성된 Marble 월드 URL입니다.
</ResponseField>

<ResponseField name="model_url" type="string">
  기본 생성 월드/모델 URL의 별칭입니다.
</ResponseField>

<ResponseField name="glb_url" type="string">
  사용 가능한 경우 collider mesh GLB URL입니다.
</ResponseField>

<ResponseField name="pano_url" type="string">
  사용 가능한 경우 파노라마 이미지 URL입니다.
</ResponseField>

<ResponseField name="thumbnail_url" type="string">
  사용 가능한 경우 썸네일 이미지 URL입니다.
</ResponseField>

<ResponseField name="caption" type="string">
  생성된 월드에 대해 업스트림이 반환한 caption입니다.
</ResponseField>

<ResponseField name="cost" type="object">
  `total_credits`를 포함한 업스트림 operation 비용 세부 정보입니다.
</ResponseField>

<ResponseField name="error" type="string">
  작업 실패 시 오류 메시지입니다.
</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>
