curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": false}
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": False}
}
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: "kling-v2-6-motion-control",
prompt: "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
image_url: "https://example.com/ref-image.png",
video_url: "https://example.com/ref-video-8s.mp4",
keep_original_sound: "yes",
character_orientation: "image",
mode: "std",
watermark_info: { enabled: false }
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"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"
}
}
Kling 2.6
Kling v2.6 Motion Control 동영상 생성
- Kling 모션 컨트롤 모델 (참조 이미지 + 참조 동영상)
- 통합 엔드포인트
/v1/videos/generations를 통해 호출 - image / video 두 가지 캐릭터 방향 지원, 최대 시간 각각 10s / 30s
- 비동기 작업 — 제출 후 task_id 반환
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": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": false}
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": False}
}
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: "kling-v2-6-motion-control",
prompt: "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
image_url: "https://example.com/ref-image.png",
video_url: "https://example.com/ref-video-8s.mp4",
keep_original_sound: "yes",
character_orientation: "image",
mode: "std",
watermark_info: { enabled: false }
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"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": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": false}
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "kling-v2-6-motion-control",
"prompt": "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "std",
"watermark_info": {"enabled": False}
}
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: "kling-v2-6-motion-control",
prompt: "참조 동영상에 따라 캐릭터가 몸을 돌려 손을 흔드는 동작, 영화적 조명",
image_url: "https://example.com/ref-image.png",
video_url: "https://example.com/ref-video-8s.mp4",
keep_original_sound: "yes",
character_orientation: "image",
mode: "std",
watermark_info: { enabled: false }
};
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));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"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"
}
}
인증
string
필수
모든 요청에 Bearer Token 인증이 필요합니다API Key 발급:API Key 관리 페이지에서 API Key를 발급받으세요각 요청에 다음 헤더를 추가하세요:
Authorization: Bearer YOUR_API_KEY
요청 파라미터
string
필수
모델 이름:
kling-v3-motion-control 또는 kling-v2-6-motion-controlstring
동작, 카메라 움직임, 스타일을 보완하는 텍스트 프롬프트선택 사항이지만 구체적으로 작성할수록 안정적인 결과를 얻을 수 있습니다예:
"캐릭터가 참조 동영상에 맞춰 춤을 춥니다, 부드러운 동작, 사실적인 스타일"string
필수
참조 이미지 URL공개적으로 접근 가능한 링크여야 합니다
string
필수
참조 동영상 URL공개적으로 접근 가능한 직접 링크여야 합니다. mp4/mov 권장, 100MB 이하
서버가
video_url의 실제 시간을 측정합니다. 최소 3초이며, 최대값은 character_orientation에 따라 결정됩니다.string
기본값:"yes"
참조 동영상의 원본 음성을 유지할지 여부선택 값:
yes: 원본 음성 유지 (기본값)no: 원본 음성 유지 안 함
string
필수
캐릭터 방향 제어 방식선택 값:
image: 참조 이미지의 캐릭터 방향 사용 (참조 동영상 시간:3~10s)video: 참조 동영상의 캐릭터 방향 사용 (참조 동영상 시간:3~30s)
string
필수
생성 모드선택 값:
std: 표준 모드 (속도와 품질의 균형)pro: 고품질 모드 (처리 시간이 길어집니다)
object
워터마크 제어 객체 (선택 사항)
표시 watermark_info 필드
표시 watermark_info 필드
boolean
기본값:"false"
워터마크 추가 여부
true: 워터마크 추가false: 워터마크 추가 안 함 (기본값)
시간 규칙
| 조건 | 허용 참조 동영상 시간 |
|---|---|
character_orientation = image | 3s ~ 10s |
character_orientation = video | 3s ~ 30s |
과금 시간은 서버가
video_url에서 측정한 실제 시간을 기준으로 하며, 클라이언트 측 추정값이 아닙니다.응답
integer
응답 상태 코드, 성공 시 200
사용 예시
예시 1: image 방향 (10초 이내)
{
"model": "kling-v2-6-motion-control",
"prompt": "참조 이미지의 캐릭터 방향에 맞춰 몸을 돌려 손을 흔드는 동작",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-8s.mp4",
"character_orientation": "image",
"mode": "std",
"keep_original_sound": "yes",
"watermark_info": {"enabled": false}
}
예시 2: video 방향 (30초 이내)
{
"model": "kling-v2-6-motion-control",
"prompt": "참조 동영상의 캐릭터 방향과 리듬을 따라 부드러운 동작을 유지",
"image_url": "https://example.com/ref-image.png",
"video_url": "https://example.com/ref-video-12s.mp4",
"character_orientation": "video",
"mode": "pro",
"keep_original_sound": "no",
"watermark_info": {"enabled": false}
}
⌘I