luma

package module
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package luma wraps Luma's current Agents API using the official Go SDK.

NewImageModel targets the async /v1/generations endpoint for the uni-1 family. It submits, polls, and downloads expiring output URLs before returning provider-neutral image bytes.

Video generation is outside core/image and is not surfaced here.

See https://docs.agents.lumalabs.ai/ for the official reference.

Index

Constants

View Source
const (
	ImageRequestExtensionKey   = "luma/image_request"
	ResponseExtensionKey       = "luma/response"
	DefaultBaseURL             = "https://agents.lumalabs.ai/v1"
	DefaultPollIntervalSeconds = 2
	DefaultPollTimeoutSeconds  = 300
	ModelUni1                  = "uni-1"
	ModelUni1Max               = "uni-1-max"
)
View Source
const DefaultMaxOutputBytes = int64(32 * 1024 * 1024)
View Source
const (
	Provider = "Luma"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageModel

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

ImageModel implements Luma Agents image generation and editing with the official SDK. Provider output URLs are downloaded before they expire.

func NewImageModel

func NewImageModel(config ImageModelConfig) (*ImageModel, error)

func (*ImageModel) Call

func (i *ImageModel) Call(ctx context.Context, request *image.Request) (*image.Response, error)

type ImageModelConfig

type ImageModelConfig struct {
	APIKey         string
	DefaultOptions image.Options
	BaseURL        string
	HTTPClient     *http.Client
	PollInterval   time.Duration
	PollTimeout    time.Duration
	MaxOutputBytes int64
}

func (ImageModelConfig) Validate

func (i ImageModelConfig) Validate() error

Jump to

Keyboard shortcuts

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