kioai / lib /api-client-react /src /generated /api.schemas.ts
kinaiok
Initial deployment setup for Hugging Face Spaces
5ef6e9d
/**
* Generated by orval v8.5.3 🍺
* Do not edit manually.
* Api
* API specification
* OpenAPI spec version: 0.1.0
*/
export interface TokenStatusResponse {
configured: boolean;
token?: string | null;
}
export interface SetTokenBody {
token: string;
}
export interface HealthStatus {
status: string;
}
/**
* Style of image to generate
*/
export type GenerateImageBodyStyle =
(typeof GenerateImageBodyStyle)[keyof typeof GenerateImageBodyStyle];
export const GenerateImageBodyStyle = {
none: "none",
realistic: "realistic",
anime: "anime",
artistic: "artistic",
cartoon: "cartoon",
sketch: "sketch",
oil_painting: "oil_painting",
watercolor: "watercolor",
digital_art: "digital_art",
} as const;
/**
* Aspect ratio for the image
*/
export type GenerateImageBodyAspectRatio =
(typeof GenerateImageBodyAspectRatio)[keyof typeof GenerateImageBodyAspectRatio];
export const GenerateImageBodyAspectRatio = {
"1:1": "1:1",
"16:9": "16:9",
"9:16": "9:16",
"4:3": "4:3",
"3:4": "3:4",
"2:3": "2:3",
"3:2": "3:2",
} as const;
/**
* AI model to use
*/
export type GenerateImageBodyModel =
(typeof GenerateImageBodyModel)[keyof typeof GenerateImageBodyModel];
export const GenerateImageBodyModel = {
grok: "grok",
meta: "meta",
"imagen-pro": "imagen-pro",
"imagen-4": "imagen-4",
"imagen-flash": "imagen-flash",
"nano-banana-pro": "nano-banana-pro",
"nano-banana-2": "nano-banana-2",
} as const;
/**
* Output resolution for supported models (Nano Banana Pro / Nano Banana 2)
*/
export type GenerateImageBodyResolution =
(typeof GenerateImageBodyResolution)[keyof typeof GenerateImageBodyResolution];
export const GenerateImageBodyResolution = {
"1K": "1K",
"2K": "2K",
"4K": "4K",
} as const;
export interface GenerateImageBody {
/** Text description for image generation */
prompt: string;
/** Style of image to generate */
style?: GenerateImageBodyStyle;
/** Aspect ratio for the image */
aspectRatio?: GenerateImageBodyAspectRatio;
/** AI model to use */
model?: GenerateImageBodyModel;
/** Output resolution for supported models (Nano Banana Pro / Nano Banana 2) */
resolution?: GenerateImageBodyResolution;
/** Base64-encoded reference image for image-to-image generation (optional) */
referenceImageBase64?: string;
/** MIME type of the reference image (e.g. image/jpeg) */
referenceImageMime?: string;
/** Whether this image should be private (only visible to the creator) */
isPrivate?: boolean;
}
export type ApiDebugInfoRequestHeaders = { [key: string]: string };
export type ApiDebugInfoRequestBody = { [key: string]: unknown };
export type ApiDebugInfoResponseBody = { [key: string]: unknown };
export interface ApiDebugInfo {
requestUrl: string;
requestMethod: string;
requestHeaders: ApiDebugInfoRequestHeaders;
requestBody: ApiDebugInfoRequestBody;
responseStatus: number;
responseBody: ApiDebugInfoResponseBody;
durationMs: number;
usedFallback: boolean;
fallbackReason?: string;
}
export interface GenerateImageResponse {
id: number;
imageUrl: string;
prompt: string;
style: string;
aspectRatio: string;
model: string;
createdAt: string;
apiDebug: ApiDebugInfo;
}
export interface ImageRecord {
id: number;
imageUrl: string;
prompt: string;
style: string;
aspectRatio: string;
model: string;
isPrivate: boolean;
userId?: number | null;
createdAt: string;
}
export interface ImageHistoryResponse {
images: ImageRecord[];
total: number;
}
export interface SuccessResponse {
success: boolean;
message?: string;
}
export interface ErrorResponse {
error: string;
message: string;
}
export type GetImageHistoryParams = {
limit?: number;
offset?: number;
};