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

# OpenAI 비디오 생성 예시

> OpenAI 비동기 비디오 생성 예시.

## 권장 엔드포인트

* [오픈AI /v1/videos](/ko/api-reference/endpoints/openai/video)
* [오픈AI /v1/videos/{video_id}](/ko/api-reference/endpoints/openai/video-status)
* [오픈AI /v1/videos/{video_id}/content](/ko/api-reference/endpoints/openai/video-content)

## 최소한의 요청

```json theme={null}
{
  "model": "sora-2",
  "prompt": "An 8-second ApiGo product demo animation",
  "seconds": 8,
  "size": "1280x720"
}
```

## cURL 예

```bash theme={null}
curl https://maas.apigo.ai/v1/videos \
  -H "Authorization: Bearer $YOUR API KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "An 8-second ApiGo product demo animation",
    "seconds": 8,
    "size": "1280x720"
  }'
```

## 파이썬 예제

```python theme={null}
import requests

response = requests.post(
    "https://maas.apigo.ai/v1/videos",
    headers={
        "Authorization": "Bearer <YOUR API KEY>",
        "Content-Type": "application/json",
    },
    json={
        "model": "sora-2",
        "prompt": "An 8-second ApiGo product demo animation",
        "seconds": 8,
        "size": "1280x720",
    },
)

print(response.json())
```

## Node.js 예

```js theme={null}
const response = await fetch("https://maas.apigo.ai/v1/videos", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YOUR API KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "sora-2",
    prompt: "An 8-second ApiGo product demo animation",
    seconds: 8,
    size: "1280x720",
  }),
});

console.log(await response.json());
```

## 모범 사례

* 생성, 상태 및 콘텐츠 검색을 별도의 단계로 처리
* 백오프를 사용하여 합리적인 간격으로 폴링
* 백엔드를 통해 대용량 다운로드 또는 임시 URL을 프록시합니다.
