Versions in this module Expand all Collapse all v0 v0.1.0 Jun 29, 2026 Changes in this version + const ModelClarityUpscaler + const ModelCreativeUpscale + const ModelDALLE2 + const ModelDALLE3 + const ModelFluxDev + const ModelFluxPro + const ModelFluxSchnell + const ModelGPTImage1 + const ModelGPTImage2 + const ModelPlayground + const ModelSD3 + const ModelSDXL + const ModelSDXLTurbo + var ErrContentPolicy = errors.New("content policy violation") + var ErrInvalidRequest = errors.New("invalid request") + var ErrModelNotFound = errors.New("model not found") + var ErrNoProviders = errors.New("no providers configured") + var ErrNotSupported = errors.New("operation not supported") + var ErrRateLimited = errors.New("rate limited") + var ErrUnknownProvider = errors.New("unknown provider") + type APIError struct + Code string + Message string + Provider string + StatusCode int + func (e *APIError) Error() string + type Capabilities struct + Edit bool + Generate bool + MaxImages int + Models []string + SupportedSizes []provider.ImageSize + Upscale bool + Variations bool + func GetCapabilities(name ProviderName) *Capabilities + type Client struct + func NewClient(config ClientConfig) (*Client, error) + func (c *Client) Close() error + func (c *Client) Edit(ctx context.Context, req *provider.EditRequest) (*provider.EditResponse, error) + func (c *Client) Generate(ctx context.Context, req *provider.GenerateRequest) (*provider.GenerateResponse, error) + func (c *Client) Provider() provider.Provider + func (c *Client) SupportsEdit() bool + func (c *Client) SupportsUpscale() bool + func (c *Client) SupportsVariations() bool + func (c *Client) Upscale(ctx context.Context, req *provider.UpscaleRequest) (*provider.UpscaleResponse, error) + func (c *Client) Variations(ctx context.Context, req *provider.VariationsRequest) (*provider.VariationsResponse, error) + type ClientConfig struct + Logger *slog.Logger + Providers []ProviderConfig + type ModelInfo struct + ID string + MaxImages int + Name string + Provider ProviderName + SupportsEdit bool + SupportsHD bool + func GetModelInfo(modelID string) *ModelInfo + type ProviderConfig struct + APIKey string + BaseURL string + CustomProvider provider.Provider + Provider ProviderName + type ProviderName string + const ProviderNameFal + const ProviderNameOpenAI