diff --git a/frontend/src/api/edit.ts b/frontend/src/api/edit.ts new file mode 100644 index 0000000..a14525b --- /dev/null +++ b/frontend/src/api/edit.ts @@ -0,0 +1,22 @@ +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 { + return post('/api/v1/images/edit', req) +} diff --git a/frontend/src/api/health.ts b/frontend/src/api/health.ts new file mode 100644 index 0000000..79c6764 --- /dev/null +++ b/frontend/src/api/health.ts @@ -0,0 +1,9 @@ +import { get } from './client' + +export interface HealthResponse { + status: string +} + +export async function getHealth(): Promise { + return get('/api/v1/health') +}