SDK

RunAPI SDK.
Typed clients for 130+ AI models.

RunAPI SDKs give JavaScript, Ruby, and Go apps one typed integration layer for 130+ 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.

JavaScript · Ruby · Go · REST-compatible
SDK PICKER

Pick a model family and runtime before opening the generated SDK docs.

runapi.ai
npm install @runapi.ai/kling

export RUNAPI_API_KEY="runapi_..."

node create-video.mjs
gem install runapi-kling

export RUNAPI_API_KEY="runapi_..."

ruby create_video.rb
go get github.com/runapi-ai/kling-sdk/go

export RUNAPI_API_KEY="runapi_..."

go run ./cmd/create-video
Model SDK packages are public on npm, RubyGems, and the Go module proxy.
Model-specific SDKs share the same task object, auth, error handling, and pricing links.
SDK COVERAGE
133 models

The exported SDK contract lists 133 public model IDs across media and LLM endpoints.

85 operations

The SDK contract maps 85 request operations so clients can keep endpoint names and model IDs aligned.

3 languages

JavaScript, Ruby, and Go packages are published for model-specific SDKs, with REST available for any other runtime.

1 task lifecycle

Create, poll, webhook callback, and failure handling stay consistent across model families.

WHAT IS THIS

What is the RunAPI SDK?

The RunAPI SDK is a set of model-specific clients for the RunAPI platform. Each package wraps one model family with typed request helpers, shared authentication, task polling, and response decoding. Developers keep the same API key, billing account, task ID, callback pattern, and error surface while switching between video, image, music, audio, and LLM models.

Last updated: June 11, 2026 Reviewed by RunAPI Editorial Team
INSTALL

Install the SDK for the model you are using.

RunAPI publishes model SDKs instead of forcing every app to install every model. Start with the package for your model family, then add more packages only when your product needs them.

npm install @runapi.ai/kling
npm install @runapi.ai/suno
npm install @runapi.ai/flux-kontext
gem install runapi-kling
gem install runapi-suno
gem install runapi-flux-kontext
go get github.com/runapi-ai/kling-sdk/go
go get github.com/runapi-ai/suno-sdk/go
go get github.com/runapi-ai/flux-kontext-sdk/go
Model SDK packages are public on npm, RubyGems, and the Go module proxy.
CAPABILITIES

What the SDK handles for production apps

Typed model requests

Each model SDK exposes request fields that match the RunAPI contract, so application code can use model IDs and endpoint parameters without copying raw API examples into every service.

Async task polling

Long-running media jobs return task IDs. SDK helpers preserve that lifecycle: create a task, poll status, and read the terminal output object when generation completes or fails.

Unified auth and billing

One RUNAPI_API_KEY works across supported model SDKs. Usage is billed through the same account, and failed generation tasks are not charged.

HOW IT WORKS

Call a model in 4 steps

01

Pick a model SDK

Choose the package that matches the model family you want to integrate, such as Kling for video, Suno for music, or Flux Kontext for image workflows.

npm install @runapi.ai/kling
02

Set your API key

Store the key in RUNAPI_API_KEY. The SDK reads the same key used by the REST API, CLI, MCP server, and agent skills.

export RUNAPI_API_KEY=...
03

Create the task

Send the typed request through the SDK. Media endpoints return a RunAPI task ID quickly, so your application can continue without blocking a web request.

client.textToVideo.run(...)
04

Poll or use webhooks

Poll the task from your worker, or configure a callback URL and let RunAPI notify your backend when the generation reaches a terminal state.

task.status == "completed"
POPULAR SDK PACKAGES

Start with a model-specific SDK

Browse SDK Models
Package Language Best for Docs
@runapi.ai/kling JavaScript Kling video generation View →
runapi-kling Ruby Kling video generation View →
github.com/runapi-ai/kling-sdk/go Go Kling video generation View →
@runapi.ai/suno JavaScript Suno music generation View →
@runapi.ai/flux-kontext JavaScript Flux Kontext image workflows View →
@runapi.ai/core JavaScript Shared SDK runtime helpers View →
SDK VS REST

When to use SDKs, REST, CLI, or skills

SDK

Application backend code

Typed helpers, package-managed upgrades, shared task polling, and model-specific request fields.

REST API

Any language or thin integration

Direct HTTP calls with the same API key, endpoint paths, task IDs, and callback behavior.

CLI

Local scripts and CI jobs

JSON-first terminal commands for automation, smoke tests, and one-off generation tasks.

Agent skills

Claude Code, Codex, Cursor, and agent runtimes

Installable model context so coding agents can find docs, schemas, and setup instructions.

RELATED DEVELOPER RESOURCES

Use the same model catalog across every developer surface

FAQ

RunAPI SDK questions

Which languages have RunAPI SDKs?

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

Why are RunAPI SDKs model-specific?

Model-specific packages keep application dependencies small and make request fields easier to understand. A video app can install Kling or Seedance, a music app can install Suno, and a multimodal backend can add packages as new workflows ship.

How many models does the SDK contract cover?

The current exported contract covers 133 public model IDs and 85 request operations. That contract is generated from the RunAPI catalog and is used to keep SDK examples, CLI metadata, and API documentation aligned.

Do SDK calls use a different API key?

No. SDK calls use the same RunAPI API key as REST, CLI, MCP, and agent skills. Store it in RUNAPI_API_KEY or pass it through your deployment secret manager instead of hardcoding it in source code.

Can I use webhooks with the SDK?

Yes. SDK-created tasks use the same task lifecycle as REST requests. You can poll task status from a worker, or configure callback handling so RunAPI sends your backend the terminal task payload.

Where should I check pricing before using an SDK?

Use the model catalog and pricing page before integrating a model. SDK docs link back to model pages so developers can check the current billing unit, endpoint shape, and supported model IDs without copying price values into code.

Build with typed SDKs and one RunAPI key.

Pick a model SDK, create a free API key, and ship the same task lifecycle across video, image, music, audio, and LLM features.