ark

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package ark implements the Volcengine Ark (火山方舟) video generation engine, supporting Seedance 2.0 and other Ark content generation models.

API reference: https://www.volcengine.com/docs/82379/1520758

Index

Constants

View Source
const (
	ModelSeedream3_0 = "seedream-3.0"
	ModelSeedream2_1 = "seedream-2.1"
)

Seedream model constants.

Variables

View Source
var (
	ErrMissingBaseURL = errors.New("ark: BaseURL is empty")
	ErrMissingModel   = errors.New("ark: Model is empty")
	ErrMissingContent = errors.New("ark: no content provided (need at least a text prompt or image)")
)

Functions

func ConfigSchema added in v0.9.0

func ConfigSchema() []engine.ConfigField

ConfigSchema returns the configuration fields required by the Ark engine.

func ModelsByCapability added in v0.7.0

func ModelsByCapability() map[string][]string

ModelsByCapability returns all known Ark (Volcengine) models grouped by capability.

Types

type Config

type Config struct {
	APIKey  string
	BaseURL string // e.g. "https://ark.cn-beijing.volces.com"
	Model   string // Model ID or Endpoint ID, e.g. "doubao-seedance-2-0-260128"

	HTTPClient        *http.Client
	WaitForCompletion bool
	PollInterval      time.Duration
}

Config configures the Ark video generation engine.

type Engine

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

Engine implements engine.Engine for Volcengine Ark content generation.

func New

func New(cfg Config) *Engine

New creates an Ark 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 creates a media generation task. Image models use the synchronous /images/generations endpoint. Video models use the async /contents/generations/tasks endpoint with polling.

func (*Engine) Resume added in v0.11.0

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