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

# Image generation

## Overview

Tool identifier `image_generate`.

`image_generate` generates images from text. For image-to-image editing, see `image_edit`.

Import path: `from veadk.tools.builtin_tools.image_generate import image_generate`

## Environment & prerequisites

<Warning>
  Requirements:

  1. Configure the API key for the agent's reasoning model.
  2. Configure the image-generation model name (`MODEL_IMAGE_NAME`).
</Warning>

Environment variables:

* `MODEL_AGENT_API_KEY`: API key for the agent's reasoning model
* `MODEL_IMAGE_NAME`: image-generation model name

`config.yaml` keys:

```yaml title="config.yaml" lines theme={null}
model:
  image:
    name: doubao-seedream-5-0-260128
    api_base: https://ark.cn-beijing.volces.com/api/v3/
    api_key: your-api-key-here
```

## Usage

```python title="examples/tools/image_generate/agent.py" lines theme={null}
import asyncio

from veadk import Agent, Runner
from veadk.memory.short_term_memory import ShortTermMemory
from veadk.tools.builtin_tools.image_generate import image_generate

agent = Agent(
    name="image_generate_agent",
    model_name="doubao-seed-2-1-pro-260628",
    description="Generate images on demand.",
    instruction="You are an image-generation expert. Call image_generate to create images for the user.",
    tools=[image_generate],
)

runner = Runner(agent=agent, short_term_memory=ShortTermMemory())


async def main():
    response = await runner.run("Generate a cute kitten")
    print(response)


if __name__ == "__main__":
    asyncio.run(main())
```

## Notes

<Note>
  `image_generate` is the canonical import name. `from veadk.tools.builtin_tools.generate_image import image_generate` still works, but the `generate_image` module is deprecated — use `image_generate` instead.
</Note>
