curl --request POST \
--url 'https://api.elkapi.com/kling/v1/videos/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}'
import requests
url = "https://api.elkapi.com/kling/v1/videos/image2video"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/kling/v1/videos/image2video";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"task_id": "task_1234567890",
"status": "queued"
}
{
"error": {
"message": "message",
"type": "type",
"param": "param",
"code": "code"
}
}
Kling 형식
Kling 이미지-비디오
- Kling 모델로 이미지에서 비디오를 생성합니다.
- image 파라미터로 이미지 URL 또는 Base64 인코딩 이미지 데이터를 전달할 수 있습니다.
POST
/
kling
/
v1
/
videos
/
image2video
curl --request POST \
--url 'https://api.elkapi.com/kling/v1/videos/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}'
import requests
url = "https://api.elkapi.com/kling/v1/videos/image2video"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/kling/v1/videos/image2video";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"task_id": "task_1234567890",
"status": "queued"
}
{
"error": {
"message": "message",
"type": "type",
"param": "param",
"code": "code"
}
}
curl --request POST \
--url 'https://api.elkapi.com/kling/v1/videos/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}'
import requests
url = "https://api.elkapi.com/kling/v1/videos/image2video"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/kling/v1/videos/image2video";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "kling-v3",
"prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
"image": "https://example.com/image.png",
"duration": 5,
"response_format": "json",
"metadata": {}
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"task_id": "task_1234567890",
"status": "queued"
}
{
"error": {
"message": "message",
"type": "type",
"param": "param",
"code": "code"
}
}
Authorizations
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다.요청 헤더에 추가하세요:
Authorization: Bearer YOUR_API_KEY
Body
string
기본값:"kling-v3"
모델/스타일 ID예시:
kling-v3string
텍스트 프롬프트예시:
우주비행사가 일어나 걸어갔습니다string
이미지 입력(URL 또는 Base64)예시:
https://example.com/image.jpgnumber
비디오 길이(초)예시:
5integer
비디오 너비예시:
1280integer
비디오 높이예시:
720integer
비디오 프레임레이트예시:
30integer
랜덤 시드예시:
20231234integer
생성할 비디오 수예시:
1string
응답 형식예시:
urlstring
사용자 식별자예시:
user-1234object
확장 파라미터(예: negative_prompt, style, quality_level 등)
Response
string
작업 ID예시:
abcd1234efghstring
작업 상태예시:
queued⌘I