Runware
Generate images and run AI models with Runware's inference API.
On this page
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.
// 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);
});{
"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"
}
}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).
| Input | Type | Description |
|---|---|---|
seedImagerequired | text | A URL for the seed image to base the generation on. |
modelrequired | text | You can find model in the Model Explorer (https://my.runware.ai/models/all) tool. |
positivePromptrequired | long text | 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 t… |
heightrequired | number | Used to define the height dimension of the generated image. Certain models perform better with specific dimensions. |
widthrequired | number | Used to define the width dimension of the generated image. Certain models perform better with specific dimensions. |
negativePromptoptional | long text | A 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… |
strengthoptional | number | A 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. |
stepsoptional | number | The 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… |
CFGScaleoptional | number | Guidance 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… |
scheduleroptional | text | 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. |
generateImagesFromText
Generate Images from Text. Produce images from a text description.
| Input | Type | Description |
|---|---|---|
modelrequired | text | You can find model in the Model Explorer (https://my.runware.ai/models/all) tool. |
positivePromptrequired | long text | 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 t… |
negativePromptoptional | long text | A 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… |
heightrequired | number | Used to define the height dimension of the generated image. Certain models perform better with specific dimensions. |
widthrequired | number | Used to define the width dimension of the generated image. Certain models perform better with specific dimensions. |
stepsoptional | number | The 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… |
CFGScaleoptional | number | Guidance 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… |
scheduleroptional | text | 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. |
seedoptional | number | 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. |
vaeoptional | text | VAE (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 … |
clipSkipoptional | number | Defines 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.
| Input | Type | Description |
|---|---|---|
positivePromptrequired | long text | 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 t… |
negativePromptoptional | long text | A 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… |
modelrequired | text | You can find model in the Model Explorer (https://my.runware.ai/models/all) tool. |
durationoptional | number | The duration of the generated video in seconds. |
fpsoptional | number | Frames per second for the generated video. |
outputFormatoptional | one of "MP4" | "WEBM" | "MOV" | The format of the generated video. |
outputQualityoptional | number | Sets the compression quality of the output video. Higher values preserve more quality but increase file size, lower values reduce file size but decrease quality. |
uploadEndpointoptional | text | Specifies 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… |
numberResultsoptional | number | Specifies 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.
| Input | Type | Description |
|---|---|---|
inputImagerequired | text | A URL for the image to have its background removed. |
modelrequired | text | You can find model in the Model Explorer (https://my.runware.ai/models/all) tool. |
outputFormatoptional | one of "PNG" | "JPG" | "WEBP" | The format of the output image with the background removed. |
outputQualityoptional | number | Sets the compression quality of the output image. Higher values preserve more quality but increase file size, lower values reduce file size but decrease quality. |
uploadEndpointoptional | text | Specifies 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