Skip to main content

Image

Learn How to Generate Images with Digisquares AI

You can use the Digisquares AI resource to write queries that leverage AI models to generate images. The AI model returns a base64-encoded string of the image.

As with all queries, the response is available at {{ query.data }}. You can display base64-encoded images in any Digisquares component that supports images, such as the Image or Avatar components.

Get Started

To get started with Image actions for apps, add a new AI Action query. For workflows, add a new AI Action block.

Web and Mobile Apps

Workflows

Generate an Image

Use the Generate image action to generate an image based on the instructions you provide.

Steps to Generate an Image

  1. Select the Generate image action.
  2. Enter instructions in the Input field.
  3. Select the AI model to use (e.g., dall-e-2).
  4. Click Save and then Run to perform the action.

The query output then displays a preview of the base64-encoded image that the AI model returns.

Image Constraints

AI models typically generate image/png images with a maximum resolution (e.g., 1024x1024px for dall-e-2). You can specify custom dimensions but they cannot exceed the maximum limit.