Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/components/form/FileUploadField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ export function FileUploadField({
/>
</label>

{fileCount > 0 && !isImageAccept && (
<button
type="button"
onClick={() => onFileChange(name, null)}
className="flex items-center justify-center w-8 h-8 bg-[var(--surface-2)] border border-[var(--border)] rounded hover:border-red-500 hover:bg-red-500/10 transition-colors flex-shrink-0"
title="Remove file"
>
<X className="w-3.5 h-3.5 text-[var(--muted)]" />
</button>
)}

{isImageAccept && (
<button
type="button"
Expand Down
73 changes: 72 additions & 1 deletion src/lib/endpoint-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,69 @@ export const ENDPOINTS: EndpointDefinition[] = [
],
},

{
id: 'audio2video',
name: 'Audio to Video',
group: 'video-generation',
method: 'POST',
path: '/aud2video',
description: 'Generate video from audio',
contentType: 'multipart',
isAsync: true,
hasPriceCalc: true,
priceCalcPath: '/aud2video/price-calculation',
params: [
promptParam(),
negativePromptParam(),
{
name: 'audio',
label: 'Audio File',
type: 'file',
required: true,
accept: 'audio/*,.mp3,.wav,.ogg,.flac',
description: 'Audio to condition the video (mp3/wav/ogg/flac, max 20MB)',
},
{
name: 'first_frame_image',
label: 'First Frame Image',
type: 'file',
required: false,
accept: 'image/*',
description: 'Optional starting frame image',
},
{
name: 'last_frame_image',
label: 'Last Frame Image',
type: 'file',
required: false,
accept: 'image/*',
description: 'Optional ending frame image',
},
modelSelectParam(),
widthParam(),
heightParam(),
guidanceParam(),
stepsParam(),
{
name: 'frames',
label: 'Frames',
type: 'number',
required: false,
nullable: true,
description: 'Number of frames to generate',
},
{
name: 'fps',
label: 'FPS',
type: 'number',
required: false,
nullable: true,
description: 'Frames per second',
},
seedParam(),
],
},

{
id: 'txt2video',
name: 'Text to Video',
Expand Down Expand Up @@ -424,7 +487,7 @@ export const ENDPOINTS: EndpointDefinition[] = [
method: 'POST',
path: '/txt2music',
description: 'Generate music from text description',
contentType: 'json',
contentType: 'multipart',
isAsync: true,
hasPriceCalc: true,
priceCalcPath: '/txt2music/price-calculation',
Expand Down Expand Up @@ -539,6 +602,14 @@ export const ENDPOINTS: EndpointDefinition[] = [
{ value: 'flac', label: 'FLAC' },
],
},
{
name: 'reference_audio',
label: 'Reference Audio',
type: 'file',
required: false,
accept: 'audio/*,.mp3,.wav,.flac,.ogg,.m4a',
description: 'Optional reference audio for style transfer (mp3/wav/flac/ogg/m4a, max 10MB)',
},
],
},

Expand Down
Loading