View as Markdown
MuAPI icon

MuAPI ACTION

Generate Image

Generate an image from a text prompt using 15+ models including Flux, Midjourney, GPT-4o, Imagen 4, and more. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's MuAPI 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: "muapi-generate-image",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    muapi: { authProvisionId: "apn_xxxxxxx" },
    model: "Model",
    prompt: "Prompt",
  },
})

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
model Model string
The image generation model to use.
Required
prompt Prompt string
Text description of the content to generate.
Required
aspectRatio Aspect Ratio string
Aspect ratio of the output (e.g. 16:9, 9:16, 1:1, 4:3, 3:4, 21:9).
Optional

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
muapi-generate-image
Version
0.0.1
App
MuAPI
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes