For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Postman
PricingEnterprise
Contact SalesSign InSign Up for Free
HomeDocs
HomeDocs
      • Overview
        • Overview
          • Blocks reference
            • AI blocks overview
            • AI Agent
            • AI Media
            • Create with AI
            • AI Request
        • Deployed flows overview
        • Connector blocks overview
Postman API Platform

Product

  • Postman Overview
  • Enterprise
  • Spec Hub
  • Flows
  • Agent Mode
  • API Catalog
  • Fern
  • Postman CLI
  • Integrations
  • Workspaces
  • Plans and pricing

API Network

  • App Security
  • Artificial Intelligence
  • Communication
  • Data Analytics
  • Database
  • Developer Productivity
  • DevOps
  • Ecommerce
  • eSignature
  • Financial Services
  • Payments
  • Travel

Resources

  • Postman Docs
  • Academy
  • Community
  • Templates
  • Intergalactic
  • Videos
  • MCP Servers

Legal and Security

  • Legal Terms Hub
  • Terms of Service
  • Postman Product Terms
  • Security
  • Website Terms of Use

Company

  • About
  • Careers and culture
  • Contact us
  • Partner program
  • Customer stories
  • Student programs
  • Press and media
Twitter iconLinkedIn iconGithub iconYouTube iconInstagram iconDiscord icon
Download Postman
Privacy Policy

© 2026 Postman, Inc.

On this page
  • Input
  • Output
  • Setup
  • Related blocks
Postman FlowsFlows referenceBlocksAI

The AI Media block

||View as Markdown|
Was this page helpful?
Previous

The AI Agent block

Next

The Create with AI block

Built with

The AI Media block uses artificial intelligence (AI) models to generate images based on your plain-language prompts. For example, you could enter a prompt like “Create a generic profile picture for a random person” or “Create a picture of an astronaut studying”.

You can assign another block’s output to the AI Media block’s built-in variable, or insert data blocks. You can then reference the variable or data block in your prompt using curly braces. To learn how, see Setup.

The number of credits a AI Media block consumes any given time that it runs depends on which model it’s using. To learn more, see How Flows consume credits.

Input

Connect another block’s output port to the AI Media block’s input port to assign incoming data to a variable. Click the variable’s name to edit it. Click Add icon Add data blocks to insert a data block into the AI Media block. You can then assign a value to the data block and reference it in your prompt with curly braces like {{this}}.

Output

The output port sends the image that the AI model creates. You can click ? next to the output port to preview the image.

Setup

Click the text box to enter a prompt in plain language. To insert a variable data block into your AI Media block, click Add icon Add data blocks. For example, you could insert a String block, name the variable animal, and reference it in a prompt like this: Create an image of this {{animal}}. The AI Media block generates an image of whatever is assigned to the variable animal. You can change an inserted block to a different data block by clicking the inserted block’s icon and choosing a block from the dropdown list.

Click Additional settings to set the image’s size and background.

  • Size - Select Auto, Square (1024x1024), Portrait (1024x1536), or Landscape (1536x1024).

  • Background - Select Opaque or Transparent. For best results when selecting Transparent, also specify a transparent background in the prompt.

Use Mustache syntax in AI prompts

The AI Media block supports Mustache syntax. You can use Mustache to dynamically format prompts, iterate over arrays, conditionally display text, and more.

If a referenced variable in your AI prompt contains an object, Mustache syntax in the AI Media block returns the full JSON representation of the object, including field names, rather than [object Object].

Change the AI model

To change the AI model, do the following:

  1. Click the AI Media block, then click the Model dropdown list.

  2. Select a model from the list.

Related blocks

You can insert a number of blocks into the AI Media block to process their data including the String, Bool, Number, Null, Select, Now, Date, Date & Time, and Get Variable blocks.