runway

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package runway implements engine.Engine for the Runway API.

Video generation is async: POST /v1/image_to_video or /v1/text_to_video creates a task, then GET /v1/tasks/{id} polls for completion. Auth: Authorization: Bearer {key}, env RUNWAY_API_KEY. Requires header X-Runway-Version.

Index

Constants

View Source
const (
	ModelGen4Turbo  = "gen4_turbo"
	ModelGen3ATurbo = "gen3a_turbo"
)

Model constants.

Variables

View Source
var (
	ErrMissingPrompt = errors.New("runway: missing prompt in workflow graph")
)

Functions

func ConfigSchema

func ConfigSchema() []engine.ConfigField

ConfigSchema returns the configuration fields required by the Runway engine.

func DefaultProvider added in v0.15.0

func DefaultProvider() engine.Provider

DefaultProvider returns preset engine configurations for runway.

func ModelInfos added in v0.16.0

func ModelInfos() []engine.ModelInfo

ModelInfos returns i18n metadata for all Runway models.

func ModelsByCapability

func ModelsByCapability() map[string][]string

ModelsByCapability returns all known Runway models grouped by capability.

Types

type Config

type Config struct {
	APIKey            string
	BaseURL           string
	Model             string
	APIVersion        string
	HTTPClient        *http.Client
	WaitForCompletion bool
	PollInterval      time.Duration
	OnProgress        epoll.OnProgress
}

Config configures the Runway engine.

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine implements engine.Engine for Runway.

func New

func New(cfg Config) *Engine

New creates a Runway engine instance.

func (*Engine) Capabilities

func (e *Engine) Capabilities() engine.Capability

Capabilities implements engine.Describer.

func (*Engine) Execute

func (e *Engine) Execute(ctx context.Context, g workflow.Graph) (engine.Result, error)

Execute generates a video via the Runway API.

func (*Engine) Resume

func (e *Engine) Resume(ctx context.Context, remoteID string) (engine.Result, error)

Resume implements engine.Resumer — resumes polling a previously submitted task.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL