Skip to content
Open
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
5 changes: 3 additions & 2 deletions .github/scripts/snippets/gen-code-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,12 @@ function typescriptSnippet(model: string, example: Record<string, unknown>, file
${reads ? `${reads}\n\n` : ""}// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = ${tsResultType(resultPath)};
const { data } = await comfy.models.run<Result>("${model}", {
const result = await comfy.models.run<Result>("${model}", {
${body}
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("${label}:", data${tsPath(resultPath)});`;
console.log("${label}:", result.data${tsPath(resultPath)});`;
}

function curlSnippet(model: string, example: Record<string, unknown>, files: FileInput[]): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/flux-pro-1.1-ultra", {
const result = await comfy.models.run<Result>("bfl/flux-pro-1.1-ultra", {
prompt: "a single red maple leaf on a plain white background, studio lighting",
aspect_ratio: "16:9",
raw: false,
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image:", data.result.sample);
console.log("image:", result.data.result.sample);
```

```bash cURL
Expand All @@ -75,7 +76,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 79 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L79

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -176,7 +177,7 @@
</ParamField>

<ParamField body="prompt_upsampling" type="boolean" default="false">
Whether to upsample the prompt. If active, the prompt is automatically modified for more creative generation.

Check warning on line 180 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L180

Did you really mean 'upsample'?
</ParamField>

<ParamField body="raw" type="boolean" default="false">
Expand Down Expand Up @@ -226,11 +227,11 @@
</ResponseField>

<ResponseField name="result" type="object" required>
The finished generation. Not nullable here: this component's `required` entry is a promise that a `200` carries the result, and a nullable `result` would reduce it to a key-presence check.

Check warning on line 230 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L230

Did you really mean 'nullable'?

Check warning on line 230 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L230

Did you really mean 'nullable'?
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported cost of the generation. This is BFL's number, not the Comfy charge.

Check warning on line 234 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L234

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>
Expand All @@ -248,17 +249,17 @@
</ResponseField>

<ResponseField name="result.prompt" type="string">
The prompt the generation actually ran, after any prompt upsampling.

Check warning on line 252 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L252

Did you really mean 'upsampling'?
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated asset. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted, and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own short-lived delivery URL instead - roughly two hours for video, roughly ten minutes for images. Either way the link expires, so download the asset rather than storing the URL.

Check warning on line 256 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L256

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.seed" type="integer">
The seed the generation used, whether supplied or chosen by the provider. Declared `int64` because BFL returns seeds above 2^31 (e.g. 2784347701), which an unformatted `integer` generates as a 32-bit field in many SDK generators.

Check warning on line 262 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L262

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand Down Expand Up @@ -310,10 +311,10 @@
<Tab title="Wait for the result">
<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 314 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L314

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# The SDK automatically creates an idempotency key and reuses it for automatic retries.

Check warning on line 317 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L317

Did you really mean 'idempotency'?
with Comfy() as client:
result = client.models.run(
"bfl/flux-pro-1.1",
Expand All @@ -333,13 +334,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/flux-pro-1.1", {
const result = await comfy.models.run<Result>("bfl/flux-pro-1.1", {
prompt: "a single red maple leaf on a plain white background, studio lighting",
width: 1024,
height: 768,
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image:", data.result.sample);
console.log("image:", result.data.result.sample);
```

```bash cURL
Expand All @@ -358,7 +360,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 363 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L363

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -455,7 +457,7 @@
</ParamField>

<ParamField body="prompt_upsampling" type="boolean" default="false">
Whether to upsample the prompt. If active, the prompt is automatically modified for more creative generation.

Check warning on line 460 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L460

Did you really mean 'upsample'?
</ParamField>

<ParamField body="safety_tolerance" type="integer" default="2">
Expand Down Expand Up @@ -507,11 +509,11 @@
</ResponseField>

<ResponseField name="result" type="object" required>
The finished generation. Not nullable here: this component's `required` entry is a promise that a `200` carries the result, and a nullable `result` would reduce it to a key-presence check.

Check warning on line 512 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L512

Did you really mean 'nullable'?

Check warning on line 512 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L512

Did you really mean 'nullable'?
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported cost of the generation. This is BFL's number, not the Comfy charge.

Check warning on line 516 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L516

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>
Expand All @@ -529,17 +531,17 @@
</ResponseField>

<ResponseField name="result.prompt" type="string">
The prompt the generation actually ran, after any prompt upsampling.

Check warning on line 534 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L534

Did you really mean 'upsampling'?
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated asset. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted, and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own short-lived delivery URL instead - roughly two hours for video, roughly ten minutes for images. Either way the link expires, so download the asset rather than storing the URL.

Check warning on line 538 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L538

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.seed" type="integer">
The seed the generation used, whether supplied or chosen by the provider. Declared `int64` because BFL returns seeds above 2^31 (e.g. 2784347701), which an unformatted `integer` generates as a 32-bit field in many SDK generators.

Check warning on line 544 in development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code.mdx#L544

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use FLUX.1 Kontext with Comfy Router"

Check warning on line 2 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L2

Did you really mean 'Kontext'?
description: "Python, TypeScript and cURL snippets for calling FLUX.1 Kontext Pro and Kontext Max over HTTP through Comfy Router, plus the request fields and the result shape"

Check warning on line 3 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L3

Did you really mean 'Kontext'?
sidebarTitle: "FLUX.1 Kontext"
---

Expand Down Expand Up @@ -41,7 +41,7 @@
"bfl/flux-kontext-pro",
{
"prompt": "replace the background with a sunlit beach, keep the subject unchanged",
"input_image": input_image,

Check warning on line 44 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L44

Did you really mean 'input_image'?
"aspect_ratio": "1:1",
},
)
Expand All @@ -58,13 +58,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/flux-kontext-pro", {
const result = await comfy.models.run<Result>("bfl/flux-kontext-pro", {
prompt: "replace the background with a sunlit beach, keep the subject unchanged",
input_image: inputImage,
aspect_ratio: "1:1",
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image:", data.result.sample);
console.log("image:", result.data.result.sample);
```

```bash cURL
Expand All @@ -87,9 +88,9 @@
```python Python
import base64

from comfy_sdk import Comfy

Check warning on line 91 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L91

Did you really mean 'comfy_sdk'?

with open("input.jpg", "rb") as f:

Check warning on line 93 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L93

Did you really mean 'rb'?
input_image = base64.b64encode(f.read()).decode()

# Reads COMFY_API_KEY from the environment.
Expand Down Expand Up @@ -198,11 +199,11 @@
</ParamField>

<ParamField body="prompt" type="string" required>
Text prompt describing the edit to apply to input_image, or the image to generate when no input_image is given.

Check warning on line 202 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L202

Did you really mean 'input_image'?
</ParamField>

<ParamField body="prompt_upsampling" type="boolean" default="false">
Whether to upsample the prompt. If active, the prompt is automatically modified for more creative generation.

Check warning on line 206 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L206

Did you really mean 'upsample'?
</ParamField>

<ParamField body="safety_tolerance" type="integer" default="2">
Expand Down Expand Up @@ -248,11 +249,11 @@
</ResponseField>

<ResponseField name="result" type="object" required>
The finished generation. Not nullable here: this component's `required` entry is a promise that a `200` carries the result, and a nullable `result` would reduce it to a key-presence check.

Check warning on line 252 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L252

Did you really mean 'nullable'?

Check warning on line 252 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L252

Did you really mean 'nullable'?
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported cost of the generation. This is BFL's number, not the Comfy charge.

Check warning on line 256 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L256

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>
Expand All @@ -270,17 +271,17 @@
</ResponseField>

<ResponseField name="result.prompt" type="string">
The prompt the generation actually ran, after any prompt upsampling.

Check warning on line 274 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L274

Did you really mean 'upsampling'?
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated asset. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted, and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own short-lived delivery URL instead - roughly two hours for video, roughly ten minutes for images. Either way the link expires, so download the asset rather than storing the URL.

Check warning on line 278 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L278

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.seed" type="integer">
The seed the generation used, whether supplied or chosen by the provider. Declared `int64` because BFL returns seeds above 2^31 (e.g. 2784347701), which an unformatted `integer` generates as a 32-bit field in many SDK generators.

Check warning on line 284 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L284

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand Down Expand Up @@ -334,13 +335,13 @@
```python Python
import base64

from comfy_sdk import Comfy

Check warning on line 338 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L338

Did you really mean 'comfy_sdk'?

with open("input.jpg", "rb") as f:

Check warning on line 340 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L340

Did you really mean 'rb'?
input_image = base64.b64encode(f.read()).decode()

# Reads COMFY_API_KEY from the environment.
# The SDK automatically creates an idempotency key and reuses it for automatic retries.

Check warning on line 344 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L344

Did you really mean 'idempotency'?
with Comfy() as client:
result = client.models.run(
"bfl/flux-kontext-max",
Expand All @@ -363,13 +364,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/flux-kontext-max", {
const result = await comfy.models.run<Result>("bfl/flux-kontext-max", {
prompt: "replace the background with a sunlit beach, keep the subject unchanged",
input_image: inputImage,
aspect_ratio: "1:1",
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image:", data.result.sample);
console.log("image:", result.data.result.sample);
```

```bash cURL
Expand All @@ -392,9 +394,9 @@
```python Python
import base64

from comfy_sdk import Comfy

Check warning on line 397 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L397

Did you really mean 'comfy_sdk'?

with open("input.jpg", "rb") as f:

Check warning on line 399 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L399

Did you really mean 'rb'?
input_image = base64.b64encode(f.read()).decode()

# Reads COMFY_API_KEY from the environment.
Expand Down Expand Up @@ -503,11 +505,11 @@
</ParamField>

<ParamField body="prompt" type="string" required>
Text prompt describing the edit to apply to input_image, or the image to generate when no input_image is given.

Check warning on line 508 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L508

Did you really mean 'input_image'?
</ParamField>

<ParamField body="prompt_upsampling" type="boolean" default="false">
Whether to upsample the prompt. If active, the prompt is automatically modified for more creative generation.

Check warning on line 512 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L512

Did you really mean 'upsample'?
</ParamField>

<ParamField body="safety_tolerance" type="integer" default="2">
Expand Down Expand Up @@ -553,11 +555,11 @@
</ResponseField>

<ResponseField name="result" type="object" required>
The finished generation. Not nullable here: this component's `required` entry is a promise that a `200` carries the result, and a nullable `result` would reduce it to a key-presence check.

Check warning on line 558 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L558

Did you really mean 'nullable'?

Check warning on line 558 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L558

Did you really mean 'nullable'?
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported cost of the generation. This is BFL's number, not the Comfy charge.

Check warning on line 562 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L562

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>
Expand All @@ -575,17 +577,17 @@
</ResponseField>

<ResponseField name="result.prompt" type="string">
The prompt the generation actually ran, after any prompt upsampling.

Check warning on line 580 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L580

Did you really mean 'upsampling'?
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated asset. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted, and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own short-lived delivery URL instead - roughly two hours for video, roughly ten minutes for images. Either way the link expires, so download the asset rather than storing the URL.

Check warning on line 584 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L584

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.seed" type="integer">
The seed the generation used, whether supplied or chosen by the provider. Declared `int64` because BFL returns seeds above 2^31 (e.g. 2784347701), which an unformatted `integer` generates as a 32-bit field in many SDK generators.

Check warning on line 590 in development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-1-kontext/code.mdx#L590

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/flux-3-video", {
const result = await comfy.models.run<Result>("bfl/flux-3-video", {
mode: "t2v",
prompt: "a single red maple leaf falling onto still water, slow motion",
duration: 5,
aspect_ratio: "16:9",
generate_audio: true,
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.result.sample);
console.log("video:", result.data.result.sample);
```

```bash cURL
Expand All @@ -75,7 +76,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 79 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L79

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -160,11 +161,11 @@
</ParamField>

<ParamField body="draft" type="boolean" default="false">
Draft mode: generate a fast preview whose result includes a draft_cache download URL. Send that bundle back with mode draft_enhance to render the full-quality version of the same generation.

Check warning on line 164 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L164

Did you really mean 'draft_cache'?

Check warning on line 164 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L164

Did you really mean 'draft_enhance'?
</ParamField>

<ParamField body="draft_cache" type="string">
draft_enhance only. Encrypted draft-cache bundle from a prior draft generation, as the base64-encoded downloaded bundle or its still-valid http(s) URL. The original inputs are embedded in the bundle.

Check warning on line 168 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L168

Did you really mean 'draft_enhance'?
</ParamField>

<ParamField body="duration" type="integer | string" default="&quot;auto&quot;">
Expand All @@ -182,17 +183,17 @@
</ParamField>

<ParamField body="mode" type="string" required>
Generation mode: t2v (text-to-video), i2v (image-continuation), v2v (video-continuation), or draft_enhance (full-quality render of a prior draft). Spelled-out aliases such as text-to-video are accepted.

Check warning on line 186 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L186

Did you really mean 'draft_enhance'?
</ParamField>

<ParamField body="prompt" type="string">
Free-form prompt describing the video. Required for every mode except draft_enhance.

Check warning on line 190 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L190

Did you really mean 'draft_enhance'?
</ParamField>

<ParamField body="resolution" type="string">
Video resolution class: hd, or fhd for a higher-resolution result finished by the video upsampler. Defaults to hd for t2v, i2v and v2v, and to fhd for draft_enhance. Exact dimensions vary with the aspect ratio.

Check warning on line 194 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L194

Did you really mean 'upsampler'?

Check warning on line 194 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L194

Did you really mean 'draft_enhance'?

Possible values: `hd`, `fhd`

Check warning on line 196 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L196

Did you really mean 'fhd'?
</ParamField>

<ParamField body="safety_tolerance" type="integer" default="2">
Expand All @@ -206,7 +207,7 @@
</ParamField>

<ParamField body="version" type="string" default="&quot;latest&quot;">
Endpoint version. latest serves the current release; dated pinnable release tags are added as they are published.

Check warning on line 210 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L210

Did you really mean 'pinnable'?
</ParamField>

Generated from the schema Router serves at `GET /v2/models/bfl/flux-3-video/openapi.json`, the same document it validates a call against before the request reaches the provider.
Expand Down Expand Up @@ -236,25 +237,25 @@
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported task cost. This is BFL's number, not the Comfy charge.

Check warning on line 240 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L240

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>

<ResponseField name="result.draft_cache" type="string (uri)">
Signed URL returned INSTEAD of `sample` by the `draft: true` mode, re-hosted onto Comfy storage the same way `sample` is: normally a Comfy-hosted URL valid for up to 24 hours, and BFL's own roughly two-hour delivery URL when the re-host could not be performed.

Check warning on line 246 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L246

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated MP4. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own roughly two-hour delivery URL instead. Absent in `draft: true` mode.

Check warning on line 252 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L252

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="status" type="string" required>
Task status: Pending, Reasoning, Generating, Ready, Request Moderated, Content Moderated, Error, or Task not found. Compare case-insensitively; Router forwards BFL's spelling unchanged.

Check warning on line 258 in development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-3-video/code.mdx#L258

Did you really mean 'BFL's'?
</ResponseField>

## Examples
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use FLUX Video Upscale with Comfy Router"
description: "Python, TypeScript and cURL snippets for upscaling a video with FLUX Video Upscale over HTTP through Comfy Router, plus the request fields and the result shape"

Check warning on line 3 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L3

Did you really mean 'upscaling'?
sidebarTitle: "FLUX Video Upscale"
---

Expand Down Expand Up @@ -46,13 +46,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { result: { sample: string } };
const { data } = await comfy.models.run<Result>("bfl/video-upscale-v1", {
const result = await comfy.models.run<Result>("bfl/video-upscale-v1", {
input_video: "https://your-host.example/clip.mp4",
upscale_factor: 2,
creativity: 1,
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.result.sample);
console.log("video:", result.data.result.sample);
```

```bash cURL
Expand All @@ -71,7 +72,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 75 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L75

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -208,11 +209,11 @@
</ResponseField>

<ResponseField name="result" type="object" required>
The finished generation. Not nullable here: this component's `required` entry is a promise that a `200` carries the result, and a nullable `result` would reduce it to a key-presence check.

Check warning on line 212 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L212

Did you really mean 'nullable'?

Check warning on line 212 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L212

Did you really mean 'nullable'?
</ResponseField>

<ResponseField name="result.cost" type="number">
Provider-reported cost of the generation. This is BFL's number, not the Comfy charge.

Check warning on line 216 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L216

Did you really mean 'BFL's'?

Format: `double`
</ResponseField>
Expand All @@ -230,17 +231,17 @@
</ResponseField>

<ResponseField name="result.prompt" type="string">
The prompt the generation actually ran, after any prompt upsampling.

Check warning on line 234 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L234

Did you really mean 'upsampling'?
</ResponseField>

<ResponseField name="result.sample" type="string (uri)">
Signed URL for the generated asset. Router re-hosts the asset onto Comfy storage and rewrites this field, so it is normally a Comfy-hosted URL valid for up to 24 hours - signed for 24 hours when minted, and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left; a leaf whose re-host could not be performed keeps BFL's own short-lived delivery URL instead - roughly two hours for video, roughly ten minutes for images. Either way the link expires, so download the asset rather than storing the URL.

Check warning on line 238 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L238

Did you really mean 'BFL's'?

Format: `uri`
</ResponseField>

<ResponseField name="result.seed" type="integer">
The seed the generation used, whether supplied or chosen by the provider. Declared `int64` because BFL returns seeds above 2^31 (e.g. 2784347701), which an unformatted `integer` generates as a 32-bit field in many SDK generators.

Check warning on line 244 in development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/black-forest-labs/flux-video-upscale/code.mdx#L244

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand Down
20 changes: 12 additions & 8 deletions development/comfy-router/models/google/gemini/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { text: string }[] } }[] };
const { data } = await comfy.models.run<Result>("vertexai/gemini-3.1-pro-preview", {
const result = await comfy.models.run<Result>("vertexai/gemini-3.1-pro-preview", {
contents: [
{
role: "user",
Expand All @@ -77,8 +77,9 @@
maxOutputTokens: 256,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("text:", data.candidates[0].content.parts[0].text);
console.log("text:", result.data.candidates[0].content.parts[0].text);
```

```bash cURL
Expand All @@ -97,7 +98,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 101 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L101

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -115,7 +116,7 @@
],
},
],
"generationConfig": {

Check warning on line 119 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L119

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand Down Expand Up @@ -200,10 +201,10 @@
<Tab title="Wait for the result">
<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 204 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L204

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# The SDK automatically creates an idempotency key and reuses it for automatic retries.

Check warning on line 207 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L207

Did you really mean 'idempotency'?
with Comfy() as client:
result = client.models.run(
"vertexai/gemini-3.5-flash",
Expand All @@ -218,7 +219,7 @@
],
},
],
"generationConfig": {

Check warning on line 222 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L222

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand All @@ -234,7 +235,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { text: string }[] } }[] };
const { data } = await comfy.models.run<Result>("vertexai/gemini-3.5-flash", {
const result = await comfy.models.run<Result>("vertexai/gemini-3.5-flash", {
contents: [
{
role: "user",
Expand All @@ -250,8 +251,9 @@
maxOutputTokens: 256,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("text:", data.candidates[0].content.parts[0].text);
console.log("text:", result.data.candidates[0].content.parts[0].text);
```

```bash cURL
Expand All @@ -270,7 +272,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 275 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L275

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -288,7 +290,7 @@
],
},
],
"generationConfig": {

Check warning on line 293 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L293

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand Down Expand Up @@ -373,10 +375,10 @@
<Tab title="Wait for the result">
<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 378 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L378

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# The SDK automatically creates an idempotency key and reuses it for automatic retries.

Check warning on line 381 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L381

Did you really mean 'idempotency'?
with Comfy() as client:
result = client.models.run(
"vertexai/gemini-2.5-pro",
Expand All @@ -391,7 +393,7 @@
],
},
],
"generationConfig": {

Check warning on line 396 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L396

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand All @@ -407,7 +409,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { text: string }[] } }[] };
const { data } = await comfy.models.run<Result>("vertexai/gemini-2.5-pro", {
const result = await comfy.models.run<Result>("vertexai/gemini-2.5-pro", {
contents: [
{
role: "user",
Expand All @@ -423,8 +425,9 @@
maxOutputTokens: 256,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("text:", data.candidates[0].content.parts[0].text);
console.log("text:", result.data.candidates[0].content.parts[0].text);
```

```bash cURL
Expand All @@ -443,7 +446,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 449 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L449

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -461,7 +464,7 @@
],
},
],
"generationConfig": {

Check warning on line 467 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L467

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand Down Expand Up @@ -546,10 +549,10 @@
<Tab title="Wait for the result">
<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 552 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L552

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# The SDK automatically creates an idempotency key and reuses it for automatic retries.

Check warning on line 555 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L555

Did you really mean 'idempotency'?
with Comfy() as client:
result = client.models.run(
"vertexai/gemini-2.5-flash",
Expand All @@ -564,7 +567,7 @@
],
},
],
"generationConfig": {

Check warning on line 570 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L570

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand All @@ -580,7 +583,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { text: string }[] } }[] };
const { data } = await comfy.models.run<Result>("vertexai/gemini-2.5-flash", {
const result = await comfy.models.run<Result>("vertexai/gemini-2.5-flash", {
contents: [
{
role: "user",
Expand All @@ -596,8 +599,9 @@
maxOutputTokens: 256,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("text:", data.candidates[0].content.parts[0].text);
console.log("text:", result.data.candidates[0].content.parts[0].text);
```

```bash cURL
Expand All @@ -616,7 +620,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 623 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L623

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -634,7 +638,7 @@
],
},
],
"generationConfig": {

Check warning on line 641 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L641

Did you really mean 'generationConfig'?
"temperature": 0.7,
"maxOutputTokens": 256,
},
Expand Down Expand Up @@ -724,22 +728,22 @@

</ParamField>

<ParamField body="contents[].parts[].fileData" type="object">

Check warning on line 731 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L731

Did you really mean 'fileData'?
URI based data.
</ParamField>

<ParamField body="contents[].parts[].fileData.fileUri" type="string">

Check warning on line 735 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L735

Did you really mean 'fileUri'?
URI
</ParamField>

<ParamField body="contents[].parts[].fileData.mimeType" type="string">

Check warning on line 739 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L739

Did you really mean 'mimeType'?
The media type of the file specified in the data or fileUri fields. Acceptable values include the following. For gemini-2.0-flash-lite and gemini-2.0-flash, the maximum length of an audio file is 8.4 hours and the maximum length of a video file (without audio) is one hour. For more information, see Gemini audio and video requirements. Text files must be UTF-8 encoded. The contents of the text file count toward the token limit. There is no limit on image resolution.

Possible values: `application/pdf`, `audio/mpeg`, `audio/mp3`, `audio/wav`, `image/png`, `image/jpeg`, `image/webp`, `text/plain`, `video/mov`, `video/mpeg`, `video/mp4`, `video/mpg`, `video/avi`, `video/wmv`, `video/mpegps`, `video/flv`, `image/heic`, `image/heif`, `audio/flac`, `video/webm`
</ParamField>

<ParamField body="contents[].parts[].inlineData" type="object">

Check warning on line 745 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L745

Did you really mean 'inlineData'?
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 746 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L746

Did you really mean 'inlineData'?
</ParamField>

<ParamField body="contents[].parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -871,7 +875,7 @@
</ParamField>

<ParamField body="systemInstruction" type="object">
Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Don't use technical terms in your response". The text strings count toward the token limit. The role field of systemInstruction is ignored and doesn't affect the performance of the model. Note: Only text should be used in parts and content in each part should be in a separate paragraph.

Check warning on line 878 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L878

Did you really mean 'systemInstruction'?
</ParamField>

<ParamField body="systemInstruction.parts" type="object[]" required>
Expand Down Expand Up @@ -913,14 +917,14 @@
</ParamField>

<ParamField body="videoMetadata" type="object">
For video input, the start and end offset of the video in Duration format. For example, to specify a 10 second clip starting at 1:00, set "startOffset": \{ "seconds": 60 } and "endOffset": \{ "seconds": 70 }. The metadata should only be specified while the video data is presented in inlineData or fileData.

Check warning on line 920 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L920

Did you really mean 'startOffset'?

Check warning on line 920 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L920

Did you really mean 'endOffset'?
</ParamField>

<ParamField body="videoMetadata.endOffset" type="object">
Represents a duration offset for video timeline positions.
</ParamField>

<ParamField body="videoMetadata.endOffset.nanos" type="integer">

Check warning on line 927 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L927

Did you really mean 'nanos'?
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.

Range: `0` to `999999999`
Expand Down Expand Up @@ -1015,7 +1019,7 @@
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 1022 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L1022

Did you really mean 'inlineData'?
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -1129,7 +1133,7 @@
</ResponseField>

<ResponseField name="usageMetadata.promptTokenCount" type="integer">
Number of tokens in the request. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

Check warning on line 1136 in development/comfy-router/models/google/gemini/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/gemini/code.mdx#L1136

Did you really mean 'cachedContent'?
</ResponseField>

<ResponseField name="usageMetadata.promptTokensDetails" type="object[]">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use Nano Banana 2 Lite with Comfy Router"

Check warning on line 2 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L2

Did you really mean 'Nano'?
description: "Python, TypeScript and cURL snippets for generating images with Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) over HTTP through Comfy Router, plus the request fields and the result shape"

Check warning on line 3 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L3

Did you really mean 'Nano'?
sidebarTitle: "Nano Banana 2 Lite"
---

Expand Down Expand Up @@ -58,8 +58,8 @@

// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { inlineData: { data: string } }[] } }[] };

Check warning on line 61 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L61

Did you really mean 'inlineData'?
const { data } = await comfy.models.run<Result>("vertexai/gemini-3.1-flash-lite-image", {
const result = await comfy.models.run<Result>("vertexai/gemini-3.1-flash-lite-image", {
contents: [
{
role: "user",
Expand All @@ -77,8 +77,9 @@
},
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image (base64):", data.candidates[0].content.parts[0].inlineData.data);
console.log("image (base64):", result.data.candidates[0].content.parts[0].inlineData.data);
```

```bash cURL
Expand All @@ -97,7 +98,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 101 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L101

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -115,7 +116,7 @@
],
},
],
"generationConfig": {

Check warning on line 119 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L119

Did you really mean 'generationConfig'?
"responseModalities": ["IMAGE"],
"imageConfig": {
"aspectRatio": "1:1",
Expand Down Expand Up @@ -207,22 +208,22 @@

</ParamField>

<ParamField body="contents[].parts[].fileData" type="object">

Check warning on line 211 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L211

Did you really mean 'fileData'?
URI based data.
</ParamField>

<ParamField body="contents[].parts[].fileData.fileUri" type="string">

Check warning on line 215 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L215

Did you really mean 'fileUri'?
URI
</ParamField>

<ParamField body="contents[].parts[].fileData.mimeType" type="string">

Check warning on line 219 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L219

Did you really mean 'mimeType'?
The media type of the file specified in the data or fileUri fields. Acceptable values include the following. For gemini-2.0-flash-lite and gemini-2.0-flash, the maximum length of an audio file is 8.4 hours and the maximum length of a video file (without audio) is one hour. For more information, see Gemini audio and video requirements. Text files must be UTF-8 encoded. The contents of the text file count toward the token limit. There is no limit on image resolution.

Possible values: `application/pdf`, `audio/mpeg`, `audio/mp3`, `audio/wav`, `image/png`, `image/jpeg`, `image/webp`, `text/plain`, `video/mov`, `video/mpeg`, `video/mp4`, `video/mpg`, `video/avi`, `video/wmv`, `video/mpegps`, `video/flv`, `image/heic`, `image/heif`, `audio/flac`, `video/webm`
</ParamField>

<ParamField body="contents[].parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 226 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L226

Did you really mean 'inlineData'?
</ParamField>

<ParamField body="contents[].parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -354,7 +355,7 @@
</ParamField>

<ParamField body="systemInstruction" type="object">
Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Don't use technical terms in your response". The text strings count toward the token limit. The role field of systemInstruction is ignored and doesn't affect the performance of the model. Note: Only text should be used in parts and content in each part should be in a separate paragraph.

Check warning on line 358 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L358

Did you really mean 'systemInstruction'?
</ParamField>

<ParamField body="systemInstruction.parts" type="object[]" required>
Expand Down Expand Up @@ -396,14 +397,14 @@
</ParamField>

<ParamField body="videoMetadata" type="object">
For video input, the start and end offset of the video in Duration format. For example, to specify a 10 second clip starting at 1:00, set "startOffset": \{ "seconds": 60 } and "endOffset": \{ "seconds": 70 }. The metadata should only be specified while the video data is presented in inlineData or fileData.

Check warning on line 400 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L400

Did you really mean 'startOffset'?

Check warning on line 400 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L400

Did you really mean 'endOffset'?
</ParamField>

<ParamField body="videoMetadata.endOffset" type="object">
Represents a duration offset for video timeline positions.
</ParamField>

<ParamField body="videoMetadata.endOffset.nanos" type="integer">

Check warning on line 407 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L407

Did you really mean 'nanos'?
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.

Range: `0` to `999999999`
Expand Down Expand Up @@ -498,7 +499,7 @@
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 502 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L502

Did you really mean 'inlineData'?
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -612,7 +613,7 @@
</ResponseField>

<ResponseField name="usageMetadata.promptTokenCount" type="integer">
Number of tokens in the request. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

Check warning on line 616 in development/comfy-router/models/google/nano-banana-2-lite/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2-lite/code.mdx#L616

Did you really mean 'cachedContent'?
</ResponseField>

<ResponseField name="usageMetadata.promptTokensDetails" type="object[]">
Expand Down
5 changes: 3 additions & 2 deletions development/comfy-router/models/google/nano-banana-2/code.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use Nano Banana 2 with Comfy Router"

Check warning on line 2 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L2

Did you really mean 'Nano'?
description: "Python, TypeScript and cURL snippets for generating images with Nano Banana 2 (Gemini 3.1 Flash Image) over HTTP through Comfy Router, plus the request fields and the result shape"

Check warning on line 3 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L3

Did you really mean 'Nano'?
sidebarTitle: "Nano Banana 2"
---

Expand Down Expand Up @@ -58,8 +58,8 @@

// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { inlineData: { data: string } }[] } }[] };

Check warning on line 61 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L61

Did you really mean 'inlineData'?
const { data } = await comfy.models.run<Result>("vertexai/gemini-3.1-flash-image", {
const result = await comfy.models.run<Result>("vertexai/gemini-3.1-flash-image", {
contents: [
{
role: "user",
Expand All @@ -77,8 +77,9 @@
},
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image (base64):", data.candidates[0].content.parts[0].inlineData.data);
console.log("image (base64):", result.data.candidates[0].content.parts[0].inlineData.data);
```

```bash cURL
Expand All @@ -97,7 +98,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 101 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L101

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -115,7 +116,7 @@
],
},
],
"generationConfig": {

Check warning on line 119 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L119

Did you really mean 'generationConfig'?
"responseModalities": ["IMAGE"],
"imageConfig": {
"aspectRatio": "1:1",
Expand Down Expand Up @@ -207,22 +208,22 @@

</ParamField>

<ParamField body="contents[].parts[].fileData" type="object">

Check warning on line 211 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L211

Did you really mean 'fileData'?
URI based data.
</ParamField>

<ParamField body="contents[].parts[].fileData.fileUri" type="string">

Check warning on line 215 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L215

Did you really mean 'fileUri'?
URI
</ParamField>

<ParamField body="contents[].parts[].fileData.mimeType" type="string">

Check warning on line 219 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L219

Did you really mean 'mimeType'?
The media type of the file specified in the data or fileUri fields. Acceptable values include the following. For gemini-2.0-flash-lite and gemini-2.0-flash, the maximum length of an audio file is 8.4 hours and the maximum length of a video file (without audio) is one hour. For more information, see Gemini audio and video requirements. Text files must be UTF-8 encoded. The contents of the text file count toward the token limit. There is no limit on image resolution.

Possible values: `application/pdf`, `audio/mpeg`, `audio/mp3`, `audio/wav`, `image/png`, `image/jpeg`, `image/webp`, `text/plain`, `video/mov`, `video/mpeg`, `video/mp4`, `video/mpg`, `video/avi`, `video/wmv`, `video/mpegps`, `video/flv`, `image/heic`, `image/heif`, `audio/flac`, `video/webm`
</ParamField>

<ParamField body="contents[].parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 226 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L226

Did you really mean 'inlineData'?
</ParamField>

<ParamField body="contents[].parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -354,7 +355,7 @@
</ParamField>

<ParamField body="systemInstruction" type="object">
Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Don't use technical terms in your response". The text strings count toward the token limit. The role field of systemInstruction is ignored and doesn't affect the performance of the model. Note: Only text should be used in parts and content in each part should be in a separate paragraph.

Check warning on line 358 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L358

Did you really mean 'systemInstruction'?
</ParamField>

<ParamField body="systemInstruction.parts" type="object[]" required>
Expand Down Expand Up @@ -396,14 +397,14 @@
</ParamField>

<ParamField body="videoMetadata" type="object">
For video input, the start and end offset of the video in Duration format. For example, to specify a 10 second clip starting at 1:00, set "startOffset": \{ "seconds": 60 } and "endOffset": \{ "seconds": 70 }. The metadata should only be specified while the video data is presented in inlineData or fileData.

Check warning on line 400 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L400

Did you really mean 'startOffset'?

Check warning on line 400 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L400

Did you really mean 'endOffset'?
</ParamField>

<ParamField body="videoMetadata.endOffset" type="object">
Represents a duration offset for video timeline positions.
</ParamField>

<ParamField body="videoMetadata.endOffset.nanos" type="integer">

Check warning on line 407 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L407

Did you really mean 'nanos'?
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.

Range: `0` to `999999999`
Expand Down Expand Up @@ -498,7 +499,7 @@
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 502 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L502

Did you really mean 'inlineData'?
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -612,7 +613,7 @@
</ResponseField>

<ResponseField name="usageMetadata.promptTokenCount" type="integer">
Number of tokens in the request. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

Check warning on line 616 in development/comfy-router/models/google/nano-banana-2/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-2/code.mdx#L616

Did you really mean 'cachedContent'?
</ResponseField>

<ResponseField name="usageMetadata.promptTokensDetails" type="object[]">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use Nano Banana Pro with Comfy Router"

Check warning on line 2 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L2

Did you really mean 'Nano'?
description: "Python, TypeScript and cURL snippets for generating images with Nano Banana Pro (Gemini 3 Pro Image) over HTTP through Comfy Router, plus the request fields and the result shape"

Check warning on line 3 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L3

Did you really mean 'Nano'?
sidebarTitle: "Nano Banana Pro"
---

Expand Down Expand Up @@ -58,8 +58,8 @@

// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { candidates: { content: { parts: { inlineData: { data: string } }[] } }[] };

Check warning on line 61 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L61

Did you really mean 'inlineData'?
const { data } = await comfy.models.run<Result>("vertexai/gemini-3-pro-image", {
const result = await comfy.models.run<Result>("vertexai/gemini-3-pro-image", {
contents: [
{
role: "user",
Expand All @@ -77,8 +77,9 @@
},
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image (base64):", data.candidates[0].content.parts[0].inlineData.data);
console.log("image (base64):", result.data.candidates[0].content.parts[0].inlineData.data);
```

```bash cURL
Expand All @@ -97,7 +98,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 101 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L101

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -115,7 +116,7 @@
],
},
],
"generationConfig": {

Check warning on line 119 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L119

Did you really mean 'generationConfig'?
"responseModalities": ["IMAGE"],
"imageConfig": {
"aspectRatio": "1:1",
Expand Down Expand Up @@ -207,22 +208,22 @@

</ParamField>

<ParamField body="contents[].parts[].fileData" type="object">

Check warning on line 211 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L211

Did you really mean 'fileData'?
URI based data.
</ParamField>

<ParamField body="contents[].parts[].fileData.fileUri" type="string">

Check warning on line 215 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L215

Did you really mean 'fileUri'?
URI
</ParamField>

<ParamField body="contents[].parts[].fileData.mimeType" type="string">

Check warning on line 219 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L219

Did you really mean 'mimeType'?
The media type of the file specified in the data or fileUri fields. Acceptable values include the following. For gemini-2.0-flash-lite and gemini-2.0-flash, the maximum length of an audio file is 8.4 hours and the maximum length of a video file (without audio) is one hour. For more information, see Gemini audio and video requirements. Text files must be UTF-8 encoded. The contents of the text file count toward the token limit. There is no limit on image resolution.

Possible values: `application/pdf`, `audio/mpeg`, `audio/mp3`, `audio/wav`, `image/png`, `image/jpeg`, `image/webp`, `text/plain`, `video/mov`, `video/mpeg`, `video/mp4`, `video/mpg`, `video/avi`, `video/wmv`, `video/mpegps`, `video/flv`, `image/heic`, `image/heif`, `audio/flac`, `video/webm`
</ParamField>

<ParamField body="contents[].parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 226 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L226

Did you really mean 'inlineData'?
</ParamField>

<ParamField body="contents[].parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -354,7 +355,7 @@
</ParamField>

<ParamField body="systemInstruction" type="object">
Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Don't use technical terms in your response". The text strings count toward the token limit. The role field of systemInstruction is ignored and doesn't affect the performance of the model. Note: Only text should be used in parts and content in each part should be in a separate paragraph.

Check warning on line 358 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L358

Did you really mean 'systemInstruction'?
</ParamField>

<ParamField body="systemInstruction.parts" type="object[]" required>
Expand Down Expand Up @@ -396,14 +397,14 @@
</ParamField>

<ParamField body="videoMetadata" type="object">
For video input, the start and end offset of the video in Duration format. For example, to specify a 10 second clip starting at 1:00, set "startOffset": \{ "seconds": 60 } and "endOffset": \{ "seconds": 70 }. The metadata should only be specified while the video data is presented in inlineData or fileData.

Check warning on line 400 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L400

Did you really mean 'startOffset'?

Check warning on line 400 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L400

Did you really mean 'endOffset'?
</ParamField>

<ParamField body="videoMetadata.endOffset" type="object">
Represents a duration offset for video timeline positions.
</ParamField>

<ParamField body="videoMetadata.endOffset.nanos" type="integer">

Check warning on line 407 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L407

Did you really mean 'nanos'?
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.

Range: `0` to `999999999`
Expand Down Expand Up @@ -498,7 +499,7 @@
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData" type="object">
Inline data in raw bytes. For gemini-2.0-flash-lite and gemini-2.0-flash, you can specify up to 3000 images by using inlineData.

Check warning on line 502 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L502

Did you really mean 'inlineData'?
</ResponseField>

<ResponseField name="candidates[].content.parts[].inlineData.data" type="string (byte)">
Expand Down Expand Up @@ -612,7 +613,7 @@
</ResponseField>

<ResponseField name="usageMetadata.promptTokenCount" type="integer">
Number of tokens in the request. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

Check warning on line 616 in development/comfy-router/models/google/nano-banana-pro/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/google/nano-banana-pro/code.mdx#L616

Did you really mean 'cachedContent'?
</ResponseField>

<ResponseField name="usageMetadata.promptTokensDetails" type="object[]">
Expand Down
5 changes: 3 additions & 2 deletions development/comfy-router/models/ideogram/ideogram-v4/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { data: { url: string }[] };
const { data } = await comfy.models.run<Result>("ideogram/ideogram-v4", {
const result = await comfy.models.run<Result>("ideogram/ideogram-v4", {
text_prompt: "a single red maple leaf on a plain white background, studio lighting",
resolution: "1024x1024",
rendering_speed: "DEFAULT",
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("image:", data.data[0].url);
console.log("image:", result.data.data[0].url);
```

```bash cURL
Expand All @@ -71,7 +72,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 75 in development/comfy-router/models/ideogram/ideogram-v4/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/ideogram/ideogram-v4/code.mdx#L75

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -152,7 +153,7 @@
</ParamField>

<ParamField body="json_prompt" type="object">
Structured V4 prompt. Disables Magic Prompt; consumed directly. Supply exactly one of text_prompt or json_prompt.

Check warning on line 156 in development/comfy-router/models/ideogram/ideogram-v4/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/ideogram/ideogram-v4/code.mdx#L156

Did you really mean 'text_prompt'?

Check warning on line 156 in development/comfy-router/models/ideogram/ideogram-v4/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/ideogram/ideogram-v4/code.mdx#L156

Did you really mean 'json_prompt'?
</ParamField>

<ParamField body="rendering_speed" type="string" default="&quot;DEFAULT&quot;">
Expand All @@ -166,7 +167,7 @@
</ParamField>

<ParamField body="text_prompt" type="string">
Natural-language prompt. Enables Magic Prompt automatically. Supply exactly one of text_prompt or json_prompt.

Check warning on line 170 in development/comfy-router/models/ideogram/ideogram-v4/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/ideogram/ideogram-v4/code.mdx#L170

Did you really mean 'text_prompt'?

Check warning on line 170 in development/comfy-router/models/ideogram/ideogram-v4/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/ideogram/ideogram-v4/code.mdx#L170

Did you really mean 'json_prompt'?
</ParamField>

Generated from the schema Router serves at `GET /v2/models/ideogram/ideogram-v4/openapi.json`, the same document it validates a call against before the request reaches the provider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"input": {
"prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
"img_url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",

Check warning on line 36 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L36

Did you really mean 'img_url'?
},
"parameters": {
"resolution": "720P",
Expand All @@ -51,7 +51,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.0-i2v", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.0-i2v", {
input: {
prompt: "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
img_url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
Expand All @@ -61,8 +61,9 @@
duration: 5,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -81,7 +82,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 85 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L85

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -171,8 +172,8 @@
Enter basic information, such as prompt words, etc.
</ParamField>

<ParamField body="input.audio_url" type="string">

Check warning on line 175 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L175

Did you really mean 'audio_url'?
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 176 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L176

Did you really mean 'wav'?

Check warning on line 176 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L176

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">
Expand All @@ -191,20 +192,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L195

Did you really mean 'first_frame'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L195

Did you really mean 'last_frame'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L195

Did you really mean 'driving_audio'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L195

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L196

Did you really mean 'reference_image'?
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L198

Did you really mean 'first_frame'?

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L198

Did you really mean 'last_frame'?

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L198

Did you really mean 'reference_image'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L199

Did you really mean 'reference_video'?

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L199

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 201 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L201

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least

Check warning on line 207 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L207

Did you really mean 'reference_image'?
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 208 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L208

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -244,7 +245,7 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 248 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L248

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
Expand Down Expand Up @@ -291,7 +292,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 295 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L295

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -308,7 +309,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 312 in development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-i2v/code.mdx#L312

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"prompt": "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
"media": [
{
"type": "reference_image",

Check warning on line 38 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L38

Did you really mean 'reference_image'?
"url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand All @@ -56,12 +56,12 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.0-r2v", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.0-r2v", {
input: {
prompt: "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
media: [
{
type: "reference_image",

Check warning on line 64 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L64

Did you really mean 'reference_image'?
url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand All @@ -71,8 +71,9 @@
duration: 5,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -80,7 +81,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"input\": {\"prompt\":\"character1 walks in from the left, turns to the camera and waves, plain orange backdrop\",\"media\":[{\"type\":\"reference_image\",\"url\":\"https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png\"}]}, \"parameters\": {\"resolution\":\"720P\",\"duration\":5}}"

Check warning on line 84 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L84

Did you really mean 'reference_image'?
```
</CodeGroup>
</Tab>
Expand All @@ -91,7 +92,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 95 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L95

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -103,7 +104,7 @@
"prompt": "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
"media": [
{
"type": "reference_image",

Check warning on line 107 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L107

Did you really mean 'reference_image'?
"url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand Down Expand Up @@ -191,11 +192,11 @@
Enter basic information, such as prompt words, etc.
</ParamField>

<ParamField body="input.audio_url" type="string">

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L195

Did you really mean 'audio_url'?
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L196

Did you really mean 'wav'?

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L196

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L199

Did you really mean 'img_url'?
First frame image URL or Base64 encoded data.
Required for the wan2.5-i2v-preview and wan2.6-i2v models only. The
happyhorse-1.x i2v spellings do NOT take their first frame here: they
Expand All @@ -211,20 +212,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L215

Did you really mean 'first_frame'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L215

Did you really mean 'last_frame'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L215

Did you really mean 'driving_audio'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L215

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 218 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L218

Did you really mean 'first_frame'?

Check warning on line 218 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L218

Did you really mean 'last_frame'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 219 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L219

Did you really mean 'reference_video'?

Check warning on line 219 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L219

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 221 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L221

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 228 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L228

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -264,7 +265,7 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 268 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L268

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
Expand Down Expand Up @@ -311,7 +312,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 315 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L315

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -328,7 +329,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 332 in development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-r2v/code.mdx#L332

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.0-t2v", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.0-t2v", {
input: {
prompt: "a single red maple leaf falling onto still water, slow motion, shallow depth of field",
},
Expand All @@ -59,8 +59,9 @@
duration: 5,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -79,7 +80,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 83 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L83

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -167,11 +168,11 @@
Enter basic information, such as prompt words, etc.
</ParamField>

<ParamField body="input.audio_url" type="string">

Check warning on line 171 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L171

Did you really mean 'audio_url'?
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 172 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L172

Did you really mean 'wav'?

Check warning on line 172 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L172

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">

Check warning on line 175 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L175

Did you really mean 'img_url'?
First frame image URL or Base64 encoded data.
Required for the wan2.5-i2v-preview and wan2.6-i2v models only. The
happyhorse-1.x i2v spellings do NOT take their first frame here: they
Expand All @@ -187,20 +188,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 191 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L191

Did you really mean 'first_frame'?

Check warning on line 191 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L191

Did you really mean 'last_frame'?

Check warning on line 191 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L191

Did you really mean 'driving_audio'?

Check warning on line 191 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L191

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video

Check warning on line 192 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L192

Did you really mean 'reference_image'?
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 194 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L194

Did you really mean 'first_frame'?

Check warning on line 194 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L194

Did you really mean 'last_frame'?

Check warning on line 194 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L194

Did you really mean 'reference_image'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L195

Did you really mean 'reference_video'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L195

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 197 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L197

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least

Check warning on line 203 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L203

Did you really mean 'reference_image'?
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 204 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L204

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -240,7 +241,7 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 244 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L244

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
Expand Down Expand Up @@ -287,7 +288,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 291 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L291

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -304,7 +305,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 308 in development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-t2v/code.mdx#L308

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.0-video-edit", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.0-video-edit", {
input: {
prompt: "restyle the clip as a hand-drawn ink sketch, keep the dancer's movement unchanged",
media: [
Expand All @@ -69,8 +69,9 @@
resolution: "720P",
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -89,7 +90,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 93 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L93

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -188,10 +189,10 @@
</ParamField>

<ParamField body="input.audio_url" type="string">
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 192 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L192

Did you really mean 'wav'?

Check warning on line 192 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L192

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L195

Did you really mean 'img_url'?
First frame image URL or Base64 encoded data.
Required for the wan2.5-i2v-preview and wan2.6-i2v models only. The
happyhorse-1.x i2v spellings do NOT take their first frame here: they
Expand All @@ -207,20 +208,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 211 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L211

Did you really mean 'first_frame'?

Check warning on line 211 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L211

Did you really mean 'last_frame'?

Check warning on line 211 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L211

Did you really mean 'driving_audio'?

Check warning on line 211 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L211

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video

Check warning on line 212 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L212

Did you really mean 'reference_image'?
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 214 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L214

Did you really mean 'first_frame'?

Check warning on line 214 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L214

Did you really mean 'last_frame'?

Check warning on line 214 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L214

Did you really mean 'reference_image'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L215

Did you really mean 'reference_video'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L215

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 217 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L217

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least

Check warning on line 223 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L223

Did you really mean 'reference_image'?
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 224 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L224

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -260,11 +261,11 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 264 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L264

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
- Cannot be used with audio_url

Check warning on line 268 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L268

Did you really mean 'audio_url'?
Reference duration: Single video max 5s, two videos max 2.5s each, three videos proportionally less.
Billing: Based on actual reference duration used.
</ParamField>
Expand Down Expand Up @@ -307,7 +308,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 311 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L311

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -324,7 +325,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 328 in development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-0-video-edit/code.mdx#L328

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"input": {
"prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
"img_url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",

Check warning on line 36 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L36

Did you really mean 'img_url'?
},
"parameters": {
"resolution": "720P",
Expand All @@ -51,7 +51,7 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.1-i2v", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.1-i2v", {
input: {
prompt: "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
img_url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
Expand All @@ -61,8 +61,9 @@
duration: 5,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -81,7 +82,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 85 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L85

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand Down Expand Up @@ -171,8 +172,8 @@
Enter basic information, such as prompt words, etc.
</ParamField>

<ParamField body="input.audio_url" type="string">

Check warning on line 175 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L175

Did you really mean 'audio_url'?
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 176 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L176

Did you really mean 'wav'?

Check warning on line 176 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L176

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">
Expand All @@ -191,20 +192,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L195

Did you really mean 'first_frame'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L195

Did you really mean 'last_frame'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L195

Did you really mean 'driving_audio'?

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L195

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L196

Did you really mean 'reference_image'?
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L198

Did you really mean 'first_frame'?

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L198

Did you really mean 'last_frame'?

Check warning on line 198 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L198

Did you really mean 'reference_image'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L199

Did you really mean 'reference_video'?

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L199

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 201 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L201

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least

Check warning on line 207 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L207

Did you really mean 'reference_image'?
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 208 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L208

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -244,7 +245,7 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 248 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L248

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
Expand Down Expand Up @@ -291,7 +292,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 295 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L295

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -308,7 +309,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 312 in development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-i2v/code.mdx#L312

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"prompt": "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
"media": [
{
"type": "reference_image",

Check warning on line 38 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L38

Did you really mean 'reference_image'?
"url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand All @@ -56,12 +56,12 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
type Result = { output: { video_url: string } };
const { data } = await comfy.models.run<Result>("wan/happyhorse-1.1-r2v", {
const result = await comfy.models.run<Result>("wan/happyhorse-1.1-r2v", {
input: {
prompt: "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
media: [
{
type: "reference_image",

Check warning on line 64 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L64

Did you really mean 'reference_image'?
url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand All @@ -71,8 +71,9 @@
duration: 5,
},
});
if (result.kind !== "json") throw new Error("expected a JSON result");

console.log("video:", data.output.video_url);
console.log("video:", result.data.output.video_url);
```

```bash cURL
Expand All @@ -80,7 +81,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"input\": {\"prompt\":\"character1 walks in from the left, turns to the camera and waves, plain orange backdrop\",\"media\":[{\"type\":\"reference_image\",\"url\":\"https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png\"}]}, \"parameters\": {\"resolution\":\"720P\",\"duration\":5}}"

Check warning on line 84 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L84

Did you really mean 'reference_image'?
```
</CodeGroup>
</Tab>
Expand All @@ -91,7 +92,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 95 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L95

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -103,7 +104,7 @@
"prompt": "character1 walks in from the left, turns to the camera and waves, plain orange backdrop",
"media": [
{
"type": "reference_image",

Check warning on line 107 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L107

Did you really mean 'reference_image'?
"url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
},
],
Expand Down Expand Up @@ -191,11 +192,11 @@
Enter basic information, such as prompt words, etc.
</ParamField>

<ParamField body="input.audio_url" type="string">

Check warning on line 195 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L195

Did you really mean 'audio_url'?
Audio file download URL. Supported formats: mp3 and wav. Cannot be used with reference_video_urls.

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L196

Did you really mean 'wav'?

Check warning on line 196 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L196

Did you really mean 'reference_video_urls'?
</ParamField>

<ParamField body="input.img_url" type="string">

Check warning on line 199 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L199

Did you really mean 'img_url'?
First frame image URL or Base64 encoded data.
Required for the wan2.5-i2v-preview and wan2.6-i2v models only. The
happyhorse-1.x i2v spellings do NOT take their first frame here: they
Expand All @@ -211,20 +212,20 @@
materials (image, audio, video) for video generation. Each element contains a type and
url field.
Supported type values vary by model:
- wan2.7-i2v: first_frame, last_frame, driving_audio, first_clip

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L215

Did you really mean 'first_frame'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L215

Did you really mean 'last_frame'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L215

Did you really mean 'driving_audio'?

Check warning on line 215 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L215

Did you really mean 'first_clip'?
- wan2.7-r2v: reference_image, reference_video
- wan2.7-videoedit: video, reference_image
- wan3.0-video: first_frame (max 1), last_frame (max 1), reference_image (max 10),

Check warning on line 218 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L218

Did you really mean 'first_frame'?

Check warning on line 218 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L218

Did you really mean 'last_frame'?
reference_video (max 5 clips, total duration \<= 15s), reference_audio (max 5 clips,

Check warning on line 219 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L219

Did you really mean 'reference_video'?

Check warning on line 219 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L219

Did you really mean 'reference_audio'?
total duration \<= 15s), file (max 1, cannot be used with link), link (max 1, cannot
be used with file). The reference_*/file/link types and first_frame/last_frame types

Check warning on line 221 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L221

Did you really mean 'first_frame'?
are mutually exclusive within the same request. The array order defines the reference
order of assets in the prompt (Image 1, Video 1, Audio 1, ...).
- happyhorse-1.x-i2v: first_frame only, exactly 1. At least 300x300 pixels,
JPEG/JPG/PNG/WEBP, max 20MB, a public URL or a data:\{MIME_type};base64,... URL.
These spellings take NO img_url; the first frame goes here.
- happyhorse-1.x-r2v: reference_image only, 1 to 9 of them. Shortest side at least
400 pixels, max 20MB, a public URL or a data: URL. reference_video is NOT an input

Check warning on line 228 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L228

Did you really mean 'reference_video'?
type for this operation.
- happyhorse-1.x-video-edit: video
The per-asset "max 20MB" figures above are the PARTNER's ceiling on the image it
Expand Down Expand Up @@ -264,7 +265,7 @@
<ParamField body="input.reference_video_urls" type="string[]">
Reference video URLs for wan2.6-r2v model only. Array of 1-3 video URLs.
Input restrictions:
- Format: mp4, mov

Check warning on line 268 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L268

Did you really mean 'mov'?
- Quantity: 1-3 videos
- Single video length: 2-30 seconds
- Single file size: max 30MB
Expand Down Expand Up @@ -311,7 +312,7 @@
Range: `-1` to `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">

Check warning on line 315 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L315

Did you really mean 'prompt_extend'?
Is it enabled prompt intelligent rewriting. Default is true
</ParamField>

Expand All @@ -328,7 +329,7 @@
Resolution level. Supported values vary by model:
- wan2.5-i2v-preview: 480P, 720P, 1080P
- wan2.6-i2v: 720P, 1080P only (no 480P support)
- wan2.7 models (i2v, t2v, r2v, videoedit): 720P, 1080P (default 1080P)

Check warning on line 332 in development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/wan/happyhorse-1-1-r2v/code.mdx#L332

Did you really mean 'videoedit'?
- wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (upstream default 1080P)
This proxy rejects video generation requests that provide neither resolution
nor size, because the resolution tier selects the billing rate.
Expand Down
Loading
Loading