Documentation
¶
Overview ¶
Package prodia wraps Prodia's image generation REST API.
NewImageModel targets the synchronous POST /v2/job endpoint for text-to-image job types. image.Options.Model is the official job type discriminator, such as "inference.flux-fast.schnell.txt2img.v2"; the provider-only config is available under ImageRequestExtensionKey. Model, prompt, negative prompt, dimensions, and seed belong to Core; native duplicates are rejected. PNG, JPEG, and WebP output use the endpoint's standard Accept negotiation.
See https://docs.prodia.com/reference/inference/ for the full reference.
Index ¶
Constants ¶
const ( ImageRequestExtensionKey = Provider + "/image_request" // DefaultBaseURL is Prodia's v2 inference endpoint. DefaultBaseURL = "https://inference.prodia.com/v2" )
const ( JobFlux2DevTextToImage = "inference.flux-2.dev.txt2img.v1" JobFlux2FlexTextToImage = "inference.flux-2.flex.txt2img.v1" JobFlux2Klein4BTextToImage = "inference.flux-2.klein.4b.txt2img.v1" JobFlux2Klein9BTextToImage = "inference.flux-2.klein.9b.txt2img.v1" JobFlux2MaxTextToImage = "inference.flux-2.max.txt2img.v1" JobFlux2ProTextToImage = "inference.flux-2.pro.txt2img.v1" JobFluxFastSchnellTextToImage = "inference.flux-fast.schnell.txt2img.v2" JobRecraftV4TextToImage = "inference.recraft.v4.txt2img.v1" )
Current official text-to-image job type identifiers.
const (
Provider = "prodia"
)
Provider is the stable backend name for host-side attribution.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageModel ¶
type ImageModel struct {
// contains filtered or unexported fields
}
ImageModel wraps Prodia's /v2/job inference endpoint. Model id (image.Options.Model) carries the full Prodia type, e.g. "inference.flux.dev.txt2img.v1". Core owns the prompt, model, dimensions, negative prompt, and seed. The native config extension accepts provider-only options such as sampler and steps; duplicate Core fields are rejected.
func NewImageModel ¶
func NewImageModel(ctx context.Context, config ImageModelConfig) (*ImageModel, error)