Versions in this module Expand all Collapse all v0 v0.1.1 Sep 14, 2026 v0.1.0 Sep 14, 2026 Changes in this version + func Ptr[T any](value T) *T + type APIError struct + Code string + Headers http.Header + Message string + StatusCode int + ValidationErrors []ValidationError + func (e *APIError) Error() string + type AspectRatio struct + Height int + Width int + type BatchRequest struct + DefaultOptions ImageRequest + Variations []ImageRequest + func (r BatchRequest) MarshalJSON() ([]byte, error) + type BatchResult struct + Images []Image + type Client struct + func NewClient(apiID, apiKey string, options ...Option) *Client + func NewClientFromEnv(options ...Option) (*Client, error) + func (c *Client) CreateImage(ctx context.Context, request ImageRequest) (*Image, error) + func (c *Client) CreateImageBatch(ctx context.Context, request BatchRequest) (*BatchResult, error) + func (c *Client) CreateTemplate(ctx context.Context, request TemplateRequest) (*TemplateVersion, error) + func (c *Client) CreateTemplateVersion(ctx context.Context, id string, request TemplateRequest) (*TemplateVersion, error) + func (c *Client) DeleteImage(ctx context.Context, id string) error + func (c *Client) DeleteImageBatch(ctx context.Context, ids []string) error + func (c *Client) DeleteTemplate(ctx context.Context, id string) error + func (c *Client) GenerateCreateAndRenderURL(request URLImageRequest, options ...RenderImageOptions) (string, error) + func (c *Client) GenerateTemplatedImageURL(request TemplatedImageRequest, options ...RenderImageOptions) (string, error) + func (c *Client) ImageURL(id string, options ...RenderImageOptions) (string, error) + func (c *Client) ListTemplateVersions(ctx context.Context, id string, options TemplateListOptions) (*TemplatePage, error) + func (c *Client) ListTemplates(ctx context.Context, options TemplateListOptions) (*TemplatePage, error) + type ColorScheme string + const Dark + const Light + type Crop struct + AspectRatio *AspectRatio + AspectRatioAxis CropAxis + ComputedOrigin CropOrigin + Horizontal *CropSpan + Vertical *CropSpan + type CropAxis string + const CropHeight + const CropWidth + type CropOrigin string + const CropCenter + const CropEnd + const CropStart + type CropSpan struct + End *CropValue + Origin CropOrigin + Size *CropValue + Start *CropValue + type CropUnit string + const CropPercent + const CropPixels + type CropValue struct + Unit CropUnit + Value int + type GoogleFonts []string + func (fonts *GoogleFonts) UnmarshalJSON(data []byte) error + func (fonts GoogleFonts) MarshalJSON() ([]byte, error) + type HTMLImageRequest struct + CSS *string + GoogleFonts GoogleFonts + HTML string + func (r HTMLImageRequest) MarshalJSON() ([]byte, error) + type Image struct + ID string + URL string + type ImageFormat string + const JPG + const PDF + const PNG + const WebP + type ImageOptions struct + DedupeDurationSeconds *int + Format ImageFormat + MaxRenderOnce *bool + PDFOptions *PDFOptions + Selector *string + type ImageRequest interface + type MediaType string + const Print + const Screen + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(client *http.Client) Option + type PDFLength struct + Unit PDFUnit + Value float64 + func (length PDFLength) MarshalJSON() ([]byte, error) + type PDFMargins struct + Bottom PDFLength + Left PDFLength + Right PDFLength + Top PDFLength + func (m PDFMargins) MarshalJSON() ([]byte, error) + type PDFOptions struct + Margins *PDFMargins + PageHeight *PDFLength + PageWidth *PDFLength + PrintBackground *bool + Scale *float64 + type PDFUnit string + const Centimeters + const Inches + const Millimeters + const Pixels + type RenderImageOptions struct + Crop *Crop + DPI *int + Format ImageFormat + Height *int + Width *int + type RenderOptions struct + ColorScheme *ColorScheme + DeviceScale *float64 + DisableTwemoji *bool + JumboMaxHeight *int + JumboMaxWidth *int + MSDelay *int + MaxWaitMS *int + MediaType *MediaType + ProxyID *string + RenderWhenReady *bool + StorageDestinationID *string + Timezone *string + TransparentBackground *bool + ViewportHeight *int + ViewportLandscape *bool + ViewportMobile *bool + ViewportTouch *bool + ViewportWidth *int + type ResponseError struct + Problem string + StatusCode int + func (e *ResponseError) Error() string + type Template struct + CSS string + CreatedAt time.Time + Description string + GoogleFonts GoogleFonts + HTML string + ID string + Name string + Raw json.RawMessage + RenderCount int64 + TemplateType string + UpdatedAt time.Time + Version int64 + func (t *Template) UnmarshalJSON(data []byte) error + type TemplateListOptions struct + Count int + MaxVersion *int64 + type TemplatePage struct + Data []Template + Pagination struct{ ... } + type TemplateRequest struct + CSS *string + Description string + GoogleFonts GoogleFonts + HTML string + Name string + type TemplateVersion struct + TemplateID string + TemplateVersion int64 + type TemplatedImageRequest struct + Format ImageFormat + TemplateID string + TemplateValues map[string]any + TemplateVersion *int64 + type URLImageRequest struct + AdditionalHeaderOrigins []string + BlockConsentBanners *bool + CSS *string + FullScreen *bool + Headers map[string]string + IdentifyAsHCTI *bool + IncludeHeadersOnSubrequests *bool + URL string + func (r URLImageRequest) MarshalJSON() ([]byte, error) + type ValidationError struct + Message string + Path string