video

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDuration       = veniceDefaultDuration
	DefaultResolution     = veniceDefaultResolution
	DefaultAspectRatio    = veniceDefaultAspectRatio
	DefaultNegativePrompt = veniceDefaultNegativePrompt
	DefaultPollInterval   = veniceDefaultPollInterval
	DefaultTimeout        = veniceDefaultTimeout
)

Variables

View Source
var (
	ValidDurations   = []string{"5s", "10s"}
	ValidResolutions = []string{"480p", "720p", "1080p"}
)

Functions

func LoadInputImage

func LoadInputImage(path string) ([]byte, error)

func ResolveModel

func ResolveModel(model string, hasInput bool) string

func SaveVideo

func SaveVideo(data []byte, outputDir, prompt string) (string, error)

func ValidateAspectRatio

func ValidateAspectRatio(aspectRatio string) error

func ValidateDuration

func ValidateDuration(duration string) error

func ValidateResolution

func ValidateResolution(resolution string) error

Types

type InputImage

type InputImage struct {
	Path string
	Data []byte
}

type QueuedJob

type QueuedJob struct {
	Model   string
	QueueID string
}

type Quote

type Quote struct {
	Amount float64
}

type Request

type Request struct {
	Prompt          string
	Model           string
	Duration        string
	AspectRatio     string
	Resolution      string
	Audio           bool
	NegativePrompt  string
	ImagePath       string
	ImageData       []byte
	ReferenceImages []InputImage
	Debug           bool
	DebugRaw        bool
}

type Retrieval

type Retrieval struct {
	Done                 bool
	Status               string
	AverageExecutionTime int64
	ExecutionDuration    int64
	Data                 []byte
	MimeType             string
}

type VeniceProvider

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

func NewVeniceProvider

func NewVeniceProvider(apiKey string) *VeniceProvider

func (*VeniceProvider) Queue

func (p *VeniceProvider) Queue(ctx context.Context, req Request) (*QueuedJob, error)

func (*VeniceProvider) Quote

func (p *VeniceProvider) Quote(ctx context.Context, req Request) (*Quote, error)

func (*VeniceProvider) Retrieve

func (p *VeniceProvider) Retrieve(ctx context.Context, job QueuedJob, deleteMediaOnCompletion bool, debug bool) (*Retrieval, error)

Jump to

Keyboard shortcuts

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