Ai imaging
AI Imaging — Image Generation Foundation
- *rea:*Intelligence
- *ath:*
services/ai/imaging - *ind:*Image generation foundation (txt2img + img2img + inpainting + upscale + composition)
- *tatus:*v0.1.0 — foundation landed 2026
0524. HTTP daemonkoder-imaging+ CLIkimaging+ 5 routes (generateeditupscalecomposemodels) with the deterministic colourblock *tub*provider + the inprocess *gpackage composer*(unblocks `specs/landingpagespackages.kmd` OGimage requirement). SDXL adapter is the typed stub awaiting *maging#004* Auth + perrequest sizen caps live; daily per-tenant cap + safety filter viaservices/ai/classifytrack in *maging#019*
Role in the stack
imaging consolidates serverside image generation. Before this sector, every consumer that needed an image (kode, agents, marketing landings, dynamic OG images) called a provider directly — no shared cache, no consolidated billing, no fallback, no path to selfhost. The bug from 20260429 where Hub package pages rendered a generic OG image traced back to the absence of a composition foundation.
It is the Koder analog of OpenAI DALLE, Google Imagen, Midjourney and Replicate — selfhosted where viable (SDXL on GPU runtime) and a thin proxy front for frontier models routed via services/ai/gateway.
Boundary vs neighbors
services/ai/visionis the input half (image in);imagingis the output half (image out).services/ai/videohandles temporal generation (SoraVeoRunway proxy).services/ai/scene3dhandles 3D mesh generation; imageto3D is a future pipeline candidate spanning the two.
Features (v1 target)
- txt2img: SDXL self
hosted on GPU; DALLEImagenMidjourney via gateway proxy - img2img + inpainting: SDXL pipeline with mask support
- Upscaling: 2x/4x super-resolution
- Composition: templated PNG output for OG images, banners, social cards
- Cross-provider knob normalization (sampler, scheduler, CFG, seed)
- Per-tenant quotas, safety filter (configurable strictmoderateoff)
Primary couplings
| Consumer | Relationship |
|---|---|
services/ai/kode |
In-chat image generation tool calls |
services/ai/agents |
Image-gen tool exposed to agent loops |
| `meta/sites |