Member Junction
    Preparing search index...

    OpenAI GPT-4o Image implementation of the BaseImageGenerator class. Supports gpt-image-1.5 (December 2025) for native multimodal image generation.

    This replaces the older DALL-E models with OpenAI's GPT-4o native image generation capabilities, which produce higher quality results through the ChatGPT API.

    A request's CancellationToken is handed to the SDK as its signal, so cancelling it tears the HTTP request down; the call then resolves as cancelled, never as a failure to fail over.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get apiKey(): string

      Only sub-classes can access the API key

      Returns string

    Methods

    • The result for a request its CancellationToken ended, before or during the provider call. A caller cancellation is classified Cancelled, Fatal and never failed over; an abort caused by a timeout reads as a retriable network error.

      Parameters

      • signal: AbortSignal

        The request's cancellation signal, read for why it was aborted.

      • Optionalerror: unknown

        The error the abort raised, if any.

      Returns ImageGenerationResult

    • Helper method to convert image input (Buffer, base64, or URL) to the format required by the specific provider. Subclasses can override as needed.

      Parameters

      • input: string | Buffer<ArrayBufferLike>

        Image as Buffer, base64 string, or URL

      Returns Promise<{ base64: string; buffer: Buffer }>

      Normalized image data