> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/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

# 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](/docs/js/image-agent).
