> ## 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.

# Generate Image • AI Agent SDK

> generate_image: Generate an image based on the provided prompt.

# generate\_image

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ImageAgent**](../classes/ImageAgent) class in the [**image\_agent**](../modules/image_agent) module.

Generate an image based on the provided prompt.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def generate_image(prompt: str) -> Dict[str, Any]
```

## Parameters

<ParamField query="prompt" type="str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  The result of the operation.
</ResponseField>

## Uses

* `litellm.get_llm_provider`
* `logging.debug`
* `Progress`
* `SpinnerColumn`
* `TextColumn`
* `progress.add_task`
* `litellm`
* `logging.error`

## Used By

* [`ImageAgent.agenerate_image`](../functions/ImageAgent-agenerate_image)
* [`ImageAgent.generate`](../functions/ImageAgent-generate)
* [`ImageAgent.agenerate`](../functions/ImageAgent-agenerate)
* [`ImageAgent.chat`](../functions/ImageAgent-chat)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/image_agent.py#L128">
  `praisonaiagents/agent/image_agent.py` at line 128
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Image Generation" icon="image" href="/docs/features/image-generation" />

  <Card title="Multimodal" icon="photo-film" href="/docs/features/multimodal" />
</CardGroup>
