An open API service indexing awesome lists of open source software.

https://github.com/bububa/runway-go

RunwayML golang SDK
https://github.com/bububa/runway-go

Last synced: 9 months ago
JSON representation

RunwayML golang SDK

Awesome Lists containing this project

README

          

# RunwayML SDK implementation in Golang

[![Go Reference](https://pkg.go.dev/badge/github.com/bububa/runway-go.svg)](https://pkg.go.dev/github.com/bububa/runway-go)
[![Go](https://github.com/bububa/runway-go/actions/workflows/go.yml/badge.svg)](https://github.com/bububa/runway-go/actions/workflows/go.yml)
[![goreleaser](https://github.com/bububa/runway-go/actions/workflows/goreleaser.yml/badge.svg)](https://github.com/bububa/runway-go/actions/workflows/goreleaser.yml)
[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/bububa/runway-go.svg)](https://github.com/bububa/runway-go)
[![GoReportCard](https://goreportcard.com/badge/github.com/bububa/runway-go)](https://goreportcard.com/report/github.com/bububa/runway-go)
[![GitHub license](https://img.shields.io/github/license/bububa/runway-go.svg)](https://github.com/bububa/runway-go/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/bububa/runway-go.svg)](https://gitHub.com/bububa/runway-go/releases/)

## Installation

```bash
go get -u github.com/bububa/runway-go
```

## Usage

```golang

import "github.com/bububa/runway-go"
func main() {
ctx := context.Background()
clt := runway.NewClient(os.Getenv("RUNWAY_KEY"))
i2vReq := runway.Image2VideoRequest[string] {
PromptImage: "http://example.com",
Seed: 4294967295,
Mode: "gen4_turbo",
PromptText: "string",
Duration: 5,
Ratio: VideoRatio_1280_720,
ContentModeration: &runway.ContentModeration {
PublicFigureThreshold: runway.Auto
},
}
taskID, err := clt.CreateTask(ctx, &i2vReq)
if err != nil {
return
}
task := runway.Task{
ID: taskID,
}
if err := clt.GetTask(ctx, &task); err != nil {
return
}
if err := clt.DeleteTask(ctx, taskID); err != nil {
return
}
var org runway.Organization
if err := clt.Organization(ctx, &org); err != nil {
return
}
}
```