메인 콘텐츠로 건너뛰기
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": true
  }'
import requests

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

payload = {
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": True
}

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

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

print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";

const payload = {
  model: "doubao-seedance-1-5-pro",
  prompt: "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
  duration: 5,
  aspect_ratio: "16:9",
  resolution: "720p",
  audio: true
};

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));
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    url := "https://api.apimart.ai/v1/videos/generations"

    payload := map[string]interface{}{
        "model":        "doubao-seedance-1-5-pro",
        "prompt":       "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
        "duration":     5,
        "aspect_ratio": "16:9",
        "resolution":   "720p",
        "audio":        true,
    }

    jsonData, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Set("Authorization", "Bearer <token>")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class Main {
    public static void main(String[] args) throws Exception {
        String url = "https://api.apimart.ai/v1/videos/generations";

        String payload = """
        {
          "model": "doubao-seedance-1-5-pro",
          "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
          "duration": 5,
          "aspect_ratio": "16:9",
          "resolution": "720p",
          "audio": true
        }
        """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .header("Authorization", "Bearer <token>")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(payload))
            .build();

        HttpResponse<String> response = client.send(request,
            HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
<?php

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

$payload = [
    "model" => "doubao-seedance-1-5-pro",
    "prompt" => "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration" => 5,
    "aspect_ratio" => "16:9",
    "resolution" => "720p",
    "audio" => true
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
require 'net/http'
require 'json'
require 'uri'

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

payload = {
  model: "doubao-seedance-1-5-pro",
  prompt: "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
  duration: 5,
  aspect_ratio: "16:9",
  resolution: "720p",
  audio: true
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = payload.to_json

response = http.request(request)
puts response.body
import Foundation

let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!

let payload: [String: Any] = [
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": true
]

var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let error = error {
        print("Error: \(error)")
        return
    }

    if let data = data, let responseString = String(data: data, encoding: .utf8) {
        print(responseString)
    }
}

task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        var url = "https://api.apimart.ai/v1/videos/generations";

        var payload = @"{
            ""model"": ""doubao-seedance-1-5-pro"",
            ""prompt"": ""햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈"",
            ""duration"": 5,
            ""aspect_ratio"": ""16:9"",
            ""resolution"": ""720p"",
            ""audio"": true
        }";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");

        var content = new StringContent(payload, Encoding.UTF8, "application/json");
        var response = await client.PostAsync(url, content);
        var result = await response.Content.ReadAsStringAsync();

        Console.WriteLine(result);
    }
}
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
{
  "error": {
    "code": 400,
    "message": "요청 매개변수가 유효하지 않습니다",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "code": 401,
    "message": "인증에 실패했습니다. API 키를 확인해주세요",
    "type": "authentication_error"
  }
}
{
  "error": {
    "code": 402,
    "message": "잔액이 부족합니다. 충전 후 다시 시도해주세요",
    "type": "payment_required"
  }
}
{
  "error": {
    "code": 429,
    "message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요",
    "type": "rate_limit_error"
  }
}
{
  "error": {
    "code": 500,
    "message": "서버 내부 오류입니다. 잠시 후 다시 시도해주세요",
    "type": "server_error"
  }
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": true
  }'
import requests

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

payload = {
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": True
}

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

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

print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";

const payload = {
  model: "doubao-seedance-1-5-pro",
  prompt: "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
  duration: 5,
  aspect_ratio: "16:9",
  resolution: "720p",
  audio: true
};

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));
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    url := "https://api.apimart.ai/v1/videos/generations"

    payload := map[string]interface{}{
        "model":        "doubao-seedance-1-5-pro",
        "prompt":       "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
        "duration":     5,
        "aspect_ratio": "16:9",
        "resolution":   "720p",
        "audio":        true,
    }

    jsonData, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Set("Authorization", "Bearer <token>")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class Main {
    public static void main(String[] args) throws Exception {
        String url = "https://api.apimart.ai/v1/videos/generations";

        String payload = """
        {
          "model": "doubao-seedance-1-5-pro",
          "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
          "duration": 5,
          "aspect_ratio": "16:9",
          "resolution": "720p",
          "audio": true
        }
        """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .header("Authorization", "Bearer <token>")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(payload))
            .build();

        HttpResponse<String> response = client.send(request,
            HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
<?php

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

$payload = [
    "model" => "doubao-seedance-1-5-pro",
    "prompt" => "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration" => 5,
    "aspect_ratio" => "16:9",
    "resolution" => "720p",
    "audio" => true
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
require 'net/http'
require 'json'
require 'uri'

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

payload = {
  model: "doubao-seedance-1-5-pro",
  prompt: "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
  duration: 5,
  aspect_ratio: "16:9",
  resolution: "720p",
  audio: true
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = payload.to_json

response = http.request(request)
puts response.body
import Foundation

let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!

let payload: [String: Any] = [
    "model": "doubao-seedance-1-5-pro",
    "prompt": "햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "audio": true
]

var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let error = error {
        print("Error: \(error)")
        return
    }

    if let data = data, let responseString = String(data: data, encoding: .utf8) {
        print(responseString)
    }
}

task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        var url = "https://api.apimart.ai/v1/videos/generations";

        var payload = @"{
            ""model"": ""doubao-seedance-1-5-pro"",
            ""prompt"": ""햇빛 아래에서 노는 귀여운 새끼 고양이, 복슬복슬한 털, 반짝이는 눈"",
            ""duration"": 5,
            ""aspect_ratio"": ""16:9"",
            ""resolution"": ""720p"",
            ""audio"": true
        }";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");

        var content = new StringContent(payload, Encoding.UTF8, "application/json");
        var response = await client.PostAsync(url, content);
        var result = await response.Content.ReadAsStringAsync();

        Console.WriteLine(result);
    }
}
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
{
  "error": {
    "code": 400,
    "message": "요청 매개변수가 유효하지 않습니다",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "code": 401,
    "message": "인증에 실패했습니다. API 키를 확인해주세요",
    "type": "authentication_error"
  }
}
{
  "error": {
    "code": 402,
    "message": "잔액이 부족합니다. 충전 후 다시 시도해주세요",
    "type": "payment_required"
  }
}
{
  "error": {
    "code": 429,
    "message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요",
    "type": "rate_limit_error"
  }
}
{
  "error": {
    "code": 500,
    "message": "서버 내부 오류입니다. 잠시 후 다시 시도해주세요",
    "type": "server_error"
  }
}

인증

Authorization
string
필수
모든 API 엔드포인트는 Bearer Token 인증이 필요합니다API 키 받기:API 키 관리 페이지에서 API 키를 받으세요요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY

요청 매개변수

model
string
필수
영상 생성 모델 이름지원되는 모델:
  • doubao-seedance-1-5-pro - 1.5 Pro 버전. 오디오 생성과 첫 프레임/마지막 프레임(이미지→영상) 지원
prompt
string
필수
영상 콘텐츠 설명더 나은 생성 결과를 위해 장면, 동작, 스타일 등을 자세히 설명하세요예: "해변의 일몰, 바다 위의 황금빛 햇살, 모래사장을 부드럽게 치는 파도"
duration
integer
기본값:"5"
영상 길이(초)지원 범위: 4 ~ 12기본값: 5
aspect_ratio
string
기본값:"16:9"
영상 화면 비율옵션:
  • 16:9 - 가로 화면
  • 9:16 - 세로 화면
  • 1:1 - 정사각형
  • 4:3 - 전통적인 비율
  • 3:4 - 세로 전통적인 비율
  • 21:9 - 울트라 와이드
기본값: 16:9
resolution
string
기본값:"720p"
영상 해상도옵션:
  • 480p - 표준 화질
  • 720p - HD 화질
  • 1080p - 풀HD 화질
기본값: 720p
seed
integer
생성된 콘텐츠의 무작위성을 제어하기 위한 시드 정수값 범위: -1에서 2^32-1 사이의 정수
  • 동일한 요청에서 모델이 다른 시드 값을 받으면(예: 시드를 지정하지 않거나 시드를 -1로 설정하면 임의의 숫자가 사용됨) 다른 결과가 생성됩니다
  • 동일한 요청에서 모델이 동일한 시드 값을 받으면 유사한 결과가 생성되지만 완전히 동일하다는 것은 보장되지 않습니다
audio
boolean
기본값:"true"
오디오 생성 여부true로 설정하면 영상에 AI 생성 오디오가 포함됩니다기본값: true
오디오 생성은 Seedance 2.0 시리즈 및 Seedance 1.5 Pro에서만 지원됩니다
camerafixed
boolean
기본값:"false"
카메라 고정 여부true로 설정하면 카메라 위치가 고정됩니다기본값: false

해상도 및 화면 비율 조합

해상도지원되는 화면 비율참고
480p16:9, 4:3, 1:1, 3:4, 9:16, 21:9모두 지원
720p16:9, 4:3, 1:1, 3:4, 9:16, 21:9모두 지원
1080p16:9, 4:3, 1:1, 3:4, 9:16, 21:9모두 지원
image_urls
array<url>
이미지에서 영상으로 변환을 위한 이미지 URL 배열자동 역할 할당 규칙:
  • 1장 = 첫 프레임
  • 2장 = 첫 프레임 + 마지막 프레임
예: ["https://example.com/first.png", "https://example.com/last.png"]
  • image_urlsimage_with_roles는 동시에 사용할 수 없습니다
image_with_roles
array
더 정밀한 제어를 위한 역할 지정 이미지 배열예:
[
  {"url": "https://example.com/start.png", "role": "first_frame"},
  {"url": "https://example.com/end.png", "role": "last_frame"}
]
  • image_urlsimage_with_roles는 동시에 사용할 수 없습니다
  • 첫 프레임과 마지막 프레임은 각각 1장만 지원

응답

code
integer
응답 상태 코드, 성공 시 200
data
array
응답 데이터 배열

사용 사례

사례 1: 오디오가 포함된 텍스트에서 영상

{
  "model": "doubao-seedance-1-5-pro",
  "prompt": "해변의 일몰, 바다 위의 황금빛 햇살, 모래사장을 부드럽게 치는 파도",
  "audio": true
}

사례 2: 고품질 세로 화면 숏 영상

{
  "model": "doubao-seedance-1-5-pro",
  "prompt": "벚꽃 나무 아래에서 회전하는 소녀, 바람에 날리는 꽃잎",
  "duration": 5,
  "aspect_ratio": "9:16",
  "resolution": "720p",
  "audio": true
}

사례 3: 첫 프레임에서 동적 영상

{
  "model": "doubao-seedance-1-5-pro",
  "prompt": "자연스러운 동적 효과로 이미지에 애니메이션 추가",
  "image_urls": ["https://example.com/first.png"],
  "duration": 5,
  "audio": true
}

사례 4: 첫/마지막 프레임을 사용한 전환 효과

{
  "model": "doubao-seedance-1-5-pro",
  "prompt": "장면이 낮에서 밤으로 전환되고, 도시의 불빛이 서서히 켜짐",
  "image_with_roles": [
    {"url": "https://example.com/day.png", "role": "first_frame"},
    {"url": "https://example.com/night.png", "role": "last_frame"}
  ],
  "duration": 5
}
작업 결과 조회영상 생성은 비동기 작업으로, 제출 시 task_id를 반환합니다. 작업 상태 가져오기 엔드포인트를 사용하여 생성 진행 상황과 결과를 조회하세요.

1.0 버전과의 차이점

기능1.0 fast/quality1.5 Pro
기본 해상도1080p720p
지원 해상도480p/720p/1080p480p/720p/1080p
길이 범위2-12초4-12초
오디오 생성미지원지원
참조 이미지reference (1장)미지원