mirror of
https://github.com/hanzoai/iro.git
synced 2026-11-10 05:01:30 +00:00
2.5 KiB
2.5 KiB
Iro — agent notes
Iro (iro, iro-1) is Hanzo's image generation and editing SKU. This repo is its model card, API contract, and deployment spec; inference serving runs in hanzo-inc/zen. Read this before changing anything that serves iro.
Where Iro lives across the stack
| Layer | Repo / file | What it owns |
|---|---|---|
| The SKU, its price, its rungs | hanzo/universe → charts/app/files/zen/catalog.yaml |
the iro entry (mode: image, zen-image: *iro, zen3-image: *iro, alias iro-1: iro) |
| The serving plane | hanzo-inc/zen → media.go |
mediaProxy (gate, meter, relay), nativeImage (request shape), fitImage/imageSize (size fitting), openAIImage (answer shape) |
| Cloud gateway & Studio | hanzo-inc/cloud → apps/ai/media_rpc.go, apps/studio/exec.go |
/v1/images/generations and /v1/images/edits at api.hanzo.ai; Studio step defaults image.generate and image.edit to iro |
| Studio UI & wire client | hanzo-inc/studio → src/kinds/image.tsx, src/wire.ts |
iro is the default top image model; decodes data[0].b64_json into canvas asset |
| 1-click K8s Stack | hanzo-inc/platform → src/lib/deploy/stacks.ts |
iro stack template (ghcr.io/hanzoai/iro:latest) |
| Product page | hanzo-inc/app → lib/creative-models.ts |
/iro (iro-1, open foundation zen3-image / zenlm/zen-artist) |
The translations zen performs for iro
- Request (
nativeImage): When a rung carriespath:(e.g./v1/genai/black-forest-labs/flux.2-klein-4b),model,n,response_format, andcfg_scaleare stripped from the JSON body andsize(WxH) is fitted to awidth/heightpair on the 16-pixel grid[512, 1568]within1,062,400total pixels (fitImage). - Answer (
openAIImage): Upstream{"artifacts":[{"base64":"..."}]}is translated into OpenAI-compatible{"data":[{"b64_json":"..."}]}.
Verifying a deploy
# 1. Verify iro is in the live model catalog
curl -s https://api.hanzo.ai/v1/models | jq '.data[] | select(.id=="iro")'
# 2. Generate an image with iro
curl -s https://api.hanzo.ai/v1/images/generations \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"iro","prompt":"a red cube on a white table","size":"1792x1024"}' \
| jq -r '.data[0].b64_json' | base64 -d > /tmp/iro.jpg
file /tmp/iro.jpg # JPEG image data