> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Agent CLI

> CLI commands for image generation and analysis in PraisonAI TypeScript

The `praisonai-ts` CLI provides the `image` command for image generation and analysis.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Svc[Image Agent]

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Svc agent
    class User,CLI tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

```

## Quick Start

**1. Simple Usage**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts image generate "A sunset over mountains"
```

**2. With Configuration**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts image analyze https://example.com/image.jpg --json
```

# Image Agent CLI Commands

The `praisonai-ts` CLI provides the `image` command for image generation and analysis.

## Generate Images

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Generate an image from text
praisonai-ts image generate "A sunset over mountains"

# Generate with options
praisonai-ts image generate "A cat" --size 1024x1024 --quality hd

# Get JSON output
praisonai-ts image generate "A futuristic city" --json
```

**Example Output:**

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "success": true,
  "data": {
    "images": ["https://...generated-image-url..."],
    "prompt": "A sunset over mountains"
  }
}
```

## Analyze Images

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Analyze an image from URL
praisonai-ts image analyze https://example.com/image.jpg

# Analyze with custom prompt
praisonai-ts image analyze https://example.com/image.jpg "What objects are in this image?"

# Get JSON output
praisonai-ts image analyze https://example.com/image.jpg --json
```

## Generation Options

| Option | Description |
| - | - |
| `--size` | Image size (256x256, 512x512, 1024x1024, 1792x1024, 1024x1792) |
| `--quality` | Quality level (standard, hd) |
| `--style` | Style (vivid, natural) |

## SDK Usage

For programmatic usage:

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { ImageAgent } from 'praisonai';

const agent = new ImageAgent();

// Generate image
const images = await agent.generate({
  prompt: 'A sunset over mountains',
  size: '1024x1024',
  quality: 'hd'
});

// Analyze image
const analysis = await agent.analyze({
  imageUrl: 'https://example.com/image.jpg',
  prompt: 'Describe this image'
});
```

For more details, see the [Image Agent SDK documentation](https://praison.ai/docs/js/image-agent.md).

## Related

> [card] [Image Agent](https://praison.ai/docs/js/image-agent.md)
>
> Image Agent overview

> [card] [Multimodal Agent](https://praison.ai/docs/js/multimodal-agent.md)
>
> Multimodal Agent overview


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.