feat: expose image quality and pixel sizes
This commit is contained in:
@@ -42,6 +42,10 @@ export interface GeneratedImage {
|
||||
model: string
|
||||
mode: string
|
||||
url: string
|
||||
size?: string
|
||||
quality?: string
|
||||
width?: number
|
||||
height?: number
|
||||
selected: boolean
|
||||
created_at: number
|
||||
}
|
||||
@@ -269,6 +273,16 @@ export interface RuntimeModelOption {
|
||||
}
|
||||
|
||||
export interface RuntimeSizeOption {
|
||||
id: string
|
||||
label: string
|
||||
value: string
|
||||
ratio?: string
|
||||
width?: number
|
||||
height?: number
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface RuntimeQualityOption {
|
||||
id: string
|
||||
label: string
|
||||
value: string
|
||||
@@ -294,6 +308,7 @@ export interface RuntimeModels {
|
||||
image_base_url?: string
|
||||
image_options?: RuntimeModelOption[]
|
||||
image_size_options?: RuntimeSizeOption[]
|
||||
image_quality_options?: RuntimeQualityOption[]
|
||||
image_fallbacks?: string[]
|
||||
image_circuit?: {
|
||||
primary?: string
|
||||
@@ -1257,7 +1272,7 @@ export async function translateText(text: string, target: "en" | "zh" = "en"): P
|
||||
export async function generateImage(
|
||||
jobId: string,
|
||||
frameIdx: number,
|
||||
body: { prompt: string; extra_prompt?: string; negative_prompt?: string; model?: string; size?: string; mode?: "edit" | "text"; from_selected?: boolean },
|
||||
body: { prompt: string; extra_prompt?: string; negative_prompt?: string; model?: string; size?: string; quality?: string; mode?: "edit" | "text"; from_selected?: boolean },
|
||||
): Promise<Job> {
|
||||
const res = await fetch(`${API_BASE}/jobs/${jobId}/frames/${frameIdx}/generate`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user