Image-Generation
Feature: Image Generation
Section titled “Feature: Image Generation”ɳClaw supports multi-provider image generation. You can generate images from text prompts through the chat interface or the API, and browse results in the image gallery.
Route: /gallery in claw-web
API: POST /claw/image/generate
Supported Providers
Section titled “Supported Providers”| Provider | Env Var | Notes |
|---|---|---|
| DALL-E (default) | OPENAI_API_KEY | OpenAI’s image model |
| Stable Diffusion | SD_API_URL | Self-hosted or API |
| Midjourney | MJ_API_KEY | Via proxy API |
Set CLAW_IMAGE_PROVIDER in your .env to choose the default provider. Users can override per-request.
How It Works
Section titled “How It Works”- Send a prompt via chat or
POST /claw/image/generate - The request enters the job queue (
np_claw.image_jobstable) - The selected provider processes the request
- Results appear in the gallery and in the chat thread
Generate Image
Section titled “Generate Image”POST /claw/image/generateContent-Type: application/jsonAuthorization: Bearer {token}
{ "prompt": "A sunset over mountains in watercolor style", "provider": "dall-e", "size": "1024x1024"}List Jobs
Section titled “List Jobs”GET /claw/image/jobsReturns all generation jobs with status (queued, processing, complete, failed).
Get Job
Section titled “Get Job”GET /claw/image/jobs/{id}Returns job details including the generated image URL when complete.
Gallery
Section titled “Gallery”The /gallery route in claw-web shows all generated images as cards. Each card displays the prompt, provider, timestamp, and a zoomable preview.
Configuration
Section titled “Configuration”| Env Var | Default | Description |
|---|---|---|
CLAW_IMAGE_PROVIDER | dall-e | Default provider |
OPENAI_API_KEY | — | Required for DALL-E |
SD_API_URL | — | Stable Diffusion endpoint |
MJ_API_KEY | — | Midjourney proxy key |
Related
Section titled “Related”- Feature-ɳClaw — ɳClaw overview
- Feature-Agent-Dashboard — Agent metrics