34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
package dto
|
|
|
|
// ImageGenerationRequest MiniMax 图生图请求
|
|
type ImageGenerationRequest struct {
|
|
Model string `json:"model" binding:"required"`
|
|
Prompt string `json:"prompt" binding:"required"`
|
|
AspectRatio string `json:"aspect_ratio"`
|
|
SubjectReference []SubjectReference `json:"subject_reference"`
|
|
N int `json:"n"` // 1-4
|
|
}
|
|
|
|
type SubjectReference struct {
|
|
Type string `json:"type"`
|
|
ImageFile string `json:"image_file"`
|
|
}
|
|
|
|
// ImageJobResponse 图生图任务响应
|
|
type ImageJobResponse struct {
|
|
JobID string `json:"job_id"`
|
|
Status string `json:"status"`
|
|
Progress int `json:"progress"`
|
|
Images []string `json:"images,omitempty"`
|
|
ErrorMsg string `json:"error_msg,omitempty"`
|
|
CreatedAt int64 `json:"created_at"`
|
|
UpdatedAt int64 `json:"updated_at"`
|
|
CompletedAt int64 `json:"completed_at,omitempty"`
|
|
}
|
|
|
|
// ImageJobCreateResponse 创建任务响应
|
|
type ImageJobCreateResponse struct {
|
|
JobID string `json:"job_id"`
|
|
Status string `json:"status"`
|
|
CreatedAt int64 `json:"created_at"`
|
|
} |