View as Markdown
Runware icon

Runware ACTION

Image Inference

Request an image inference task to be processed by the Runware API. See the documentation.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Runware account once, then configure and run Image Inference 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: "runware-image-inference",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    runware: { authProvisionId: "apn_xxxxxxx" },
    structure: "Structure",
    model: "Model",
  },
})

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.

Image Inference inputs
Property Type Description
structure Structure string
The structure of the task to be processed.
Required
model Model string
This identifier is a unique string that represents a specific model. You can find the AIR identifier of the model you want to use in our Model Explorer, which is a tool that allows you to search for models based on their characteristics. More information about the AIR system can be found in the Models page. Eg. civitai:78605@83390.
Required
positivePrompt Positive Prompt string
A positive prompt is a text instruction to guide the model on generating the image. It is usually a sentence or a paragraph that provides positive guidance for the task. This parameter is essential to shape the desired results. For example, if the positive prompt is dragon drinking coffee, the model will generate an image of a dragon drinking coffee. The more detailed the prompt, the more accurate the results. The length of the prompt must be between 4 and 2000 characters.
Required
height Height integer
Used to define the height dimension of the generated image. Certain models perform better with specific dimensions. The value must be divisible by 64, eg: 512, 576, 640 ... 2048.
Required
width Width integer
Used to define the width dimension of the generated image. Certain models perform better with specific dimensions. The value must be divisible by 64, eg: 512, 576, 640 ... 2048.
Required
uploadEndpoint Upload Endpoint string
This parameter allows you to specify a URL to which the generated image will be uploaded as binary image data using the HTTP PUT method. For example, an S3 bucket URL can be used as the upload endpoint. When the image is ready, it will be uploaded to the specified URL.
Optional
checkNSFW Check NSFW boolean
This parameter is used to enable or disable the NSFW check. When enabled, the API will check if the image contains NSFW (not safe for work) content. This check is done using a pre-trained model that detects adult content in images. When the check is enabled, the API will return NSFWContent: true in the response object if the image is flagged as potentially sensitive content. If the image is not flagged, the API will return NSFWContent: false. If this parameter is not used, the parameter NSFWContent will not be included in the response object. Adds 0.1 seconds to image inference time and incurs additional costs. The NSFW filter occasionally returns false positives and very rarely false negatives.
Optional
includeCost Include Cost boolean
If set to true, the cost to perform the task will be included in the response object. Defaults to false.
Optional
scheduler Scheduler string
An scheduler is a component that manages the inference process. Different schedulers can be used to achieve different results like more detailed images, faster inference, or more accurate results. The default scheduler is the one that the model was trained with, but you can choose a different one to get different results. Schedulers are explained in more detail in the Schedulers page.
Optional
seed Seed string
A seed is a value used to randomize the image generation. If you want to make images reproducible (generate the same image multiple times), you can use the same seed value. When requesting multiple images with the same seed, the seed will be incremented by 1 (+1) for each image generated. Min: 0 Max: 9223372036854776000. Defaults to Random.
Optional
numberResults Number Of Results integer
The number of images to generate from the specified prompt. If Seed is set, it will be incremented by 1 (+1) for each image generated.
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
runware-image-inference
Version
0.0.2
App
Runware
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes