> ## 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 비디오 업스케일

> Magnific를 사용하여 CometAPI를 통해 비디오를 업스케일하고, 720p부터 4k까지의 출력 해상도와 선택적 디테일 제어를 선택합니다.

소스 비디오를 업스케일하려면 `magnific_video_upscaler_creative`를 사용합니다. 요청은
완료된 출력을 검색하는 데 사용할 작업 `id`를 반환합니다.

## 요청 준비

* CometAPI API 키로 인증합니다.
* `model`를 `magnific_video_upscaler_creative`로 설정하고 `videoUri`를 제공하여
  최대 30초 길이의 비디오를 지정합니다.
* 예시 비디오 URL을 액세스 가능한 HTTPS URL로 바꿉니다. `videoUri`는
  인코딩 크기가 최대 5MB인 Base64 비디오 데이터 URI도 허용합니다.
* `resolution`로 `720p`, `1k`, `2k` 또는 `4k` 중 하나를 선택합니다. `2k`의 경우 필드를 생략합니다.

## 향상 설정 조정

| 필드 | 사용 방법 |
| - | - |
| `creativity` | 추가할 생성 디테일의 양으로, `1`부터 `100`. |
| `sharpen` | 선명도 강도로, `1`부터 `100`. |
| `smartGrain` | 그레인 및 텍스처 향상 강도로, `1`부터 `100`. |
| `flavor` | `vivid` 색상과 디테일을 강조하며, `natural`는 충실한 재현을 선호합니다. |
| `fpsBoost` | 출력 프레임 속도를 높이려면 `true`를 설정합니다. |

모델 기본값을 사용하려면 숫자 제어 값을 생략합니다. `0` 값은
생략으로 처리되므로 강도 0을 명시적으로 선택하지 않습니다. 마찬가지로,
`fpsBoost: false` 생략으로 처리되며 프레임 속도 향상을 명시적으로 비활성화하지 않습니다.
선택적 필드를 생략하고 `null`를 전송하지 마세요.

## 결과 검색

반환된 `id`를 저장하고
[Runway 작업 가져오기](https://apidoc.cometapi.com/ko/api/video/runway/official-format/runway-to-get-task-details.md) 를 사용하여 작업 상태를 검색합니다.
`status`가 `SUCCEEDED`이면 `output`에서 결과 URL을 읽습니다. 작업이
실패하면 `failure` 및 `failureCode`가 있는지 확인합니다.


## OpenAPI

````yaml api/openapi/video/runway/official-format/post-upscale-a-video.openapi.json POST /runwayml/v1/video_upscale
openapi: 3.1.0
info:
  title: Upscale a Runway video
  version: 1.0.0
  description: Create an asynchronous Runway task through CometAPI.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /runwayml/v1/video_upscale:
    post:
      summary: Upscale a Runway video
      description: >-
        Submit the request and save the returned id. Retrieve task details to
        read the status and output URLs.
      operationId: upscale_a_video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Magnific video-upscaling request.
              properties:
                model:
                  type: string
                  description: Model ID for this request.
                  enum:
                    - magnific_video_upscaler_creative
                videoUri:
                  description: >-
                    Video to upscale, with a maximum duration of 30 seconds. Use
                    an accessible HTTPS URL or a Base64 data URI with an encoded
                    size of up to 5 MB.
                  oneOf:
                    - type: string
                      description: Accessible HTTPS URL of the video.
                      pattern: ^https://
                      maxLength: 2048
                      minLength: 13
                    - type: string
                      description: Base64-encoded video, including its data URI prefix.
                      pattern: ^data:video/[^;]+;base64,
                      maxLength: 5242880
                      minLength: 13
                resolution:
                  type: string
                  description: Target output resolution. Omit for 2k.
                  enum:
                    - 720p
                    - 1k
                    - 2k
                    - 4k
                creativity:
                  type: integer
                  description: >-
                    Amount of generated detail to add. Use 1 through 100 for an
                    explicit setting. Omit to use the model default; 0 is
                    treated as omission.
                  minimum: 0
                  maximum: 100
                sharpen:
                  type: integer
                  description: >-
                    Sharpness intensity. Use 1 through 100 for an explicit
                    setting. Omit to use the model default; 0 is treated as
                    omission.
                  minimum: 0
                  maximum: 100
                smartGrain:
                  type: integer
                  description: >-
                    Grain and texture enhancement intensity. Use 1 through 100
                    for an explicit setting. Omit to use the model default; 0 is
                    treated as omission.
                  minimum: 0
                  maximum: 100
                flavor:
                  type: string
                  description: >-
                    Processing style: vivid emphasizes color and detail; natural
                    favors faithful reproduction.
                  enum:
                    - vivid
                    - natural
                fpsBoost:
                  type: boolean
                  description: >-
                    Set true to request an increased output frame rate. Omit to
                    leave this option unspecified; false is treated as omission.
              required:
                - model
                - videoUri
              additionalProperties: false
            example:
              model: magnific_video_upscaler_creative
              videoUri: https://example.com/source-video.mp4
              resolution: 2k
      responses:
        '200':
          description: The task was created. Save its id for task retrieval.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task ID for GET /runwayml/v1/tasks/{id}.
                  status:
                    type: string
                    description: Task state, when returned.
                  createdAt:
                    type: string
                    description: Task submission timestamp, when returned.
                    format: date-time
                  output:
                    type: array
                    description: Result URLs, when returned.
                    items:
                      type: string
                      format: uri
                  failure:
                    type: string
                    description: Failure explanation, when returned.
                  failureCode:
                    type: string
                    description: Machine-readable failure code, when returned.
                  estimatedCost:
                    type: object
                    description: Task estimate metadata, when returned.
                    properties:
                      credits:
                        type: integer
                        description: Credit value reported with the task.
                    required:
                      - credits
                    additionalProperties: false
                  cost:
                    type: object
                    description: Task cost metadata, when returned.
                    properties:
                      credits:
                        type: integer
                        description: Credit value reported with the task.
                    required:
                      - credits
                    additionalProperties: false
                required:
                  - id
                additionalProperties: false
              example:
                id: 00000000-0000-4000-8000-000000000000
        '400':
          description: Invalid request or unavailable task ID.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: Task request error.
                    properties:
                      code:
                        type:
                          - string
                          - integer
                        description: Machine-readable task error code.
                      message:
                        type: string
                        description: Error explanation.
                      data:
                        description: Additional error details, when returned.
                    required:
                      - code
                      - message
                    additionalProperties: true
                  - type: object
                    description: Request authentication or validation error.
                    properties:
                      error:
                        type: object
                        description: Error details.
                        properties:
                          message:
                            type: string
                            description: Error explanation.
                          type:
                            type: string
                            description: Error category.
                          code:
                            type:
                              - string
                              - integer
                              - 'null'
                            description: Error code, when returned.
                        required:
                          - message
                        additionalProperties: true
                    required:
                      - error
                    additionalProperties: true
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                description: Request authentication or validation error.
                properties:
                  error:
                    type: object
                    description: Error details.
                    properties:
                      message:
                        type: string
                        description: Error explanation.
                      type:
                        type: string
                        description: Error category.
                      code:
                        type:
                          - string
                          - integer
                          - 'null'
                        description: Error code, when returned.
                    required:
                      - message
                    additionalProperties: true
                required:
                  - error
                additionalProperties: true
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://api.cometapi.com/runwayml/v1/video_upscale \
              --header "Authorization: Bearer $COMETAPI_KEY" \
              --header "Content-Type: application/json" \
              --data '{
              "model": "magnific_video_upscaler_creative",
              "videoUri": "https://example.com/source-video.mp4",
              "resolution": "2k"
            }'
        - lang: Python
          source: |-
            import os
            import requests

            response = requests.post(
                "https://api.cometapi.com/runwayml/v1/video_upscale",
                headers={"Authorization": f"Bearer {os.environ['COMETAPI_KEY']}"},
                json={
                  "model": "magnific_video_upscaler_creative",
                  "videoUri": "https://example.com/source-video.mp4",
                  "resolution": "2k"
                },
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          source: |-
            const response = await fetch(
              "https://api.cometapi.com/runwayml/v1/video_upscale",
              {
                method: "POST",
                headers: {
                  Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                  "Content-Type": "application/json",
                },
                body: JSON.stringify({
                  "model": "magnific_video_upscaler_creative",
                  "videoUri": "https://example.com/source-video.mp4",
                  "resolution": "2k"
                }),
              },
            );
            if (!response.ok) throw new Error(await response.text());
            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your CometAPI API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.