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
+19 -12
View File
@@ -41,6 +41,8 @@ type AgentChatRequest struct {
EnableWebSearch bool `json:"enableWebSearch,optional"`
ImageModel string `json:"imageModel,optional"`
ImageSize string `json:"imageSize,optional"`
ImageQuality string `json:"imageQuality,optional"`
ImageCount int64 `json:"imageCount,optional"`
Mode string `json:"mode,optional"`
}
@@ -321,6 +323,8 @@ type CreateProjectRequest struct {
Prompt string `json:"prompt,optional"`
ImageModel string `json:"imageModel,optional"`
ImageSize string `json:"imageSize,optional"`
ImageQuality string `json:"imageQuality,optional"`
ImageCount int64 `json:"imageCount,optional"`
EnableWebSearch bool `json:"enableWebSearch,optional"`
AllowEmptyPrompt bool `json:"allowEmptyPrompt,optional"`
}
@@ -397,11 +401,13 @@ type GenerateMockupModelRequest struct {
}
type GenerateRequest struct {
Id string `path:"id"`
Prompt string `json:"prompt"`
Mode string `json:"mode,optional"`
ImageModel string `json:"imageModel,optional"`
ImageSize string `json:"imageSize,optional"`
Id string `path:"id"`
Prompt string `json:"prompt"`
Mode string `json:"mode,optional"`
ImageModel string `json:"imageModel,optional"`
ImageSize string `json:"imageSize,optional"`
ImageQuality string `json:"imageQuality,optional"`
ImageCount int64 `json:"imageCount,optional"`
}
type GenerateResponse struct {
@@ -446,13 +452,14 @@ type GeneratorTaskDisableUnlimitedPrice struct {
}
type GeneratorTaskInputArgs struct {
AspectRatio string `json:"aspect_ratio,optional"`
Image []string `json:"image,optional"`
ImageUrl string `json:"image_url,optional"`
Prompt string `json:"prompt,optional"`
Resolution string `json:"resolution,optional"`
SrcBox *NormalizedBox `json:"src_box,omitempty,optional"`
DstBox *NormalizedBox `json:"dst_box,omitempty,optional"`
AspectRatio string `json:"aspect_ratio,optional"`
Image []string `json:"image,optional"`
ImageUrl string `json:"image_url,optional"`
OutputFormat string `json:"output_format,optional"`
Prompt string `json:"prompt,optional"`
Resolution string `json:"resolution,optional"`
SrcBox *NormalizedBox `json:"src_box,omitempty,optional"`
DstBox *NormalizedBox `json:"dst_box,omitempty,optional"`
}
type GeneratorTaskPriceDetail struct {