View as Markdown
DreamStudio (Stable Diffusion) icon

DreamStudio (Stable Diffusion) ACTION

Generate Image

Generate a new image from a text prompt. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's DreamStudio (Stable Diffusion) account once, then configure and run Generate Image from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "dreamstudio-generate-image",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    dreamstudio: { authProvisionId: "apn_xxxxxxx" },
    organizationId: "Organization Id",
    engineId: "Engine Id",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Generate Image inputs
Property Type Description
organizationId Organization Id string
The id of the organization.
Required Dynamic
engineId Engine Id string
The id of the engine.
Required Dynamic
textPrompts Text Prompts string[]
An array of valid JSON objects to use for generation. The JSON object must have the text and the weight. e.g.{"text": "A lighthouse on a cliff", "weight": 0.5}
Required
height Height integer
Height of the image in pixels. Must be in increments of 64 and pass the following validation: For 512 engines: 262,144 ≤ height * width ≤ 1,048,576. For 768 engines: 589,824 ≤ height * width ≤ 1,048,576. For SDXL Beta: can be as low as 128 and as high as 896 as long as width is not greater than 512. If width is greater than 512 then this can be at most 512. For SDXL v0.9: valid dimensions are 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152. For SDXL v1.0: valid dimensions are the same as SDXL v0.9
Optional
width Width integer
Width of the image in pixels. Must be in increments of 64 and pass the following validation: For 512 engines: 262,144 ≤ height * width ≤ 1,048,576. For 768 engines: 589,824 ≤ height * width ≤ 1,048,576. For SDXL Beta: can be as low as 128 and as high as 896 as long as height is not greater than 512. If height is greater than 512 then this can be at most 512. For SDXL v0.9: valid dimensions are 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152. For SDXL v1.0: valid dimensions are the same as SDXL v0.9
Optional
cfgScale Cfg Scale integer
How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt).
Optional
clipGuidancePreset Clip Guidance Preset string
Clip Guidance Preset
Optional
sampler Sampler string
Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you.
Optional
samples Samples integer
Number of images to generate
Optional
seed Seed integer
Random noise seed (omit this option or use 0 for a random seed).
Optional
steps Steps integer
Number od diffusion steps to run.
Optional
stylePreset Style Preset string
Pass in a style preset to guide the image model towards a particular style.
Optional
extras Extras object
Extra parameters passed to the engine. These parameters are used for in-development or experimental features and may charge without werning, so please use with caution.
Optional
syncDir SyncDir dir
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
dreamstudio-generate-image
Version
0.0.4
App
DreamStudio (Stable Diffusion)
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes