Skip to content

The VS Code of video editing, built for agents.

TypeScript

Update @diffusionstudio/api-contract to version 0.5.0 and enhance model configurations

konstantin-paulusdaeb15f94813
diff --git a/apps/web/package.json b/apps/web/package.json
index b0885ca9..a8012b95 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -14,7 +14,7 @@
},
"dependencies": {
"@diffusionstudio/agent-chat": "*",
- "@diffusionstudio/api-contract": "^0.4.0",
+ "@diffusionstudio/api-contract": "^0.5.0",
"@diffusionstudio/assets": "*",
"@diffusionstudio/dapi": "*",
"@diffusionstudio/encoder": "*",
diff --git a/apps/web/src/components/genai/config.ts b/apps/web/src/components/genai/config.ts
index 657ab392..e8bcb877 100644
--- a/apps/web/src/components/genai/config.ts
+++ b/apps/web/src/components/genai/config.ts
@@ -12,11 +12,13 @@ import type { ModelId, Resolution } from "@diffusionstudio/api-contract";
*/
export const MODEL_MODES: Record<ModelId, PromptMode | "TEXT"> = {
"gpt-image-2.5-sunburst": "IMAGE",
+ "nano-banana-2.1": "IMAGE",
"nano-banana-2": "IMAGE",
"nano-banana-pro": "IMAGE",
"seedream-5.0-pro": "IMAGE",
"grok-imagine-image-2.0": "IMAGE",
"krea-2-large": "IMAGE",
+ "flux-3-image": "IMAGE",
"flux-2-pro": "IMAGE",
"flux-2-klein": "IMAGE",
"bria-rmbg-2.0": "IMAGE",
@@ -25,6 +27,7 @@ export const MODEL_MODES: Record<ModelId, PromptMode | "TEXT"> = {
"kling-o3-pro": "VIDEO",
"wan-3.0": "VIDEO",
"minimax-h3": "VIDEO",
+ "minimax-h3-max": "VIDEO",
"seedance-2.5": "VIDEO",
"flux-3-video": "VIDEO",
"grok-imagine-video-1.5": "VIDEO",
@@ -34,6 +37,7 @@ export const MODEL_MODES: Record<ModelId, PromptMode | "TEXT"> = {
"elevenlabs-music": "AUDIO",
"elevenlabs-sfx": "AUDIO",
"elevenlabs-v3": "VOICE",
+ "elevenlabs-v4": "VOICE",
"gemini-3.8-flash-tts": "VOICE",
"universal-3.5-pro": "TEXT",
"qwen3.8-omni-flash": "TEXT",
@@ -336,6 +340,15 @@ const video = { mode: "VIDEO" } satisfies Partial<ModelOption>;
/** Most relevant first, per mode: the order the model menu lists them in. */
export const MODEL_OPTIONS: ModelOption[] = [
+ {
+ ...image,
+ id: "nano-banana-2.1",
+ name: "Nano Banana 2.1",
+ icon: "large-google",
+ description: "Google's newest, sharper edits at Flash cost.",
+ references: 14,
+ resolutions: ["1K", "2K", "4K"],
+ },
{
...image,
id: "nano-banana-pro",
@@ -372,6 +385,15 @@ export const MODEL_OPTIONS: ModelOption[] = [
references: 14,
resolutions: ["1K", "2K"],
},
+ {
+ ...image,
+ id: "flux-3-image",
+ name: "FLUX.3 Image",
+ icon: "large-bfl",
+ description: "BFL's flagship, sharp up to 4K.",
+ references: 10,
+ resolutions: ["1K", "2K", "4K"],
+ },
{
...image,
id: "flux-2-pro",
@@ -487,6 +509,17 @@ export const MODEL_OPTIONS: ModelOption[] = [
aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
resolutions: ["2K"],
},
+ {
+ ...video,
+ id: "minimax-h3-max",
+ name: "MiniMax H3 Max",
+ icon: "large-minimax",
+ description: "Faster, cheaper H3 with native audio.",
+ frames: ["start", "end"],
+ durations: seconds(5, 15),
+ aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
+ resolutions: ["480p", "720p"],
+ },
{
...video,
id: "kling-3-pro",
@@ -509,6 +542,14 @@ export const MODEL_OPTIONS: ModelOption[] = [
aspectRatios: ["16:9", "9:16", "1:1", "4:3", "3:4"],
resolutions: ["480p", "720p", "1080p"],
},
+ {
+ id: "elevenlabs-v4",
+ mode: "VOICE",
+ name: "ElevenLabs v4",
+ icon: "large-elevenlabs",
+ description: "Lifelike speech, up to 10,000 characters.",
+ voices: ELEVENLABS_VOICE_OPTIONS,
+ },
{
id: "elevenlabs-v3",
mode: "VOICE",
diff --git a/docs/reference/models.md b/docs/reference/models.md
index c6e1b5f3..12dcd507 100644
--- a/docs/reference/models.md
+++ b/docs/reference/models.md
@@ -4,10 +4,10 @@ Every model [`generate`](./tools/generate.md) runs, and the fields each takes. A
| Kind | Models | Makes |
| --- | --- | --- |
-| [Image](#image) | `nano-banana-pro`, `gpt-image-2.5-sunburst`, `nano-banana-2`, `seedream-5.0-pro`, `flux-2-pro`, `grok-imagine-image-2.0`, `flux-2-klein`, `krea-2-large` | images from a prompt, or edits of reference images |
-| [Video](#video) | `veo-3.1`, `veo-3.1-fast`, `kling-3-pro`, `kling-o3-pro`, `seedance-2.5`, `wan-3.0`, `minimax-h3`, `flux-3-video`, `grok-imagine-video-1.5` | a clip from a prompt, optionally from a start (and end) frame |
+| [Image](#image) | `nano-banana-2.1`, `nano-banana-pro`, `gpt-image-2.5-sunburst`, `nano-banana-2`, `seedream-5.0-pro`, `flux-3-image`, `flux-2-pro`, `grok-imagine-image-2.0`, `flux-2-klein`, `krea-2-large` | images from a prompt, or edits of reference images |
+| [Video](#video) | `veo-3.1`, `veo-3.1-fast`, `kling-3-pro`, `kling-o3-pro`, `seedance-2.5`, `wan-3.0`, `minimax-h3`, `minimax-h3-max`, `flux-3-video`, `grok-imagine-video-1.5` | a clip from a prompt, optionally from a start (and end) frame |
| [Audio](#audio) | `elevenlabs-music`, `elevenlabs-sfx` | music, sound effects |
-| [Voice](#voice) | `elevenlabs-v3`, `gemini-3.8-flash-tts` | speech |
+| [Voice](#voice) | `elevenlabs-v4`, `elevenlabs-v3`, `gemini-3.8-flash-tts` | speech |
| [Tools](#tools) | `bria-rmbg-2.0`, `seedvr-2`, `bytedance-upscaler`, `universal-3.5-pro`, `qwen3.8-omni-flash` | one file in, one file out |
| [Local](#local) | `sam-2.1` | runs on this machine, free: an object's mask, tracked through footage |
@@ -23,10 +23,12 @@ Every model [`generate`](./tools/generate.md) runs, and the fields each takes. A
| Model | | References | Aspect ratios | Resolutions |
| --- | --- | --- | --- | --- |
+| `nano-banana-2.1` | Nano Banana 2.1 — Google's newest, sharper edits at Flash cost | 14 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K, 4K |
| `nano-banana-pro` | Nano Banana Pro — pro control, readable text, ultra consistent | 14 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K, 4K |
| `gpt-image-2.5-sunburst` | GPT Image 2.5 Sunburst — precise detail, strong text, true edits | 16 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K |
| `nano-banana-2` | Nano Banana 2 — fast, high quality, flexible edits | 14 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K, 4K |
| `seedream-5.0-pro` | Seedream 5.0 Pro — lifelike scenes, precise multi-image edits | 14 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K |
+| `flux-3-image` | FLUX.3 Image — BFL's flagship, sharp up to 4K | 10 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K, 4K |
| `flux-2-pro` | FLUX.2 Pro — frontier quality, consistent references | 8 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K |
| `grok-imagine-image-2.0` | Grok Imagine 2.0 — fast, vivid, photoreal | 3 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K, 2K |
| `flux-2-klein` | FLUX.2 Klein — low budget, high quality, fast | 4 | 16:9, 9:16, 1:1, 4:3, 3:4 | 1K |
@@ -54,6 +56,7 @@ The aspect ratios listed work on every model in its row. Some models take more (
| `seedance-2.5` | Seedance 2.5 — rich motion, lip-synced audio, up to 30 s | start, end | 4–30 | 16:9, 9:16, 1:1, 4:3, 3:4 | 480p, 720p |
| `wan-3.0` | Wan 3.0 — expressive motion, clips up to 30 s | start | 2–30 | 16:9, 9:16, 1:1, 4:3, 3:4 | 480p, 720p, 1080p |
| `minimax-h3` | MiniMax H3 — native 2K with built-in audio | start, end | 5–15 | 16:9, 9:16, 1:1, 4:3, 3:4 | 2K |
+| `minimax-h3-max` | MiniMax H3 Max — faster, cheaper H3 with native audio | start, end | 5–15 | 16:9, 9:16, 1:1, 4:3, 3:4 | 480p, 720p |
| `flux-3-video` | FLUX.3 Video — sharp detail with native audio | start, end | 5–20 | 16:9, 9:16, 1:1, 4:3, 3:4 | 720p, 1080p |
| `grok-imagine-video-1.5` | Grok Imagine Video 1.5 — quick clips from text or a frame | start | 1–15 | 16:9, 9:16, 1:1, 4:3, 3:4 | 480p, 720p, 1080p |
@@ -75,11 +78,12 @@ Durations given as a range take any whole second in it.
| Field | Type | Description |
| --- | --- | --- |
-| `prompt` | `string`, required | the text to speak; up to 5,000 characters. ElevenLabs v3 takes audio tags in brackets (`[whispers]`, `[laughs]`); Gemini takes a style instruction before the text (`Say cheerfully: …`) |
+| `prompt` | `string`, required | the text to speak; up to 10,000 characters (5,000 for ElevenLabs v3). ElevenLabs v3 takes audio tags in brackets (`[whispers]`, `[laughs]`); Gemini takes a style instruction before the text (`Say cheerfully: …`) |
| `voice` | `string`, required | one of the model's voices, from its voice list (linked below) |
| Model | | Voices |
| --- | --- | --- |
+| `elevenlabs-v4` | ElevenLabs v4 — lifelike speech, up to 10,000 characters | [an ElevenLabs voice id](./voices/elevenlabs-v3.md) |
| `elevenlabs-v3` | ElevenLabs v3 — expressive speech in many voices | [an ElevenLabs voice id](./voices/elevenlabs-v3.md) |
| `gemini-3.8-flash-tts` | Gemini 3.8 Flash TTS — natural speech, styled in the prompt | [a Gemini voice name](./voices/gemini-3.8-flash-tts.md) |
diff --git a/docs/reference/voices/elevenlabs-v3.md b/docs/reference/voices/elevenlabs-v3.md
index 27dd476c..4fa9c6c0 100644
--- a/docs/reference/voices/elevenlabs-v3.md
+++ b/docs/reference/voices/elevenlabs-v3.md
@@ -1,6 +1,6 @@
-# ElevenLabs v3 voices
+# ElevenLabs voices
-The voices [`elevenlabs-v3`](../models.md#voice) speaks in: pass the id as `voice`. The prompt is the text to speak, up to 5,000 characters; audio tags in brackets steer the delivery (`[whispers]`, `[laughs]`, `[excited]`).
+The voices [`elevenlabs-v3`](../models.md#voice) and [`elevenlabs-v4`](../models.md#voice) speak in: pass the id as `voice`. The prompt is the text to speak, up to 5,000 characters for v3 and 10,000 for v4; on v3, audio tags in brackets steer the delivery (`[whispers]`, `[laughs]`, `[excited]`).
```json
{ "model": "elevenlabs-v3", "voice": "JBFqnCBsd6RMkjVDRZzb", "prompt": "[softly] Welcome back. Let's pick up where we left off." }
diff --git a/package-lock.json b/package-lock.json
index f622b4bb..3f7fe110 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -92,7 +92,7 @@
"license": "MPL-2.0",
"dependencies": {
"@diffusionstudio/agent-chat": "*",
- "@diffusionstudio/api-contract": "^0.4.0",
+ "@diffusionstudio/api-contract": "^0.5.0",
"@diffusionstudio/assets": "*",
"@diffusionstudio/dapi": "*",
"@diffusionstudio/encoder": "*",
@@ -774,9 +774,9 @@
"link": true
},
"node_modules/@diffusionstudio/api-contract": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/@diffusionstudio/api-contract/-/api-contract-0.4.0.tgz",
- "integrity": "sha512-btw8Opi862XPYNxiAzx43TGj/E6SbmLnzHyuunz3LQIoaJDGXV7b31hsXhfGjeU3gnrg7bz/IFCMUdhDY1gNkA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@diffusionstudio/api-contract/-/api-contract-0.5.0.tgz",
+ "integrity": "sha512-+AZnwfitqn4V7c6RRvmcEpk1D7qvN0E4eV/Wep8sS2v+BYb5lJ3RnLMI2QYfQnLFbDEbbuxtR7nS7C/SYcZpCg==",
"license": "MIT",
"dependencies": {
"@trpc/server": "^11.10.0",
@@ -14183,7 +14183,7 @@
"version": "0.1.0",
"license": "MPL-2.0",
"dependencies": {
- "@diffusionstudio/api-contract": "^0.4.0",
+ "@diffusionstudio/api-contract": "^0.5.0",
"@diffusionstudio/jsx": "*",
"zod": "^4.4.3"
},
diff --git a/packages/dapi/package.json b/packages/dapi/package.json
index c35bb514..3ec073f8 100644
--- a/packages/dapi/package.json
+++ b/packages/dapi/package.json
@@ -18,7 +18,7 @@
"zod"
],
"dependencies": {
- "@diffusionstudio/api-contract": "^0.4.0",
+ "@diffusionstudio/api-contract": "^0.5.0",
"@diffusionstudio/jsx": "*",
"zod": "^4.4.3"
},