APIMaster.ai

Sora 2 비디오 생성 API

APIMaster.ai에서 sora-2 및 sora-2-pro를 호출하여 텍스트-투-비디오 및 이미지-투-비디오를 수행합니다. 폴링 및 다운로드는 APIMaster URL을 사용합니다.

Sora 2 비디오 생성

APIMaster를 통해 Sora 2로 비디오를 생성합니다. 지원 모델: sora-2, sora-2-pro. 이름 **sora**는 **sora-2**로 매핑됩니다.

기본 URL: https://apimaster.ai/v1https://apimaster.ai/v1입니다. https://apimaster.ai/v1/videos/...를 사용하세요 — /v1을 또 추가하지 마십시오.

가격 (공식 가격의 20% 할인, 초당)

요금은 길이(초) × 초당 요금으로 부과됩니다.

모델 해상도 공식 APIMaster
sora-2 720p $0.10/초 $0.08/초
sora-2-pro 720p $0.30/초 $0.24/초
sora-2-pro 1024p $0.50/초 $0.40/초
sora-2-pro 1080p $0.70/초 $0.56/초

예: sora-2 720p 4초$0.32 ($0.08 × 4).

작업 제출

두 가지 진입점 중 하나를 사용하세요.

옵션 A (권장): 네이티브 JSON

POST https://apimaster.ai/v1/videos/generations

필드 유형 필수 설명
model string sora-2 / sora-2-pro (또는 sora)
prompt string 비디오 설명
duration integer 아니요 일반: 4 / 8 / 12 / 16 / 20, 기본값 4
resolution string 아니요 sora-2: 720p; sora-2-pro: 또한 1024p / 1080p, 기본값 720p
aspect_ratio string 아니요 16:9 / landscape 또는 9:16 / portrait, 기본값 16:9
image_urls string[] 아니요 이미지-투-비디오; 1개의 공개 URL 권장
curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A waterfall forming a rainbow, cinematic",
    "duration": 4,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

제출 응답

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_xxxxxxxx"
    }
  ]
}

이미지-투-비디오의 경우 aspect_ratio를 명시적으로 설정하세요 (세로 → 9:16). 기본값은 16:9입니다.

옵션 B: OpenAI Video 호환

POST https://apimaster.ai/v1/videos (JSON 또는 multipart)

필드 유형 필수 설명
model string sora-2 / sora-2-pro (또는 sora)
prompt string 비디오 설명
seconds string 아니요 길이, 예: "4"; 정수 duration도 작동, 기본값 4
size string 아니요 픽셀 크기 — 해상도 + 방향 (아래 표), 기본값 720x1280
images string[] 아니요 이미지-투-비디오; 최대 1개 URL. input_reference (단일)도 작동

size

모델 가로 (16:9) 세로 (9:16)
sora-2 1280x720 (720p) 720x1280 (720p)
sora-2-pro 1280x720 (720p) / 1792x1024 (1024p) 720x1280 (720p) / 1024x1792 (1024p)

잘못된 size(예: 1920x1080)는 400 invalid_size를 반환합니다. OpenAI 경로는 최대 1024p입니다. 1080p를 사용하려면 옵션 A에서 resolution: "1080p"를 사용하세요.

curl -s "https://apimaster.ai/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A waterfall forming a rainbow, cinematic",
    "seconds": "4",
    "size": "1280x720"
  }'

제출 응답

{
  "id": "task_xxxxxxxx",
  "object": "video",
  "model": "sora-2",
  "status": "queued"
}

폴링 및 다운로드에는 두 엔드포인트 중 하나의 **task_id / id**를 사용하세요.

작업 상태 폴링

GET https://apimaster.ai/v1/videos/{task_id}

curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" \
  -H "Authorization: Bearer YOUR_API_KEY"

완료 예시:

{
  "id": "task_xxxxxxxx",
  "status": "completed",
  "url": "https://apimaster.ai/v1/videos/task_xxxxxxxx/content"
}

MP4 다운로드는 **https://apimaster.ai/v1/videos/{task_id}/content**를 통해 가능합니다.

비디오 다운로드

curl -L "https://apimaster.ai/v1/videos/task_xxxxxxxx/content" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o output.mp4

이미지-투-비디오 예시

옵션 A:

curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Slow push-in, gentle breeze in the hair",
    "duration": 8,
    "resolution": "720p",
    "aspect_ratio": "9:16",
    "image_urls": ["https://example.com/reference.jpg"]
  }'

옵션 B (images 필드):

curl -s "https://apimaster.ai/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Slow push-in, gentle breeze in the hair",
    "seconds": "8",
    "images": ["https://example.com/reference.jpg"]
  }'

폴링 팁

  • 제출 후 10~20초 기다린 후, 3~5초마다 폴링
  • 일반 소요 시간: 1~3분
  • 완료 후 MP4를 즉시 저장

오류 코드

코드 의미
400 잘못된 매개변수 (예: invalid_size)
401 잘못된 API 키
402 잔액 부족
429 속도 제한 초과
500 / 502 일시적 오류, 재시도

관련 문서