Skip to main content
POST
우측의 대화형 Playground를 통해 실시간으로 호출을 테스트할 수 있습니다. Authorization(형식: Bearer sk-xxx)에 API 키를 입력하고 prompt, seconds 및 size를 채운 후 전송하십시오. 응답은 작업 id이며, 아래의 조회 엔드포인트를 통해 동영상을 가져옵니다.
하나의 엔드포인트, 4가지 모드: prompt만 사용 = 텍스트-동영상(text-to-video); input_reference에 이미지 1개 = 첫 프레임 동영상; input_reference에 JSON 엔벨로프 = 첫 프레임 및 마지막 프레임 또는 참조 미디어 동영상이며, 엔벨로프를 통해 320p 또는 1:1 비율을 선택할 수도 있습니다. 전체적인 내용은 Oxygen 개요를 참고하십시오.
⚠️ 가장 흔히 발생하는 4가지 실수
  1. 항상 size를 전달하십시오: 지정하지 않으면 게이트웨이 기본값이 720x1280로 적용되어 세로 모드로 출력됩니다
  2. 고급 파라미터는 input_reference 엔벨로프에 넣으십시오: 최상위 레벨에서는 model, prompt, seconds, size 및 input_reference만 적용되며, 여기에 배치된 last_image, reference_images, resolution 및 aspect_ratio는 오류 없이 자동으로 무시됩니다
  3. input_reference은 반드시 문자열이어야 합니다: 먼저 json.dumps / JSON.stringify로 엔벨로프를 직렬화하십시오. 객체나 배열을 전달하면 거부됩니다
  4. 길이는 최상위 seconds로만 설정하십시오 (4–15); 엔벨로프 내부에 duration을 전달하면 400이 반환됩니다

코드 예제

Python (requests · 제출 + 폴링 + 다운로드)

Python (첫 프레임 동영상 · 요청 본문)

Python (첫 프레임 및 마지막 프레임 / 참조 미디어 · JSON 엔벨로프)

cURL

첫 프레임 및 마지막 프레임(input_reference의 값은 이스케이프된 JSON 문자열임에 유의하십시오):

Node.js (네이티브 fetch)

id가 있으신가요? cURL 한 번으로 결과 가져오기

status가 completed일 때 video_url는 MP4 주소이며 직접 다운로드할 수 있습니다:

파라미터 레퍼런스

최상위 필드 (다음 5개만 적용됩니다)

input_reference 엔벨로프 키

엔벨로프에는 duration을 포함할 수 없으며(최상위 seconds 사용) 표에 없는 키도 포함할 수 없습니다. 또한 첫 번째/마지막 프레임(images / last_image)은 reference_*과 함께 사용할 수 없습니다. 이를 위반하면 과금 없이 400(param: input_reference) 오류가 반환됩니다.

해상도 및 출력 크기 (실측값)

이미지 투 비디오(Image-to-video)는 첫 번째 프레임의 가로세로 비율을 따릅니다. 예를 들어 정사각형 첫 번째 프레임의 경우 480p에서 480×480 크기로 생성됩니다.

응답 형식

작업 생성

작업 조회 (성공)

작업 조회 (실패)

제출 오류 (400)

⚠️ 응답 참고 사항
  • 상태는 queued → in_progress → completed / failed 순으로 변경됩니다.
  • 동영상은 **video_url**에 위치하며 인증 헤더 없이 다운로드할 수 있습니다. expires_at(약 24시간)에 만료되므로 신속히 저장하시기 바랍니다.
  • completed 직후에는 /v1/videos/{id}/content에 몇 초 정도 더 소요될 수 있으며(처음에는 400을 반환함), video_url 사용을 권장합니다.
  • usage.unit_price_usd은 해상도별 참고 가격입니다. 실제 과금은 청구 내역을 따르며, 초당 일괄 $0.02입니다.
  • 제출 오류의 경우 세부 정보는 message 내부의 JSON 문자열 형태로 제공되므로 다시 파싱해야 합니다.
과금: seconds × \$0.02은 작업이 접수될 때 청구됩니다. 해상도 및 참조 미디어에 따라 가격이 변경되지 않으며, 실패한 작업은 자동으로 전액 환불됩니다. 400을 반환하는 제출 건에는 요금이 부과되지 않으며, 조회 및 다운로드는 무료입니다. 자세한 내용은 개요의 요금 안내를 참고하시기 바랍니다.

인증

Authorization
string
header
필수

API key from the APIYI console

본문

application/json
model
enum<string>
기본값:oxygen-1.0
필수

Always oxygen-1.0

사용 가능한 옵션:
oxygen-1.0
prompt
string
필수

Video description

예시:

"A paper boat drifting on a calm pond, soft morning light"

seconds
enum<string>
기본값:4
필수

Output length in seconds, integer 4–15, as a string or number. Used for billing; the clip usually runs slightly longer

사용 가능한 옵션:
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
size
enum<string>
기본값:1280x720

Sets the resolution and orientation. Pass it every time; it defaults to 720x1280 (portrait) when omitted. 1280x720 = 480p landscape, 720x1280 = 480p portrait, 1792x1024 = 768p landscape, 1024x1792 = 768p portrait. For 320p or 1:1, use resolution / aspect_ratio in the input_reference envelope.

사용 가능한 옵션:
1280x720,
720x1280,
1792x1024,
1024x1792
input_reference
string

Two forms:

  • Image URL or data URI → first-frame video; aspect ratio follows the first frame
  • JSON string starting with { (envelope) → allowed keys: images (first frame, max 1), last_image (last frame), reference_images (up to 9), reference_videos (up to 3, https only), reference_audios (up to 3, https only), resolution (320p / 480p / 768p, wins over size), aspect_ratio (16:9 / 9:16 / 1:1, ignored for image-to-video), prompt

Must be a string, so serialize the envelope first. No duration and no unknown keys in the envelope; first/last frames cannot be mixed with reference media.

예시:

"https://your-cdn.example.com/first.png"

응답

Task accepted

id
string

Task id, used with GET /v1/videos/{id}

object
enum<string>
사용 가능한 옵션:
video
model
string
status
enum<string>
사용 가능한 옵션:
queued,
in_progress,
completed,
failed
progress
integer

0–100

seconds
string
size
string
created_at
integer
completed_at
integer
expires_at
integer

When video_url expires (Unix seconds), about 24 hours after completion

video_url
string

Output MP4 URL, downloadable without an auth header; store it promptly

usage
object

Reference billing info; actual billing is a flat $0.02 per second, see your bill

error
object