feat(server): add imageQuality/imageCount and output_format to API contract

Extend CreateProject/Generate/AgentChat request types with imageQuality
and imageCount, and add output_format to GeneratorTaskInputArgs for
layered (PSD) generation output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:42:11 +08:00
parent a1503a1687
commit db41dac5e9
3 changed files with 43 additions and 25 deletions
+5 -1
View File
@@ -167,6 +167,8 @@ Returns all project summaries, sorted by `updatedAt` descending.
"prompt": "为 still day 品牌服装独立站设计官网视觉方向",
"imageModel": "gpt-image-2",
"imageSize": "1024x1024",
"imageQuality": "auto",
"imageCount": 1,
"enableWebSearch": true
}
```
@@ -217,6 +219,8 @@ Deletes the project record. PostgreSQL cascades canvas nodes, chat messages, his
"enableWebSearch": false,
"imageModel": "gpt-image-2",
"imageSize": "1024x1024",
"imageQuality": "auto",
"imageCount": 1,
"mode": "design"
}
```
@@ -253,7 +257,7 @@ The generation path uses the configured design agent runner. The default is the
}
```
`layer-separation` returns a task id that can be polled with `GET /api/generator/tasks?task_id=<id>&project_id=<project-id>`. Completed tasks return a clean background image, foreground image artifacts with `bbox`, and a `text_render_data` artifact for editable text reconstruction.
`layer-separation` returns a task id that can be polled with `GET /api/generator/tasks?task_id=<id>&project_id=<project-id>`. When layered output is available, the service asks GPT Image 2 for a PSD, converts PSD layers into canvas image/text nodes, and falls back to the local separation path if PSD generation or decoding fails. Completed tasks return a clean background image, foreground image artifacts with `bbox`, and a `text_render_data` artifact for editable text reconstruction.
The canvas `edit-elements` node action uses the same separation path but writes the separated result beside the original image. The original image remains unchanged; the clean background is a bottom image layer, and a transparent frame above it holds the separated foreground images and editable text layers.