Documentation
¶
Overview ¶
Package imageproviders exposes seshat's image.Generation implementations for direct use by a host application, independent of the agent/tool loop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeminiClient ¶
type GeminiClient = internalproviders.GeminiClient
GeminiClient generates images with the Gemini API (Nano Banana models, or Imagen with an imagen-* model).
func NewGemini ¶
func NewGemini(apiKey string, opts ...GeminiOption) *GeminiClient
NewGemini creates a Gemini image generation client. apiKey is a Google AI Studio API key (AIza...).
type GeminiOption ¶
type GeminiOption = internalproviders.GeminiOption
GeminiOption configures a GeminiClient.
func WithGeminiAspectRatio ¶
func WithGeminiAspectRatio(ar string) GeminiOption
WithGeminiAspectRatio sets the aspect ratio ("1:1", "3:4", "4:3", "9:16", "16:9").
func WithGeminiBaseURL ¶
func WithGeminiBaseURL(url string) GeminiOption
WithGeminiBaseURL overrides the default Google AI Studio endpoint.
func WithGeminiCount ¶
func WithGeminiCount(n int) GeminiOption
WithGeminiCount sets the number of images to generate (1-4).
func WithGeminiHTTPClient ¶
func WithGeminiHTTPClient(hc *http.Client) GeminiOption
WithGeminiHTTPClient injects a custom HTTP client.
func WithGeminiModel ¶
func WithGeminiModel(model string) GeminiOption
WithGeminiModel sets the model (default gemini-nano-banana-2.1; an imagen-* model uses the Imagen predict call).
type OpenAIClient ¶
type OpenAIClient = internalproviders.OpenAIClient
OpenAIClient generates images through an OpenAI-compatible endpoint: the GPT Image models (gpt-image-2.5-flare, ...) and DALL-E.
func NewOpenAI ¶
func NewOpenAI(apiKey string, opts ...OpenAIOption) *OpenAIClient
NewOpenAI creates an OpenAI DALL-E image generation client. Pass WithOpenAIBaseURL to point at a self-hosted, OpenAI-API-compatible image generation server instead of the real OpenAI cloud.
type OpenAIOption ¶
type OpenAIOption = internalproviders.OpenAIOption
OpenAIOption configures an OpenAIClient.
func WithOpenAIBaseURL ¶
func WithOpenAIBaseURL(url string) OpenAIOption
WithOpenAIBaseURL overrides the default endpoint (self-hosted server, or a proxy).
func WithOpenAIHTTPClient ¶
func WithOpenAIHTTPClient(hc *http.Client) OpenAIOption
WithOpenAIHTTPClient injects a custom HTTP client.
func WithOpenAIModel ¶
func WithOpenAIModel(model string) OpenAIOption
WithOpenAIModel sets the model (e.g. "gpt-image-2.5-flare", or "dall-e-3").
func WithOpenAIProviderName ¶ added in v1.8.0
func WithOpenAIProviderName(name string) OpenAIOption
WithOpenAIProviderName sets the name an OpenAI-compatible client reports from Provider().
func WithOpenAIQuality ¶
func WithOpenAIQuality(q string) OpenAIOption
WithOpenAIQuality sets the quality: low, medium, high or auto for GPT Image models, standard or hd for dall-e-3. A value of the other family is replaced by that family's default.
func WithOpenAISize ¶
func WithOpenAISize(size string) OpenAIOption
WithOpenAISize sets the image dimensions (e.g. "1024x1024", "1792x1024").
type OpenRouterClient ¶ added in v1.8.0
type OpenRouterClient = internalproviders.OpenRouterClient
OpenRouterClient generates images through the OpenRouter image API.
func NewOpenRouter ¶ added in v1.8.0
func NewOpenRouter(apiKey string, opts ...OpenRouterOption) *OpenRouterClient
NewOpenRouter creates an OpenRouter image generation client.
type OpenRouterOption ¶ added in v1.8.0
type OpenRouterOption = internalproviders.OpenRouterOption
OpenRouterOption configures an OpenRouterClient.
func WithOpenRouterAspectRatio ¶ added in v1.8.0
func WithOpenRouterAspectRatio(ratio string) OpenRouterOption
WithOpenRouterAspectRatio sets the aspect ratio ("1:1", "16:9", ...).
func WithOpenRouterBaseURL ¶ added in v1.8.0
func WithOpenRouterBaseURL(url string) OpenRouterOption
WithOpenRouterBaseURL overrides the API root.
func WithOpenRouterModel ¶ added in v1.8.0
func WithOpenRouterModel(model string) OpenRouterOption
WithOpenRouterModel sets the model (for example "black-forest-labs/flux-3-image").
type Profile ¶ added in v1.8.0
type Profile = internalproviders.Profile
Profile describes an image provider: protocol, endpoint, key variables and models (the first model is the default).
func ProfileFor ¶ added in v1.8.0
ProfileFor returns the image profile of a provider ID.