Free Intro Class
    Botspot Logo

    agenthub · image.generate

    Generate Image

    Turn a text prompt into one or more images. Wire a reference image in and the same node edits instead of inventing.

    category Imagein prompt · imageout image · images · usageexecution asyncmodel cost model tokens

    Why the node earns its place

    A provider-agnostic operation rather than a diffusion primitive: one call to the image capability, with the model dropdown filtered to models that can actually do it. You pick a provider and a model; nothing about the node changes when the provider does.

    It bills per produced image through the pricing spine, and emits its own usage event separate from token billing — so image spend is legible on its own rather than buried in an LLM line.

    How it works at run time

    1. 1
      Take the prompt from the wired port, or from a wired message object, so an LLM can write the prompt for it. No prompt is an error, not an empty image.
    2. 2
      Look for a reference image: the wired image port first, then a run-level uploaded reference. A list is passed through intact rather than collapsed — that is how multi-image compositing works, e.g. a base poster plus a logo.
    3. 3
      Call the model with the requested resolution and count.
    4. 4
      Return the first image as a data URI, the full array, and a usage descriptor — then emit an image-usage event for billing.

    What comes out

    image   the first image, as a data: URI
    images  every image produced
    usage   model, provider, image count, billing dimensions

    What you wire

    Inputs

    • prompt *
      string
    • image
      string

    Outputs

    • image
      string
    • images
      array
    • usage
      object

    Configuration

    KeyTypeDefault & optionsWhat it does
    provider *stringchoices from model-library:providersProvider of the image model (e.g. google)
    model *stringchoices from model-library:image_modelsImage-generation model
    resolutionstringdefault "1K" 1K · 2K · 4KRequested resolution tier (billing reflects the produced size)
    countnumberdefault 1Number of images to generate

    What usually goes wrong

    Watch for this

    Resolution is a request, and billing reflects what was actually produced — some models ignore the tier entirely. Raising count multiplies the cost linearly; there is no batch discount.

    Behaviour & provenance

    buildersImage workflows
    routesno
    side effectsnone — computes only
    replay safetynot applicable
    talks toa model
    holdsworkspace runtime token