Tool: generate_image

The generate_image tool creates an image from a text description (prompt) and saves it to media storage. The result can be used as an activity cover.

What it does#

  1. Accepts a text description of the desired picture
  2. Deducts 20 ⚡️ energy from the balance
  3. Sends a request to the image generation service
  4. Saves the result to media storage (category support-generated)
  5. Sends the finished image to the chat

How to call it#

Describe the image you need:

  • "Generate a picture for a giveaway"
  • "Draw an image with confetti and prizes"
  • "Create a cover for a movie-themed contest"
  • "Generate an image: tropical beach with contest banner"

It's better to phrase the prompt in English - this improves the quality of the result.

Requirements#

  • Authorization: required.
  • Energy balance: at least 20 ⚡️.
  • The generation service must be available - if not, the agent will let you know.

Cost#

Each generation costs 20 ⚡️ energy. Energy is restored daily at 00:00 UTC according to your plan.

If there isn't enough energy, the AI automatically switches to sparks (✨). If there's neither enough energy nor enough sparks, the agent will report an error.

Usage example#

Request: "Draw a cover for a contest with green test tubes and a science lab"

The agent:

  1. Translates the description into an English prompt
  2. Deducts 20 ⚡️
  3. Generates the image
  4. Sends it to the chat with an rms://... link in media storage

The resulting image can be set as the cover when creating an activity.