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

# Grok Imagine 1.5 비디오 생성

>  - 비동기 처리 모드, 후속 조회를 위한 태스크 ID 반환
- 고품질 AI 비디오 생성, 텍스트-비디오 및 이미지-비디오 지원
- 유연한 화면 비율 및 화질 옵션 

<Info>
  **모델명 호환 안내**: 이 엔드포인트는 별칭 `grok-imagine-1.5-video-ext`도 지원하며, 이는 `grok-imagine-1.5-video-apimart`와 동일하므로 서로 바꿔 사용할 수 있고 효과도 동일합니다.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  # model 에는 "grok-imagine-1.5-video-apimart" 를 입력할 수 있으며, 별칭 "grok-imagine-1.5-video-ext" 도 지원합니다
  curl --request POST \
    --url https://api.apimart.ai/v1/videos/generations \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "grok-imagine-1.5-video-apimart",
      "prompt": "해변을 달리는 강아지, 화창한 날씨, 슬로우 모션",
      "size": "16:9",
      "duration": 6,
      "resolution": "720p"
    }'
  ```

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

  url = "https://api.apimart.ai/v1/videos/generations"

  payload = {
      "model": "grok-imagine-1.5-video-apimart",
      "prompt": "해변을 달리는 강아지, 화창한 날씨, 슬로우 모션",
      "size": "16:9",
      "duration": 6,
      "resolution": "720p"
  }

  headers = {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const url = "https://api.apimart.ai/v1/videos/generations";

  const payload = {
    model: "grok-imagine-1.5-video-apimart",
    prompt: "해변을 달리는 강아지, 화창한 날씨, 슬로우 모션",
    size: "16:9",
    duration: 6,
    resolution: "720p"
  };

  const headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
  };

  fetch(url, {
    method: "POST",
    headers: headers,
    body: JSON.stringify(payload)
  })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "code": 200,
    "data": [
      {
        "task_id": "task_01JNXXXXXXXXXXXXXXXXXX",
        "status": "submitted"
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": 400,
      "message": "잘못된 요청 매개변수",
      "type": "invalid_request_error"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": 401,
      "message": "인증 실패, API 키를 확인해 주세요",
      "type": "authentication_error"
    }
  }
  ```

  ```json 402 theme={null}
  {
    "error": {
      "code": 402,
      "message": "잔액이 부족합니다. 충전 후 다시 시도해 주세요",
      "type": "payment_required"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "error": {
      "code": 403,
      "message": "접근이 금지되었습니다. 이 리소스에 대한 접근 권한이 없습니다",
      "type": "permission_error"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "code": 429,
      "message": "요청이 너무 많습니다. 잠시 후 다시 시도해 주세요",
      "type": "rate_limit_error"
    }
  }
  ```

  ```json 500 theme={null}
  {
    "error": {
      "code": 500,
      "message": "서버 내부 오류, 잠시 후 다시 시도해 주세요",
      "type": "server_error"
    }
  }
  ```

  ```json 502 theme={null}
  {
    "error": {
      "code": 502,
      "message": "게이트웨이 오류, 서버를 일시적으로 사용할 수 없습니다",
      "type": "bad_gateway"
    }
  }
  ```
</ResponseExample>

## 인증

<ParamField header="Authorization" type="string" required>
  모든 API는 Bearer Token 인증이 필요합니다

  API 키 받기:

  [API 키 관리 페이지](https://apimart.ai/keys)에서 API 키를 받으세요

  요청 헤더에 추가:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## 요청 매개변수

<ParamField body="model" type="string" default="grok-imagine-1.5-video-apimart" required>
  비디오 생성 모델 이름

  지원 모델:

  * `grok-imagine-1.5-video-apimart` - Grok 비디오 생성 (호환 별칭 `grok-imagine-1.5-video-ext`)

  예시: `"grok-imagine-1.5-video-apimart"`

  <Note>
    구버전 호출과의 호환을 위해 별칭 `grok-imagine-1.5-video-ext`(`grok-imagine-1.5-video-apimart`에 해당)는 계속 정상적으로 사용할 수 있습니다.
  </Note>
</ParamField>

<ParamField body="prompt" type="string" required>
  비디오 내용 설명, 다국어 지원
</ParamField>

<ParamField body="size" type="string" default="16:9">
  비디오 크기

  옵션:

  * `16:9` - 가로 (기본값)
  * `9:16` - 세로
  * `1:1` - 정사각형
  * `3:2` - 가로
  * `2:3` - 세로
</ParamField>

<ParamField body="duration" type="integer" default={6}>
  비디오 길이 (초)

  범위: 6-15 (최소 6초, 최대 15초)

  **⚠️ 주의:** 순수한 숫자를 입력하세요 (예: `6`). 따옴표를 붙이면 오류가 발생합니다
</ParamField>

<ParamField body="resolution" type="string" default="480p">
  비디오 화질

  옵션:

  * `480p` - 표준 화질 (기본값)
  * `720p` - 고화질
</ParamField>

<ParamField body="image_urls" type="string[]">
  참조 이미지 URL 목록

  **제한 사항:**

  * 최대 7장의 이미지
  * 공개적으로 접근 가능한 URL이어야 합니다
  * base64 형식은 지원되지 않습니다

  <Tip>참조 이미지를 업로드하면 화면 비율이 자동으로 참조 이미지의 화면 비율에 맞춰집니다.</Tip>
</ParamField>

## Response

<ResponseField name="code" type="integer">
  응답 상태 코드
</ResponseField>

<ResponseField name="data" type="object[]">
  응답 데이터 배열

  <Expandable title="속성">
    <ResponseField name="task_id" type="string">
      태스크 고유 식별자
    </ResponseField>

    <ResponseField name="status" type="string">
      태스크 상태

      * `submitted` - 제출됨
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  **태스크 결과 조회**

  비디오 생성은 비동기 태스크입니다. 제출 후 `task_id`가 반환됩니다. [태스크 상태 조회](/ko/api-reference/tasks/status) 엔드포인트를 사용하여 생성 진행 상황과 결과를 확인하세요.
</Note>

## 사용 시나리오

### 시나리오 1: 텍스트-비디오 생성

```json theme={null}
{
  "model": "grok-imagine-1.5-video-apimart",
  "prompt": "해변을 달리는 강아지, 화창한 날씨, 슬로우 모션",
  "size": "16:9",
  "duration": 6
}
```

### 시나리오 2: 이미지-비디오 생성

```json theme={null}
{
  "model": "grok-imagine-1.5-video-apimart",
  "prompt": "장면에 자연스러운 동적 효과 추가",
  "image_urls": ["https://example.com/start.png"],
  "size": "16:9",
  "duration": 10,
  "resolution": "720p"
}
```
