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

# Runway 작업 가져오기

> CometAPI를 사용해 GET /runwayml/v1/tasks/{id}를 호출하고 작업 ID로 Runway 비디오 생성 작업의 상태, 진행률, 출력, 메타데이터를 가져옵니다.

이 엔드포인트를 사용해 id로 Runway 작업을 확인합니다.

## 먼저 이 필드를 확인하세요

* 작업 식별자용 `id`
* 현재 작업 상태용 `status`
* 작업이 성공했을 때 완료된 에셋 URL용 `output`
* 작업이 실패했을 때의 `failure` 및 `failureCode`

## 사용 시점

* text-to-image, image-to-video, video-to-video 같은 공식 형식 Runway 작업 생성 페이지를 호출한 후

## 재시도 동작

* 방금 생성된 작업은 잠시 동안 `task_not_exist`를 반환할 수 있습니다
* 작업 id를 유효하지 않은 것으로 판단하기 전에 몇 초 기다린 뒤 재시도하세요
* 작업이 표시되면 이 엔드포인트를 계속 폴링하여 최종 상태 또는 완료된 출력을 반환할 때까지 확인하세요.


## OpenAPI

````yaml api/openapi/video/runway/official-format/get-runway-to-get-task-details.openapi.json GET /runwayml/v1/tasks/{id}
openapi: 3.1.0
info:
  title: Get Task Details API
  version: 1.0.0
  description: Poll a Runway official-format task through CometAPI and read the task state.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /runwayml/v1/tasks/{id}:
    get:
      summary: Poll a Runway official-format task
      description: >-
        Use the task id returned by an official-format Runway create endpoint.
        Fresh task ids can briefly return `task_not_exist` before the system
        begins returning task state. Output URLs are time-limited; download
        promptly and mirror to your own storage.
      operationId: runway_to_get_task_details
      parameters:
        - name: id
          in: path
          required: true
          description: Runway task id returned by the create endpoint.
          schema:
            type: string
        - name: X-Runway-Version
          in: header
          required: false
          description: Optional Runway version header, for example `2024-11-06`.
          schema:
            type: string
      responses:
        '200':
          description: Current task state.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  id:
                    type: string
                    description: Task ID.
                  status:
                    type: string
                    description: Task status.
                    enum:
                      - PENDING
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                  createdAt:
                    type: string
                    description: Task creation timestamp.
                  output:
                    type: array
                    description: Output URLs returned after the task succeeds.
                    items:
                      type: string
                  failure:
                    type: string
                    description: Failure reason returned after the task fails.
                  failureCode:
                    type: string
                    description: Failure code returned after the task fails.
                  progress:
                    type: number
                    description: Task progress.
                additionalProperties: true
                example:
                  id: d0658ae1-bbdd-4adc-aaba-fd8070e14d79
                  status: SUCCEEDED
                  createdAt: '2026-05-01T12:47:47.351Z'
                  output:
                    - https://example.com/output.mp4
              examples:
                Succeeded:
                  summary: Finished task with output URLs
                  value:
                    id: <task_id>
                    status: SUCCEEDED
                    createdAt: '2026-06-10T08:45:00.000Z'
                    output:
                      - https://<provider-cdn>/<file_id>.png
      x-codeSamples:
        - lang: Shell
          label: Default
          source: |
            TASK_ID="<task_id>"

            curl "https://api.cometapi.com/runwayml/v1/tasks/$TASK_ID" \
              -H "Authorization: Bearer $COMETAPI_KEY"
        - lang: Shell
          label: Poll until done
          source: |
            TASK_ID="<task_id>"

            while true; do
              STATUS=$(curl -s "https://api.cometapi.com/runwayml/v1/tasks/$TASK_ID" \
                -H "Authorization: Bearer $COMETAPI_KEY" | python3 -c "import json,sys; print(json.load(sys.stdin).get('status','PENDING'))")
              echo "status: $STATUS"
              case "$STATUS" in SUCCEEDED | FAILED) break;; esac
              sleep 10
            done
        - lang: Python
          label: Default
          source: |
            import os
            import requests

            task_id = "<task_id>"

            response = requests.get(
                f"https://api.cometapi.com/runwayml/v1/tasks/{task_id}",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
            )

            print(response.json())
        - lang: Python
          label: Poll until done
          source: |
            import os
            import time
            import requests

            task_id = "<task_id>"
            headers = {"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]}

            while True:
                task = requests.get(
                    f"https://api.cometapi.com/runwayml/v1/tasks/{task_id}", headers=headers
                ).json()
                print(task.get("status"))
                if task.get("status") in ("SUCCEEDED", "FAILED") or task.get("output"):
                    break
                time.sleep(10)

            print(task.get("output"))
        - lang: JavaScript
          label: Default
          source: >
            const taskId = "<task_id>";


            const response = await
            fetch(`https://api.cometapi.com/runwayml/v1/tasks/${taskId}`, {
                headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` },
            });


            console.log(await response.json());
        - lang: JavaScript
          label: Poll until done
          source: >
            const taskId = "<task_id>";

            const headers = { Authorization: `Bearer
            ${process.env.COMETAPI_KEY}` };


            let task;

            while (true) {
                task = await (await fetch(`https://api.cometapi.com/runwayml/v1/tasks/${taskId}`, { headers })).json();
                console.log(task.status);
                if (task.status === "SUCCEEDED" || task.status === "FAILED" || task.output) break;
                await new Promise((resolve) => setTimeout(resolve, 10000));
            }


            console.log(task.output);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````