SDK

Her programlama dili için resmî SDK’lar

RunAPI SDKs give Python, Node.js, PHP, Java, Ruby, and Go apps one typed integration layer for 240+ AI models across video, image, music, audio, and LLM workflows. Install a model SDK, set RUNAPI_API_KEY, create a task, then poll or receive a webhook with the same task lifecycle used by the REST API.

Python · Node.js · PHP · Java · Ruby · Go · REST-compatible
INSTALL 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"
});

Model-specific SDKs share the same task object, auth, error handling, and pricing links.

HOW IT WORKS

How to call an AI model with a RunAPI SDK

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"
)
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"
});
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
}

Her stack için tasarlandı

Web uygulamaları

Birkaç satır kodla uygulamanıza yapay zeka üretimi ekleyin. Webhook yardımcıları asenkron teslimatı yönetir.

Backend hizmetleri

Üretim isteklerini ölçekli şekilde işleyin. Yerleşik yeniden denemeler ve hız sınırlama hizmetinizi güvenilir tutar.

Veri işlem hatları

Eğitim verileri üretin, veri kümelerini zenginleştirin veya ML işlem hattınızın parçası olarak sentetik medya oluşturun.

Why developers choose RunAPI SDKs

OpenAI-Compatible

Drop-in replacement. Change the base URL, keep your existing code.

Full Type Safety

TypeScript and Python types for every model, endpoint, and parameter.

Async & Streaming

Native async/await and SSE streaming in all supported languages.

RunAPI SDK questions

RunAPI publishes model-specific SDKs for Python, Node.js, PHP, Java, Ruby, and Go. Each package targets one model family, while the REST API remains available for Elixir, .NET, and any runtime that can send HTTPS requests.

Daha fazlasını keşfedin

Bir ekiple mi geliştiriyorsunuz?

Kurumsal kurulum, entegrasyonlar ve teknik sorular konusunda yardımcı oluruz.

İletişime geçin