Files
Genarrative/packages/shared/src/contracts/hyper3d.ts
T
2026-05-09 17:15:23 +08:00

76 lines
1.6 KiB
TypeScript

export type Hyper3dGenerationMode = 'text-to-model' | 'image-to-model';
export type Hyper3dTextToModelRequest = {
prompt: string;
negativePrompt?: string | null;
seed?: number | null;
geometryFileFormat?: string | null;
material?: string | null;
quality?: string | null;
meshMode?: string | null;
addons?: string[];
bboxCondition?: number[] | null;
previewRender?: boolean | null;
};
export type Hyper3dImageToModelRequest = {
imageDataUrls?: string[];
imageUrls?: string[];
prompt?: string | null;
conditionMode?: string | null;
seed?: number | null;
geometryFileFormat?: string | null;
material?: string | null;
quality?: string | null;
meshMode?: string | null;
addons?: string[];
bboxCondition?: number[] | null;
previewRender?: boolean | null;
};
export type Hyper3dTaskSubmitResponse = {
ok: boolean;
provider: string;
mode: Hyper3dGenerationMode;
taskUuid: string;
subscriptionKey: string;
jobUuids: string[];
message?: string | null;
tier: string;
};
export type Hyper3dTaskStatusRequest = {
subscriptionKey: string;
};
export type Hyper3dJobStatusPayload = {
uuid?: string | null;
status: string;
progress?: number | null;
message?: string | null;
};
export type Hyper3dTaskStatusResponse = {
ok: boolean;
provider: string;
status: string;
jobs: Hyper3dJobStatusPayload[];
raw: unknown;
};
export type Hyper3dDownloadRequest = {
taskUuid: string;
};
export type Hyper3dDownloadFilePayload = {
name: string;
url: string;
};
export type Hyper3dDownloadResponse = {
ok: boolean;
provider: string;
files: Hyper3dDownloadFilePayload[];
raw: unknown;
};