Skip to content

Client

func NewClient(opts ...option.RequestOption) *Client

Client is the Poli Page SDK entry point. Construct one via NewClient and reuse it for the lifetime of the process.

NewClient accepts a variadic list of option.RequestOption values. The only required option is option.WithAPIKey; everything else has a sensible default. See Types for the full option surface.

The client exposes two namespaces:

  • Render — render PDFs (in-memory bytes, streaming, or stored documents).
  • Documents — fetch, preview, thumbnail, or delete stored documents.

The top-level helper RenderToFile is a thin convenience over Render.PDFStream that writes directly to disk.