Runware

Generate images and run AI models with Runware's inference API.

AI and MLAPI key4 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (4)
  4. generateImagesFromExistingImage
  5. generateImagesFromText
  6. generateVideoFromText
  7. imageBackgroundRemoval
  8. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("runware", action, input) resolves with the provider's answer and rejects when Runware isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "runware"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Runware when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellRunware = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Runware isn't connected.
  const output = await step.run("Runware", () =>
    step.ctx.integrations.invoke("runware", "generateImagesFromExistingImage", {
      "seedImage": "<seed image>",
      "model": "<model>",
      "positivePrompt": "<positive prompt>",
      "height": 1,
      "width": 1
    }),
  );
  step.ctx.log("Runware answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "runware",
    "piece_action": "generateImagesFromExistingImage",
    "input": {
      "seedImage": "<seed image>",
      "model": "<model>",
      "positivePrompt": "<positive prompt>",
      "height": 1,
      "width": 1
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/runware/generateImagesFromExistingImage" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"seedImage":"<seed image>","model":"<model>","positivePrompt":"<positive prompt>","height":1,"width":1}}'

Actions

generateImagesFromExistingImage

Generate Images from Existing Image. Generate new images based on a provided image (image-to-image).

InputTypeDescription
seedImagerequiredtextA URL for the seed image to base the generation on.
modelrequiredtextYou can find model in the Model Explorer (https://my.runware.ai/models/all) tool.
positivePromptrequiredlong textA 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 t…
heightrequirednumberUsed to define the height dimension of the generated image. Certain models perform better with specific dimensions.
widthrequirednumberUsed to define the width dimension of the generated image. Certain models perform better with specific dimensions.
negativePromptoptionallong textA negative prompt is a text instruction to guide the model on generating the image. It is usually a sentence or a paragraph that provides negative guidance for the task. This parameter helps to avoid…
strengthoptionalnumberA value between 0 and 1 that indicates how much to transform the seed image. A value of 0 will keep the image as is, while a value of 1 will completely transform it according to the prompt.
stepsoptionalnumberThe number of steps is the number of iterations the model will perform to generate the image. The higher the number of steps, the more detailed the image will be. However, increasing the number of st…
CFGScaleoptionalnumberGuidance scale represents how closely the images will resemble the prompt or how much freedom the AI model has. Higher values are closer to the prompt. Low values may reduce the quality of the result…
scheduleroptionaltextAn 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.

generateImagesFromText

Generate Images from Text. Produce images from a text description.

InputTypeDescription
modelrequiredtextYou can find model in the Model Explorer (https://my.runware.ai/models/all) tool.
positivePromptrequiredlong textA 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 t…
negativePromptoptionallong textA negative prompt is a text instruction to guide the model on generating the image. It is usually a sentence or a paragraph that provides negative guidance for the task. This parameter helps to avoid…
heightrequirednumberUsed to define the height dimension of the generated image. Certain models perform better with specific dimensions.
widthrequirednumberUsed to define the width dimension of the generated image. Certain models perform better with specific dimensions.
stepsoptionalnumberThe number of steps is the number of iterations the model will perform to generate the image. The higher the number of steps, the more detailed the image will be. However, increasing the number of st…
CFGScaleoptionalnumberGuidance scale represents how closely the images will resemble the prompt or how much freedom the AI model has. Higher values are closer to the prompt. Low values may reduce the quality of the result…
scheduleroptionaltextAn 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.
seedoptionalnumberA 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.
vaeoptionaltextVAE (Variational Autoencoder) is a type of neural network architecture used for generating images. Some models may require a specific VAE to work properly. If you want to use a specific VAE, you can …
clipSkipoptionalnumberDefines additional layer skips during prompt processing in the CLIP model. Some models already skip layers by default, this parameter adds extra skips on top of those. Different values affect how you…

generateVideoFromText

Generate Video from Text. Generate video from text prompt.

InputTypeDescription
positivePromptrequiredlong textA 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 t…
negativePromptoptionallong textA negative prompt is a text instruction to guide the model on generating the image. It is usually a sentence or a paragraph that provides negative guidance for the task. This parameter helps to avoid…
modelrequiredtextYou can find model in the Model Explorer (https://my.runware.ai/models/all) tool.
durationoptionalnumberThe duration of the generated video in seconds.
fpsoptionalnumberFrames per second for the generated video.
outputFormatoptionalone of "MP4" | "WEBM" | "MOV"The format of the generated video.
outputQualityoptionalnumberSets the compression quality of the output video. Higher values preserve more quality but increase file size, lower values reduce file size but decrease quality.
uploadEndpointoptionaltextSpecifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to…
numberResultsoptionalnumberSpecifies how many videos to generate for the given parameters. Each video will have the same parameters but different seeds, resulting in variations of the same concept.

imageBackgroundRemoval

Image Background Removal. Request image background removal.

InputTypeDescription
inputImagerequiredtextA URL for the image to have its background removed.
modelrequiredtextYou can find model in the Model Explorer (https://my.runware.ai/models/all) tool.
outputFormatoptionalone of "PNG" | "JPG" | "WEBP"The format of the output image with the background removed.
outputQualityoptionalnumberSets the compression quality of the output image. Higher values preserve more quality but increase file size, lower values reduce file size but decrease quality.
uploadEndpointoptionaltextSpecifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to…

Details

Id
runware
Category
AI and ML
Tags
image, generation, inference, ai
Package
@activepieces/piece-runware@0.1.3
Runs
Through the integration runner