AIN. - AnythingLLM AI

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

AIN. - AnythingLLM AI

AIN.Image

Previous Top Next


MiniRobotLanguage (MRL)

 

AIN.Image
Generate or Process an Image

 

Intention

 

Image Command: Create or Analyze Images
 
The AIN.Image command enables image generation or processing using AnythingLLM’s capabilities.

It can create images from text prompts or analyze existing images, depending on the input provided.

It’s part of the AIN - AnythingLLM AI suite.

 

What is the Image Command?

 

This command interacts with AnythingLLM’s image-related API endpoint (e.g., /api/image) to generate an image from a text prompt or process an uploaded image.

The result, such as a file path or URL, is returned to a variable or the stack.

 

Why Do You Need It?

 

The Image command is valuable for:

Creativity: Generates visual content from text descriptions.

Analysis: Processes images for insights or descriptions.

Automation: Integrates image handling into workflows.

 

How to Use the Image Command?

 

Provide a text prompt or image reference as the first parameter, with optional settings and a variable to store the result.

Requires a valid API key set via AIN.SetKey.

 

Example Usage

 

AIN.SetKey|your_api_key_here

AIN.Image|A cat in a hat||$$IMG

DBP.Image saved at: $$IMG

 

Generates an image of "A cat in a hat" and stores the file path in $$IMG.

 

Illustration

 

┌──────────────────┐

│ Image Output     │

├──────────────────┤

│ Path: cat_hat.png│

└──────────────────┘

Represents the result of an image generation.

 

Syntax

 

AIN.Image|P1[|P2][|P3]

 

Parameter Explanation

 

P1 - (Required) Text prompt for image generation or path/URL to an image for processing.

P2 - (Optional) Settings (e.g., size like "512x512" or format); defaults to system settings if omitted.

P3 - (Optional) Variable to store the result (e.g., file path or URL); defaults to TOS if omitted.

 

Example

 

AIN.Image|A sunset over the ocean|512x512|$$IMG

IVV.$$IMG<>"error"

 DBP.Image created at: $$IMG

ELS.

 DBP.Failed to generate image

EIF.

ENR.

 

Remarks

 

- Requires a valid API key set via AIN.SetKey.

- The result format (e.g., file path, URL) depends on AnythingLLM’s implementation.

 

Limitations

 

- Requires network access to the AnythingLLM server.

- Image generation or processing capabilities depend on the API’s supported features.

 

See also:

 

AIN.SetKey

AIN.VerifyAuth