이미지의 동영상 변환 API 문서#
기본 URL:
https://api.ideal.house
버전: v1
갱신일: 2026-03-25
📖 개요#
이미지의 동영상 변환 API는 단일 원본 이미지에서 AI 동영상을 생성하거나 첫 프레임 및 마지막 프레임 이미지를 모두 지정하여 생성되는 동영상의 시작과 끝을 제어할 수 있게 합니다. 작업 흐름은 다음 두 단계의 비동기 방식입니다.
- 작업 생성 — 이미지, 모델 유형, 길이 및 해상도를 제출하고
taskId를 받습니다. - 결과 폴링 —
taskId로 작업 상태를 조회하고 생성된 동영상을 가져옵니다.
🔐 인증#
모든 API 요청은 API 키로 인증해야 합니다.
요청 헤더에 API 키를 포함하세요.
| 헤더 | 값 |
|---|---|
APIKEY | your_api_key_here |
⚠️ API 키를 안전하게 보관하세요. 클라이언트 측 코드 또는 공개 저장소에 노출하지 마세요.
💰 크레딧 차감#
[!WARNING] 🪙 작업이 성공적으로 생성되면 선택한
modelType,resolution,duration및generateAudio활성화 여부에 따라 크레딧이 차감됩니다. 작업이 최종적으로 실패하면 차감된 크레딧은 계정으로 자동 환불됩니다.
크레딧이 부족하면 오류 코드9051을 반환합니다. 📄 크레딧 차감 참조를 참고하세요.
Flash 모델 (modelType: "Flash", 기본값):
| 해상도 | 길이 | 차감 크레딧 |
|---|---|---|
480p | 5s | 10크레딧 |
480p | 10s | 20크레딧 |
720p | 5s | 20크레딧 |
720p | 10s | 40크레딧 |
1080p | 5s | 40크레딧 |
1080p | 10s | 80크레딧 |
Base 모델 (modelType: "Base", generateAudio: false):
| 해상도 | 길이 | 차감 크레딧 |
|---|---|---|
480p | 5s | 8크레딧 |
480p | 10s | 16크레딧 |
720p | 5s | 16크레딧 |
720p | 10s | 32크레딧 |
1080p | 5s | 32크레딧 |
1080p | 10s | 64크레딧 |
오디오 포함 Base 모델 (modelType: "Base", generateAudio: true):
| 해상도 | 길이 | 차감 크레딧 |
|---|---|---|
480p | 5s | 16크레딧 |
480p | 10s | 32크레딧 |
720p | 5s | 32크레딧 |
720p | 10s | 64크레딧 |
1080p | 5s | 64크레딧 |
1080p | 10s | 128크레딧 |
📌 API 엔드포인트#
1. 이미지의 동영상 변환 작업 생성#
새 AI 이미지 동영상 변환 작업을 만들고 폴링용 고유 taskId를 반환합니다.
엔드포인트
POST /api/v1/imageToVideo/generate
요청 헤더
| 헤더 | 필수 여부 | 설명 |
|---|---|---|
APIKEY | ✅ 예 | API 인증 키 |
Content-Type | ✅ 예 | application/json |
요청 본문
| 필드 | 유형 | 필수 여부 | 설명 |
|---|---|---|---|
imageUrl | string | ✅ 예 | 원본 이미지 URL. 첫/마지막 프레임 모드에서는 첫 프레임으로 사용됩니다. |
duration | integer | ✅ 예 | 동영상 길이(초). 열거형: 5, 10 |
resolution | string | ✅ 예 | 동영상 출력 해상도. 열거형: 480p, 720p, 1080p |
modelType | string | ❌ 선택 | 생성에 사용할 모델 유형. 열거형: Flash, Base. 기본값 Flash |
generateAudio | boolean | ❌ 선택 | 동영상 배경 오디오 생성 여부. modelType이 Base일 때만 적용됩니다. 기본값 false |
prompt | string | ❌ 선택 | 동영상 생성 스타일 및 움직임을 유도하는 텍스트 프롬프트 |
lastImageUrl | string | ❌ 선택 | 마지막 프레임 이미지 URL. 제공하면 첫/마지막 프레임 모드가 활성화되어 동영상이 imageUrl(첫 프레임)에서 lastImageUrl(마지막 프레임)로 전환됩니다. |
💡 첫/마지막 프레임 모드:
lastImageUrl을 제공하면 API는 첫 프레임 이미지(imageUrl)에서 마지막 프레임 이미지(lastImageUrl)로 부드럽게 전환되는 동영상을 생성하므로 동영상의 시작과 끝을 정밀하게 제어할 수 있습니다.
🖼️ 이미지 요건: 첫 프레임 및 선택적인 마지막 프레임 이미지는 JPG/JPEG, PNG 또는 WebP여야 합니다. 각 이미지는 20 MB 이하여야 하며 크기는 128 × 128 px부터 6,000 × 6,000 px까지 허용됩니다(경계값 포함). 최대 픽셀 크기를 초과하는 이미지는 처리 전에 6,000 × 6,000 px 안에 들어오도록 비율을 유지하여 자동 축소됩니다. 이미지 URL은 API 서버에서 직접 접근할 수 있어야 합니다.
모델 유형
| 값 | 설명 |
|---|---|
Flash | 기본값. 빠른 생성 속도와 고품질 출력 |
Base | 대체 모델 — 선택적 AI 오디오 생성 지원 (generateAudio) |
길이 옵션
| 값 | 설명 |
|---|---|
5 | 5초 동영상 |
10 | 10초 동영상 |
해상도 옵션
| 값 | 설명 |
|---|---|
480p | 표준 화질 — 더 빠른 처리 |
720p | 고화질 — 더 높은 품질 출력 |
1080p | 풀 HD — 최고 품질 출력 |
📥 요청 예제#
cURL
# Flash model (default) — single source image
curl -X POST "https://api.ideal.house/api/v1/imageToVideo/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Gentle camera zoom in with soft lighting"
}'
# Base model with audio — single source image
curl -X POST "https://api.ideal.house/api/v1/imageToVideo/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "1080p",
"modelType": "Base",
"generateAudio": true,
"prompt": "Peaceful living room ambiance"
}'
# First-last frame mode — specify both first and last frame
curl -X POST "https://api.ideal.house/api/v1/imageToVideo/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/room-day.jpg",
"lastImageUrl": "https://example.com/room-night.jpg",
"duration": 10,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Smooth day to night transition"
}'
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class ImageToVideoApiExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
// Flash model — standard mode
String requestBody = """
{
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Gentle camera zoom in with soft lighting"
}
""";
// Base model with audio
// String requestBody = """
// {
// "imageUrl": "https://example.com/room.jpg",
// "duration": 5,
// "resolution": "1080p",
// "modelType": "Base",
// "generateAudio": true,
// "prompt": "Peaceful living room ambiance"
// }
// """;
// First-last frame mode
// String requestBody = """
// {
// "imageUrl": "https://example.com/room-day.jpg",
// "lastImageUrl": "https://example.com/room-night.jpg",
// "duration": 10,
// "resolution": "720p",
// "modelType": "Flash",
// "prompt": "Smooth day to night transition"
// }
// """;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/imageToVideo/generate")
.addHeader("APIKEY", API_KEY)
.addHeader("Content-Type", "application/json")
.post(RequestBody.create(requestBody, MediaType.parse("application/json")))
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY,
"Content-Type": "application/json"
}
# Flash model — single source image
payload = {
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Gentle camera zoom in with soft lighting"
}
# Base model with audio
# payload = {
# "imageUrl": "https://example.com/room.jpg",
# "duration": 5,
# "resolution": "1080p",
# "modelType": "Base",
# "generateAudio": True,
# "prompt": "Peaceful living room ambiance"
# }
# First-last frame mode
# payload = {
# "imageUrl": "https://example.com/room-day.jpg",
# "lastImageUrl": "https://example.com/room-night.jpg",
# "duration": 10,
# "resolution": "720p",
# "modelType": "Flash",
# "prompt": "Smooth day to night transition"
# }
response = requests.post(
f"{BASE_URL}/api/v1/imageToVideo/generate",
headers=headers,
json=payload
)
data = response.json()
task_id = data.get("data")
print(f"Task ID: {task_id}")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function createVideoTask() {
try {
// Flash model — standard mode
const payload = {
imageUrl: 'https://example.com/room.jpg',
duration: 5,
resolution: '720p',
modelType: 'Flash',
prompt: 'Gentle camera zoom in with soft lighting'
};
// Base model with audio:
// const payload = {
// imageUrl: 'https://example.com/room.jpg',
// duration: 5,
// resolution: '1080p',
// modelType: 'Base',
// generateAudio: true,
// prompt: 'Peaceful living room ambiance'
// };
// First-last frame mode:
// const payload = {
// imageUrl: 'https://example.com/room-day.jpg',
// lastImageUrl: 'https://example.com/room-night.jpg',
// duration: 10,
// resolution: '720p',
// modelType: 'Flash',
// prompt: 'Smooth day to night transition'
// };
const response = await axios.post(
`${BASE_URL}/api/v1/imageToVideo/generate`,
payload,
{
headers: {
'APIKEY': API_KEY,
'Content-Type': 'application/json'
}
}
);
const taskId = response.data.data;
console.log('Task ID:', taskId);
return taskId;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
createVideoTask();
📤 응답#
성공 응답
{
"code": 0,
"message": "success",
"data": 1234567890123456789
}
| 필드 | 유형 | 설명 |
|---|---|---|
code | integer | 0은 성공을 의미함 |
message | string | 응답 메시지 |
data | long | 결과 폴링용 고유 작업 ID |
2. 작업 결과 조회#
이전에 생성한 이미지 동영상 변환 작업의 현재 상태와 출력을 조회합니다.
엔드포인트
GET /api/v1/imageToVideo/result
요청 헤더
| 헤더 | 필수 여부 | 설명 |
|---|---|---|
APIKEY | ✅ 예 | API 인증 키 |
쿼리 매개변수
| 매개변수 | 유형 | 필수 여부 | 설명 |
|---|---|---|---|
taskId | long | ✅ 예 | 작업 생성 엔드포인트가 반환한 작업 ID |
📥 요청 예제#
cURL
curl -X GET "https://api.ideal.house/api/v1/imageToVideo/result?taskId=1234567890123456789" \
-H "APIKEY: your_api_key_here"
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class ImageToVideoResultExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
long taskId = 1234567890123456789L;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/imageToVideo/result?taskId=" + taskId)
.addHeader("APIKEY", API_KEY)
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
import time
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY
}
task_id = 1234567890123456789
# Poll until task is complete
while True:
response = requests.get(
f"{BASE_URL}/api/v1/imageToVideo/result",
headers=headers,
params={"taskId": task_id}
)
data = response.json()
result = data.get("data", {})
status = result.get("status")
print(f"Status: {status}, Progress: {result.get('percentage')}%, Queue: {result.get('waitNumber')}")
if status in ("Success", "Failed"):
break
time.sleep(5) # Poll every 5 seconds (video generation takes longer)
if status == "Success":
output = result["output"]
print("Video URL:", output["resultUrl"])
print("Cover Image:", output["cover"])
else:
print("Task failed")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function pollResult(taskId) {
const headers = { 'APIKEY': API_KEY };
while (true) {
const response = await axios.get(
`${BASE_URL}/api/v1/imageToVideo/result`,
{
headers,
params: { taskId }
}
);
const result = response.data.data;
const { status, percentage, waitNumber } = result;
console.log(`Status: ${status} | Progress: ${percentage}% | Queue: ${waitNumber}`);
if (['Success', 'Failed'].includes(status)) {
if (status === 'Success') {
console.log('Video URL:', result.output.resultUrl);
console.log('Cover Image:', result.output.cover);
console.log('Resolution:', result.output.width, 'x', result.output.height);
} else {
console.log('Task failed');
}
break;
}
// Wait 5 seconds before next poll (video tasks take longer)
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
pollResult(1234567890123456789n);
📤 응답#
성공 응답 (작업 완료 — 표준 모드)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Gentle camera zoom in with soft lighting"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/video_result.mp4",
"cover": "https://cdn.ideal.house/output/video_cover.jpg",
"width": 1280,
"height": 720
}
}
}
성공 응답 (작업 완료 — 첫/마지막 프레임 모드)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/room-day.jpg",
"lastImageUrl": "https://example.com/room-night.jpg",
"duration": 10,
"resolution": "720p",
"modelType": "Flash",
"prompt": "Smooth day to night transition"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/video_result.mp4",
"cover": "https://cdn.ideal.house/output/video_cover.jpg",
"width": 1280,
"height": 720
}
}
}
응답 (작업 처리 중 / 대기열에 있음)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Processing",
"waitNumber": 2,
"percentage": 30,
"input": {
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash"
},
"output": null
}
}
응답 (작업 실패)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Failed",
"waitNumber": 0,
"percentage": 0,
"input": {
"imageUrl": "https://example.com/room.jpg",
"duration": 5,
"resolution": "720p",
"modelType": "Flash"
},
"output": null
}
}
응답 필드
| 필드 | 유형 | 설명 |
|---|---|---|
id | long | 작업 고유 식별자 |
status | string | 현재 작업 상태 (작업 상태 참조) |
waitNumber | integer | 대기열에서 앞에 있는 작업 수 (0은 현재 처리 중임을 의미함) |
percentage | integer | 작업 완료 비율 (0–100) |
input | object | 작업의 원래 입력 매개변수 |
input.imageUrl | string | 원본 이미지 URL (첫/마지막 모드의 첫 프레임) |
input.lastImageUrl | string | 마지막 프레임 이미지 URL (첫/마지막 프레임 모드에만 존재) |
input.duration | integer | 동영상 길이(초, 5 또는 10) |
input.resolution | string | 동영상 해상도 (480p, 720p 또는 1080p) |
input.modelType | string | 사용된 모델 유형 (Flash 또는 Base) |
input.generateAudio | boolean | 오디오 생성 활성화 여부 (Base 모델만 해당) |
input.prompt | string | 텍스트 프롬프트 (제공된 경우) |
output | object | 생성 결과 (status가 Success일 때만 제공됨) |
output.resultUrl | string | 생성된 동영상 파일 URL |
output.cover | string | 동영상 커버 / 썸네일 이미지 URL |
output.width | integer | 동영상 너비(픽셀) |
output.height | integer | 동영상 높이(픽셀) |
📊 작업 상태#
| 상태 | 설명 |
|---|---|
Unprocessed | 작업이 생성되었지만 아직 시작되지 않음 |
Processing | 작업이 현재 처리 중 |
Success | 작업이 성공적으로 완료되어 동영상 출력 사용 가능 |
Failed | 오류로 작업이 실패함 |
3-5초마다 폴링하세요. API 작업 제한을 참고하세요.
❌ 오류 응답#
모든 오류 응답은 동일한 JSON 구조를 사용합니다.
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
오류 코드 참조#
| 코드 | 이름 | 설명 | 권장 조치 |
|---|---|---|---|
1001 | FAILED | 요청 실패 (일반 오류) | 구체적인 오류 내용은 message 필드 확인 |
1003 | INTERNAL_ERROR | 내부 서버 오류 | 잠시 후 재시도하고 계속 발생하면 지원팀에 문의 |
1011 | PARAM_ERROR | 요청 매개변수 오류 — 예: 유효하지 않은 modelType, resolution 또는 duration 조합 | 모든 필수 매개변수가 제공되었으며 형식이 올바른지 검증 |
5002 | API_KEY_INVALID | 유효하지 않거나 누락된 API 키 | APIKEY 헤더가 있고 값이 올바른지 확인 |
9010 | SCAN_TEXT_ERROR | 텍스트 프롬프트가 콘텐츠 검토를 통과하지 못함 | 민감하거나 금지된 콘텐츠를 제거하도록 프롬프트 수정 |
9038 | PROHIBITED_CONTENT | 생성된 출력 이미지에 금지된 콘텐츠가 포함됨 | 프롬프트/스타일/입력을 조정하고 재시도 |
9051 | COINS_NOT_ENOUGH | 코인 / 크레딧 부족 | 계정 크레딧을 충전하고 재시도 |
📄 전체 공통 API 오류 코드 목록은 오류 코드 참조를 참고하세요.