77ffd0e58d
- 新增 edit.ts: 图片编辑 API 客户端 - 新增 health.ts: 健康检查 API 客户端
23 lines
451 B
TypeScript
23 lines
451 B
TypeScript
import { post } from './client'
|
|
|
|
export interface EditImageRequest {
|
|
image: string // base64 编码
|
|
prompt: string
|
|
count?: number
|
|
}
|
|
|
|
export interface EditAssetResponse {
|
|
data: string // base64 编码
|
|
format: string
|
|
}
|
|
|
|
export interface EditImageResponse {
|
|
assets: EditAssetResponse[]
|
|
}
|
|
|
|
export async function editImage(
|
|
req: EditImageRequest,
|
|
): Promise<EditImageResponse> {
|
|
return post<EditImageResponse>('/api/v1/images/edit', req)
|
|
}
|