RendShot

Coze Integration — Image Generation for AI Bots

Add image generation to Coze bots using workflow HTTP nodes or custom plugins. Generate images from HTML with RendShot.

Coze is a platform for building AI bots and agents. You can integrate RendShot in two ways: via Workflow HTTP nodes (no code) or via Custom Plugins (API-based tools the bot can call).

Prerequisites

Use the HTTP Request node in a Coze Workflow to call the RendShot API.

Create a Workflow

  1. Go to your bot → WorkflowsCreate Workflow
  2. Add an HTTP Request node

Configure the HTTP Request

SettingValue
MethodPOST
URLhttps://api.rendshot.ai/v1/image
HeadersAuthorization: Bearer rs_live_YOUR_KEY
HeadersContent-Type: application/json
Body TypeJSON

Set the request body

{
  "template_id": "social-card",
  "variables": {
    "title": "{{input.title}}",
    "author": "{{input.author}}"
  },
  "width": 1080,
  "height": 1080,
  "format": "png"
}

Use Coze's variable syntax ({{input.field}} or {{node.output}}) to pass dynamic data from the user's message or upstream nodes.

Use the result

The response contains a url field with the CDN-hosted image. Pass it to:

  • A Reply node to send the image back to the user
  • Another HTTP node to post it somewhere (Slack, social media, etc.)

Option 2: Custom Plugin

Create a custom plugin so the bot can call RendShot as a tool during conversations.

Create the plugin

  1. Go to PersonalPluginsCreate Plugin
  2. Choose Create by API
  3. Add a tool:
FieldValue
Tool namegenerate_image
API URLhttps://api.rendshot.ai/v1/image
MethodPOST

Define input parameters

ParameterTypeRequiredDescription
htmlstringNoRaw HTML to render (use if no template)
template_idstringNoTemplate ID (use if templates are set up)
variablesobjectNoKey-value pairs for template variables
widthintegerYesImage width in pixels
heightintegerYesImage height in pixels
formatstringNopng, jpeg, or webp (default: png)

Configure authentication

Set the Authorization header:

  • Type: Custom Header
  • Header name: Authorization
  • Header value: Bearer rs_live_YOUR_KEY

Define output

The API returns:

{
  "url": "https://assets.rendshot.ai/img/abc123.png",
  "id": "img_abc123",
  "format": "png",
  "width": 1080,
  "height": 1080
}

Map the url field as the output so the bot can display or reference the generated image.

Example Bot Scenarios

Social card generator bot

User: "Generate a card for my post: Building APIs That Scale"

Bot calls generate_image plugin:
  template_id: "social-card"
  variables: { title: "Building APIs That Scale" }
  width: 1080, height: 1080

Bot replies: "Here's your social card: [image URL]"

Product image assistant

User: "Create a promo banner for our new headphones, price $149"

Bot calls generate_image plugin:
  template_id: "product-card"
  variables: { name: "Wireless Pro", price: "$149", badge: "NEW" }
  width: 1200, height: 630

Bot replies with the generated banner image

URL Screenshots

For capturing live webpages, create a second tool pointing to the screenshot endpoint:

FieldValue
Tool namescreenshot_url
API URLhttps://api.rendshot.ai/v1/screenshot
MethodPOST
Parametersurl (string, required), width (integer), height (integer)

Troubleshooting

IssueFix
401 UnauthorizedCheck the Authorization header — must include Bearer prefix
Plugin not called by botEnsure the plugin is enabled in your bot's tool list
Image not displaying in chatUse the url from the response in a markdown image or direct link
Variables not substitutedCheck Coze variable syntax matches your workflow/plugin configuration

Next steps

On this page