웹 애플리케이션
몇 줄의 코드로 앱에 AI 생성을 추가하세요. Webhook 도우미가 비동기 전달을 처리합니다.
Claude visitors: new accounts receive $1.00 in bonus API credit within 30 days. One per person; usage credits only.
Python, Node.js, Go, Ruby, Java, PHP용 타입 안전 클라이언트입니다. 비동기 작업 폴링, 웹훅 도우미, 자동 재시도 기능을 내장하고 있습니다.
npm install @runapi.ai/kling
npm
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.textToVideo.create({
"model": "kling-v3-turbo-text-to-video",
"prompt": "A paper kite flying above a quiet coastal town at sunrise",
"duration_seconds": 5,
"aspect_ratio": "16:9",
"output_resolution": "720p"
});
pip install runapi-kling
PyPI
import os
from runapi.kling import KlingClient
client = KlingClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.text_to_video.create(
model="kling-v3-turbo-text-to-video",
prompt="A paper kite flying above a quiet coastal town at sunrise",
duration_seconds=5,
aspect_ratio="16:9",
output_resolution="720p"
)
go get github.com/runapi-ai/kling-sdk/go@latest
Go modules
package main
import (
"context"
"log"
"os"
"github.com/runapi-ai/core-sdk/go/option"
kling "github.com/runapi-ai/kling-sdk/go/kling"
)
func main() {
client, err := kling.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
if err != nil {
log.Fatal(err)
}
task, err := client.TextToVideo.Create(context.Background(), kling.TextToVideoParams{
Model: kling.TextToVideoModel("kling-v3-turbo-text-to-video"),
Prompt: "A paper kite flying above a quiet coastal town at sunrise",
DurationSeconds: 5,
AspectRatio: "16:9",
OutputResolution: kling.KlingTextToVideoOutputResolution("720p"),
})
if err != nil {
log.Fatal(err)
}
_ = task
}
gem install runapi-kling
RubyGems
require "runapi/kling"
client = RunApi::Kling::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.text_to_video.create(
model: "kling-v3-turbo-text-to-video",
prompt: "A paper kite flying above a quiet coastal town at sunrise",
duration_seconds: 5,
aspect_ratio: "16:9",
output_resolution: "720p"
)
implementation("ai.runapi:runapi-kling")
Maven
import ai.runapi.kling.KlingClient;
import ai.runapi.kling.types.TextToVideoParams;
import ai.runapi.core.polling.TaskCreateResponse;
public final class Example {
public static void main(String[] args) {
KlingClient client = KlingClient.builder()
.apiKey(System.getenv("RUNAPI_API_KEY"))
.build();
TaskCreateResponse task = client.textToVideo().create(
TextToVideoParams.builder()
.model("kling-v3-turbo-text-to-video")
.prompt("A paper kite flying above a quiet coastal town at sunrise")
.durationSeconds(5)
.aspectRatio("16:9")
.outputResolution("720p")
.build()
);
}
}
composer require runapi-ai/kling
Packagist
<?php
require __DIR__ . '/vendor/autoload.php';
use RunApi\Core\ClientOptions;
use RunApi\Kling\KlingClient;
$client = new KlingClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->textToVideo->create([
"model" => "kling-v3-turbo-text-to-video",
"prompt" => "A paper kite flying above a quiet coastal town at sunrise",
"duration_seconds" => 5,
"aspect_ratio" => "16:9",
"output_resolution" => "720p"
]);
모델별 SDK는 동일한 작업 객체, 인증, 오류 처리 및 요금 링크를 공유합니다.
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.textToVideo.create({
"model": "kling-v3-turbo-text-to-video",
"prompt": "A paper kite flying above a quiet coastal town at sunrise",
"duration_seconds": 5,
"aspect_ratio": "16:9",
"output_resolution": "720p"
});
import os
from runapi.kling import KlingClient
client = KlingClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.text_to_video.create(
model="kling-v3-turbo-text-to-video",
prompt="A paper kite flying above a quiet coastal town at sunrise",
duration_seconds=5,
aspect_ratio="16:9",
output_resolution="720p"
)
package main
import (
"context"
"log"
"os"
"github.com/runapi-ai/core-sdk/go/option"
kling "github.com/runapi-ai/kling-sdk/go/kling"
)
func main() {
client, err := kling.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
if err != nil {
log.Fatal(err)
}
task, err := client.TextToVideo.Create(context.Background(), kling.TextToVideoParams{
Model: kling.TextToVideoModel("kling-v3-turbo-text-to-video"),
Prompt: "A paper kite flying above a quiet coastal town at sunrise",
DurationSeconds: 5,
AspectRatio: "16:9",
OutputResolution: kling.KlingTextToVideoOutputResolution("720p"),
})
if err != nil {
log.Fatal(err)
}
_ = task
}
require "runapi/kling"
client = RunApi::Kling::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.text_to_video.create(
model: "kling-v3-turbo-text-to-video",
prompt: "A paper kite flying above a quiet coastal town at sunrise",
duration_seconds: 5,
aspect_ratio: "16:9",
output_resolution: "720p"
)
import ai.runapi.kling.KlingClient;
import ai.runapi.kling.types.TextToVideoParams;
import ai.runapi.core.polling.TaskCreateResponse;
public final class Example {
public static void main(String[] args) {
KlingClient client = KlingClient.builder()
.apiKey(System.getenv("RUNAPI_API_KEY"))
.build();
TaskCreateResponse task = client.textToVideo().create(
TextToVideoParams.builder()
.model("kling-v3-turbo-text-to-video")
.prompt("A paper kite flying above a quiet coastal town at sunrise")
.durationSeconds(5)
.aspectRatio("16:9")
.outputResolution("720p")
.build()
);
}
}
<?php
require __DIR__ . '/vendor/autoload.php';
use RunApi\Core\ClientOptions;
use RunApi\Kling\KlingClient;
$client = new KlingClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->textToVideo->create([
"model" => "kling-v3-turbo-text-to-video",
"prompt" => "A paper kite flying above a quiet coastal town at sunrise",
"duration_seconds" => 5,
"aspect_ratio" => "16:9",
"output_resolution" => "720p"
]);
몇 줄의 코드로 앱에 AI 생성을 추가하세요. Webhook 도우미가 비동기 전달을 처리합니다.
생성 요청을 대규모로 처리하세요. 기본 제공 재시도와 속도 제한으로 서비스 안정성을 유지합니다.
학습 데이터를 생성하고 데이터셋을 보강하거나 ML 파이프라인의 일부로 합성 미디어를 만드세요.
바로 교체할 수 있습니다. 기존 코드를 유지하고 base URL만 변경하세요.
모든 모델, 엔드포인트 및 매개변수에 TypeScript와 Python 타입을 제공합니다.
지원되는 모든 언어에서 네이티브 async/await와 SSE 스트리밍을 사용할 수 있습니다.
RunAPI는 Python, Node.js, PHP, Java, Ruby, Go용 모델별 SDK를 유지 관리합니다. PHP 패키지는 Packagist에 배포되며 Composer로 설치할 수 있습니다. 각 패키지는 하나의 모델 계열을 대상으로 하며, Elixir, .NET 및 HTTPS 요청을 보낼 수 있는 모든 런타임에서는 REST API를 사용할 수 있습니다.
모델별 패키지는 앱의 의존성을 줄이고 요청 필드를 이해하기 쉽게 합니다. 동영상 앱은 Kling 또는 Seedance를, 음악 앱은 Suno를 설치할 수 있으며 멀티모달 백엔드는 새 워크플로를 출시할 때 패키지를 추가할 수 있습니다.
현재 내보낸 명세는 공개 모델 ID 251개와 요청 작업 132개를 지원합니다. 이 명세는 RunAPI 카탈로그에서 생성되며 SDK 예제, CLI 메타데이터 및 API 문서를 일치시키는 데 사용됩니다.
아니요. SDK 호출은 REST, CLI, MCP 및 에이전트 스킬과 동일한 RunAPI API 키를 사용합니다. 소스 코드에 하드코딩하지 말고 RUNAPI_API_KEY에 저장하거나 배포 환경의 비밀 관리 서비스를 통해 전달하세요.
네. SDK로 생성한 작업은 REST 요청과 동일한 작업 수명 주기를 사용합니다. 워커에서 작업 상태를 폴링하거나 콜백 처리를 설정하여 RunAPI가 최종 작업 결과를 백엔드로 보내도록 할 수 있습니다.
모델을 연동하기 전에 모델 카탈로그와 요금 페이지를 확인하세요. SDK 문서는 모델 페이지로 연결되므로 개발자는 요금을 코드에 복사하지 않고도 현재 과금 단위, 엔드포인트 구조 및 지원 모델 ID를 확인할 수 있습니다.
엔터프라이즈 설정, 통합, 기술 문의를 도와드립니다.