Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape
API Reference for Google Gemini. Google Gemini is Google’s family of multimodal text models, covering fast drafting through deep reasoning across the Flash and Pro tiers.
Quick start
Create a key in your Comfy workspace and export it as COMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk and npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.Pick the model you want to call. Everything below, from the snippets to the schema and examples, follows your choice.
Gemini 3.1 Pro
Gemini 3.5 Flash
Gemini 2.5 Pro
Gemini 2.5 Flash
Model ID:vertexai/gemini-3.1-pro-previewEndpoint:POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview
Wait for the result
Queue and collect later
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# The SDK automatically creates an idempotency key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-3.1-pro-preview", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// 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 result = await comfy.models.run<Result>("vertexai/gemini-3.1-pro-preview", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
The same body, sent to POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-3.1-pro-preview", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # with the model ID, all another process needs # Poll until the request completes, waiting the Retry-After the server names. async for update in handle.iter_events(): print(update.status, update.queue_position) # The provider's own payload, the same value models.run() returns. # A request that failed or was cancelled raises the typed Router error here. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Reads COMFY_API_KEY from the environment.// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-3.1-pro-preview", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // with the model ID, all another process needs// Poll until the request completes, waiting the Retry-After the server names.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// The same result models.run() returns. A request that failed or was cancelled rejects here.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Schema
Input
object[]
required
The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.
object[]
required
object
URI based data.
string
URI
string
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
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.
string (byte)
The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MBFormat: byte
string
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
string
How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.
string
A text prompt or code snippet.
boolean
Indicates this part is a thinking/reasoning step from the model.
string
Possible values: user, model
object
Sampling, length and output settings for the generation. Every field is optional: the fields below that declare a default apply it when omitted, and the rest fall back to the model’s own behaviour.
object
Configuration for image generation
string
Aspect ratio for generated images
object
Optional. The image output format for generated images.
integer
Optional. The compression quality of the output image.
string
Optional. The image format that the output should be saved as, on the Vertex AI paths: requests served by Comfy’s own credentials, and BYOK requests authenticated with a GCP service account. Accepted values there are image/png and image/jpeg, matched case-insensitively and normalised to lower case before the request is forwarded; any other value is rejected with a 400 naming this field. Defaults to image/png when omitted. A BYOK request authenticated with a Google AI Studio API key is the exception: that upstream has no such property and rejects the whole call if it is present, so the field is dropped from the request rather than honoured or rejected, and the output format is whatever AI Studio chooses. On every path, read the media type back from the response part you are given (inlineData.mimeType, or fileData.mimeType when uploadImagesToStorage is set) rather than assuming the value you sent.
string
Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.
integer
Maximum number of tokens that can be generated in the response. A token is approximately 4 characters. 100 tokens correspond to roughly 60-80 words.Range: 16 to 65536
`TEXT`, `IMAGE`[]
integer
When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn’t guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used. Available for the following models:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001
string[]
number
default:"1"
The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible. If the model returns a response that’s too generic, too short, or the model gives a fallback response, try increasing the temperatureRange: 0 to 2Format: float
object
Optional. Configuration for thinking features. Thinking is a process where the model breaks down a complex task into smaller steps to generate a higher-quality response.
boolean
Optional. If true, the model will include its thoughts in the response.
integer
Optional. The token budget for the model’s thinking process. The model will make a best effort to stay within this budget.
string
Optional. The thinking level for the model.Possible values: THINKING_LEVEL_UNSPECIFIED, LOW, MEDIUM, HIGH, MINIMAL, XHIGH
integer
default:"40"
Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model’s vocabulary. A top-K of 3 means that the next token is selected from among the 3 most probable tokens by using temperature.Range: 1 to …
number
default:"0.95"
If specified, nucleus sampling is used.
Top-P changes how the model selects tokens for output. Tokens are selected from the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.
Specify a lower value for less random responses and a higher value for more random responses.Range: 0 to 1Format: float
object[]
Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
string
required
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
required
Possible values: OFF, BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH
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.
object[]
required
A list of ordered parts that make up a single message. Different parts may have different IANA MIME types. For limits on the inputs, such as the maximum number of tokens or the number of images, see the model specifications on the Google models page.
string
A text prompt or code snippet.
string
The identity of the entity that creates the message. The following values are supported: user: This indicates that the message is sent by a real person, typically a user-generated message. model: This indicates that the message is generated by the model. The model value is used to insert messages from the model into the conversation during multi-turn conversations. For non-multi-turn conversations, this field can be left blank or unset.Possible values: user, model
object[]
A piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. See Function calling.
object[]
string
string
required
object
JSON schema for the function parameters
boolean
If true, generated images will be uploaded to cloud storage and returned as signed URLs instead of inline base64 data. The URLs expire after 24 hours.
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.
object
Represents a duration offset for video timeline positions.
integer
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.Range: 0 to 999999999
integer
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.Range: -315576000000 to 315576000000
object
Represents a duration offset for video timeline positions.
integer
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.Range: 0 to 999999999
integer
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.Range: -315576000000 to 315576000000
Generated from the schema Router serves at GET /v2/models/vertexai/gemini-3.1-pro-preview/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
object[]
object
object[]
string[]
integer
string
string (date)
Format: date
integer
string
string
object
The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.
object[]
required
object
URI based data.
string
URI
string
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
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.
string (byte)
The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MBFormat: byte
string
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
string
How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.
string
A text prompt or code snippet.
boolean
Indicates this part is a thinking/reasoning step from the model.
string
Possible values: user, model
string
object[]
string
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
The probability that the content violates the specified safety categoryPossible values: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Timestamp when the response was created.
string
The model version used to generate the response.
object
string
string
object[]
string
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
The probability that the content violates the specified safety categoryPossible values: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Unique identifier for the response.
object
integer
Output only. Number of tokens in the cached part in the input (the cached content).
integer
Number of tokens in the response(s).
object[]
Breakdown of candidate tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
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.
object[]
Breakdown of prompt tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
integer
Number of tokens present in thoughts output.
integer
Number of tokens present in tool-use prompt(s).
object[]
Breakdown of tool-use prompt tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
integer
Total number of tokens (prompt + candidates).
string
Traffic type used for the request (e.g., PROVISIONED_THROUGHPUT).
Examples
Input
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Output
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
Model ID:vertexai/gemini-3.5-flashEndpoint:POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash
Wait for the result
Queue and collect later
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# The SDK automatically creates an idempotency key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-3.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// 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 result = await comfy.models.run<Result>("vertexai/gemini-3.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
The same body, sent to POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-3.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # with the model ID, all another process needs # Poll until the request completes, waiting the Retry-After the server names. async for update in handle.iter_events(): print(update.status, update.queue_position) # The provider's own payload, the same value models.run() returns. # A request that failed or was cancelled raises the typed Router error here. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Reads COMFY_API_KEY from the environment.// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-3.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // with the model ID, all another process needs// Poll until the request completes, waiting the Retry-After the server names.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// The same result models.run() returns. A request that failed or was cancelled rejects here.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Schema
Input
object[]
required
The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.
object[]
required
object
URI based data.
string
URI
string
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
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.
string (byte)
The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MBFormat: byte
string
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
string
How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.
string
A text prompt or code snippet.
boolean
Indicates this part is a thinking/reasoning step from the model.
string
Possible values: user, model
object
Sampling, length and output settings for the generation. Every field is optional: the fields below that declare a default apply it when omitted, and the rest fall back to the model’s own behaviour.
object
Configuration for image generation
string
Aspect ratio for generated images
object
Optional. The image output format for generated images.
integer
Optional. The compression quality of the output image.
string
Optional. The image format that the output should be saved as, on the Vertex AI paths: requests served by Comfy’s own credentials, and BYOK requests authenticated with a GCP service account. Accepted values there are image/png and image/jpeg, matched case-insensitively and normalised to lower case before the request is forwarded; any other value is rejected with a 400 naming this field. Defaults to image/png when omitted. A BYOK request authenticated with a Google AI Studio API key is the exception: that upstream has no such property and rejects the whole call if it is present, so the field is dropped from the request rather than honoured or rejected, and the output format is whatever AI Studio chooses. On every path, read the media type back from the response part you are given (inlineData.mimeType, or fileData.mimeType when uploadImagesToStorage is set) rather than assuming the value you sent.
string
Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.
integer
Maximum number of tokens that can be generated in the response. A token is approximately 4 characters. 100 tokens correspond to roughly 60-80 words.Range: 16 to 65536
`TEXT`, `IMAGE`[]
integer
When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn’t guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used. Available for the following models:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001
string[]
number
default:"1"
The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible. If the model returns a response that’s too generic, too short, or the model gives a fallback response, try increasing the temperatureRange: 0 to 2Format: float
object
Optional. Configuration for thinking features. Thinking is a process where the model breaks down a complex task into smaller steps to generate a higher-quality response.
boolean
Optional. If true, the model will include its thoughts in the response.
integer
Optional. The token budget for the model’s thinking process. The model will make a best effort to stay within this budget.
string
Optional. The thinking level for the model.Possible values: THINKING_LEVEL_UNSPECIFIED, LOW, MEDIUM, HIGH, MINIMAL, XHIGH
integer
default:"40"
Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model’s vocabulary. A top-K of 3 means that the next token is selected from among the 3 most probable tokens by using temperature.Range: 1 to …
number
default:"0.95"
If specified, nucleus sampling is used.
Top-P changes how the model selects tokens for output. Tokens are selected from the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.
Specify a lower value for less random responses and a higher value for more random responses.Range: 0 to 1Format: float
object[]
Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
string
required
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
required
Possible values: OFF, BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH
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.
object[]
required
A list of ordered parts that make up a single message. Different parts may have different IANA MIME types. For limits on the inputs, such as the maximum number of tokens or the number of images, see the model specifications on the Google models page.
string
A text prompt or code snippet.
string
The identity of the entity that creates the message. The following values are supported: user: This indicates that the message is sent by a real person, typically a user-generated message. model: This indicates that the message is generated by the model. The model value is used to insert messages from the model into the conversation during multi-turn conversations. For non-multi-turn conversations, this field can be left blank or unset.Possible values: user, model
object[]
A piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. See Function calling.
object[]
string
string
required
object
JSON schema for the function parameters
boolean
If true, generated images will be uploaded to cloud storage and returned as signed URLs instead of inline base64 data. The URLs expire after 24 hours.
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.
object
Represents a duration offset for video timeline positions.
integer
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.Range: 0 to 999999999
integer
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.Range: -315576000000 to 315576000000
object
Represents a duration offset for video timeline positions.
integer
Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.Range: 0 to 999999999
integer
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.Range: -315576000000 to 315576000000
Generated from the schema Router serves at GET /v2/models/vertexai/gemini-3.5-flash/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
object[]
object
object[]
string[]
integer
string
string (date)
Format: date
integer
string
string
object
The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.
object[]
required
object
URI based data.
string
URI
string
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
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.
string (byte)
The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MBFormat: byte
string
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
string
How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.
string
A text prompt or code snippet.
boolean
Indicates this part is a thinking/reasoning step from the model.
string
Possible values: user, model
string
object[]
string
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
The probability that the content violates the specified safety categoryPossible values: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Timestamp when the response was created.
string
The model version used to generate the response.
object
string
string
object[]
string
Possible values: HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT
string
The probability that the content violates the specified safety categoryPossible values: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Unique identifier for the response.
object
integer
Output only. Number of tokens in the cached part in the input (the cached content).
integer
Number of tokens in the response(s).
object[]
Breakdown of candidate tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
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.
object[]
Breakdown of prompt tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
integer
Number of tokens present in thoughts output.
integer
Number of tokens present in tool-use prompt(s).
object[]
Breakdown of tool-use prompt tokens by modality.
string
Type of input or output content modality.Possible values: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Number of tokens for the given modality.
integer
Total number of tokens (prompt + candidates).
string
Traffic type used for the request (e.g., PROVISIONED_THROUGHPUT).
Examples
Input
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Output
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
Model ID:vertexai/gemini-2.5-proEndpoint:POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro
Wait for the result
Queue and collect later
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# The SDK automatically creates an idempotency key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-2.5-pro", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// 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 result = await comfy.models.run<Result>("vertexai/gemini-2.5-pro", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
The same body, sent to POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-2.5-pro", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # with the model ID, all another process needs # Poll until the request completes, waiting the Retry-After the server names. async for update in handle.iter_events(): print(update.status, update.queue_position) # The provider's own payload, the same value models.run() returns. # A request that failed or was cancelled raises the typed Router error here. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Reads COMFY_API_KEY from the environment.// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-2.5-pro", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // with the model ID, all another process needs// Poll until the request completes, waiting the Retry-After the server names.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// The same result models.run() returns. A request that failed or was cancelled rejects here.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Schema
Input
Fields follow Google’s published API specification and are checked against it in CI. Router’s own schema for this model is not published yet, so requests are forwarded to the provider unvalidated.
object[]
required
The conversation so far, oldest first. A part is text, or inlineData to send an image, audio or video alongside the prompt.
string
required
Who authored the turn.Possible values: user, model
object[]
required
The turn’s content parts.
string
A text part.
object
An inline media part.
string
Media type, for example image/png.
string
Base64-encoded media bytes.
object
System prompt applied to the whole conversation.
object[]
string
object
Sampling and length settings.
number
Randomness of sampling. Defaults are model specific.Range: 0 to 2
number
Nucleus sampling threshold. Defaults are model specific.
integer
Top-k sampling cutoff. Defaults are model specific.
integer
Upper bound on generated tokens.
integer
Seed for reproducible sampling.
string[]
Strings that end generation when produced.
object
Reasoning effort controls on models that support it.
string
Possible values: MINIMAL, LOW, MEDIUM, HIGH
boolean
Return the model’s reasoning alongside the answer.
object[]
Function declarations the model may call.
object[]
string
string
object
JSON Schema for the function’s arguments.
Output
Router returns Google’s native response unchanged. The text is at candidates[0].content.parts[0].text.
object[]
Generated candidates; one unless you asked for more.
object
string
Possible values: model
object[]
string
The generated text.
object
Present when the model chose to call one of your tools.
Present when the prompt itself was blocked. Check whether candidates is present before reading the result; usageMetadata can also appear on a blocked response.
string
Why the prompt was blocked. No candidates are returned; rephrase the prompt and retry.Possible values: SAFETY, OTHER, BLOCKLIST, PROHIBITED_CONTENT, IMAGE_SAFETY
Examples
Input
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Output
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
Model ID:vertexai/gemini-2.5-flashEndpoint:POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash
Wait for the result
Queue and collect later
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# The SDK automatically creates an idempotency key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-2.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// 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 result = await comfy.models.run<Result>("vertexai/gemini-2.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
The same body, sent to POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.
import asynciofrom comfy_sdk import AsyncComfy# Reads COMFY_API_KEY from the environment.# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-2.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # with the model ID, all another process needs # Poll until the request completes, waiting the Retry-After the server names. async for update in handle.iter_events(): print(update.status, update.queue_position) # The provider's own payload, the same value models.run() returns. # A request that failed or was cancelled raises the typed Router error here. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Reads COMFY_API_KEY from the environment.// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-2.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // with the model ID, all another process needs// Poll until the request completes, waiting the Retry-After the server names.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// The same result models.run() returns. A request that failed or was cancelled rejects here.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Schema
Input
Fields follow Google’s published API specification and are checked against it in CI. Router’s own schema for this model is not published yet, so requests are forwarded to the provider unvalidated.
object[]
required
The conversation so far, oldest first. A part is text, or inlineData to send an image, audio or video alongside the prompt.
string
required
Who authored the turn.Possible values: user, model
object[]
required
The turn’s content parts.
string
A text part.
object
An inline media part.
string
Media type, for example image/png.
string
Base64-encoded media bytes.
object
System prompt applied to the whole conversation.
object[]
string
object
Sampling and length settings.
number
Randomness of sampling. Defaults are model specific.Range: 0 to 2
number
Nucleus sampling threshold. Defaults are model specific.
integer
Top-k sampling cutoff. Defaults are model specific.
integer
Upper bound on generated tokens.
integer
Seed for reproducible sampling.
string[]
Strings that end generation when produced.
object
Reasoning effort controls on models that support it.
string
Possible values: MINIMAL, LOW, MEDIUM, HIGH
boolean
Return the model’s reasoning alongside the answer.
object[]
Function declarations the model may call.
object[]
string
string
object
JSON Schema for the function’s arguments.
Output
Router returns Google’s native response unchanged. The text is at candidates[0].content.parts[0].text.
object[]
Generated candidates; one unless you asked for more.
object
string
Possible values: model
object[]
string
The generated text.
object
Present when the model chose to call one of your tools.
Present when the prompt itself was blocked. Check whether candidates is present before reading the result; usageMetadata can also appear on a blocked response.
string
Why the prompt was blocked. No candidates are returned; rephrase the prompt and retry.Possible values: SAFETY, OTHER, BLOCKLIST, PROHIBITED_CONTENT, IMAGE_SAFETY
Examples
Input
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Output
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
Before you ship
The SDKs create an Idempotency-Key and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes.When a request fails, Router sends an X-Comfy-Error-Type response header explaining why. A 422 means Router rejected the input before calling the provider, and a 413 means the request body was larger than Router accepts. Download generated assets promptly because result URLs can expire.Any size limit named in a field description above is the provider’s own bound on that field, quoted from the provider’s specification. Router applies a separate cap to the whole request body, which base64-encoded media counts against: see request body size.This page documents one partner model called through Comfy Router. The same comfy-sdk / @comfyorg/sdk package also ships a second client, for running a whole ComfyUI workflow graph on Comfy Cloud: Comfy(api_key=...) / new Comfy({ apiKey }), with client.workflows, client.assets and client.jobs. See Comfy SDKs.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ComfyUI","colors":{"primary":"#49378B","light":"#F2FF59","dark":"#F2FF59"},"logo":{"light":"https://mintcdn.com/dripart/WCFdTagRdhtvk9-o/logo/light.svg?fit=max\u0026auto=format\u0026n=WCFdTagRdhtvk9-o\u0026q=85\u0026s=ec112de87239058f5a931a7e4b594965","dark":"https://mintcdn.com/dripart/QzWbjSCBG7w61rR3/logo/dark.svg?fit=max\u0026auto=format\u0026n=QzWbjSCBG7w61rR3\u0026q=85\u0026s=62b4d879fb3aadbd7a468d1539032d6f","href":"/"},"favicon":"https://mintcdn.com/dripart/maKDA164-rrTfyxY/favicon.ico?fit=max\u0026auto=format\u0026n=maKDA164-rrTfyxY\u0026q=85\u0026s=94f3a697cf4c9a1ee3961b69219d0942","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://blog.comfy.org/?utm_source=docs","label":"Blog"},{"href":"/tutorials/partner-nodes/pricing","label":"Pricing"},{"href":"https://platform.comfy.org/?utm_source=docs","label":"Platform"},{"href":"https://comfy.org/download?utm_source=docs","label":"Download"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"Resources","items":[{"label":"installation","href":"/installation/system_requirements"},{"label":"Tutorials","href":"/tutorials/basic/text-to-image"},{"label":"Development","href":"/development/overview"}]},{"header":"Products","items":[{"label":"Features","href":"https://www.comfy.org/?utm_source=docs"},{"label":"Gallery","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"Download","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"Company","items":[{"label":"About","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"Careers","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"Terms of Service","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"Privacy Policy","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"search":{"prompt":"Search Comfy documentation..."},"seo":{"metatags":{"googlebot":"max-video-preview:0"}},"icons":{"library":"fontawesome"},"integrations":{"ga4":{"measurementId":"G-MXC01ZDDHQ"},"posthog":{"apiKey":"phc_iKfK86id4xVYws9LybMje0h44eGtfwFgRPIBehmy8rO"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":""},{"language":"zh","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"资源","items":[{"label":"安装","href":"/zh/installation/system_requirements"},{"label":"教程","href":"/zh/tutorials/basic/text-to-image"},{"label":"开发","href":"/zh/development/overview"}]},{"header":"产品","items":[{"label":"功能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"画廊","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"下载","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"公司","items":[{"label":"关于","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"招聘","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"服务条款","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"隐私政策","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"href":"zh"},{"language":"ja","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"リソース","items":[{"label":"インストール","href":"/ja/installation/system_requirements"},{"label":"チュートリアル","href":"/ja/tutorials/basic/text-to-image"},{"label":"開発","href":"/ja/development/overview"}]},{"header":"プロダクト","items":[{"label":"機能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"ギャラリー","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"ダウンロード","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"会社情報","items":[{"label":"概要","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"採用情報","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"利用規約","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"プライバシーポリシー","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ja/tutorials/partner-nodes/pricing","label":"料金"},{"href":"https://comfy.org/download?utm_source=docs","label":"ダウンロード"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"href":"ja"},{"language":"ko","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"리소스","items":[{"label":"설치","href":"/ko/installation/system_requirements"},{"label":"튜토리얼","href":"/ko/tutorials/basic/text-to-image"},{"label":"개발","href":"/ko/development/overview"}]},{"header":"제품","items":[{"label":"기능","href":"https://www.comfy.org/?utm_source=docs"},{"label":"갤러리","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"다운로드","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"회사 정보","items":[{"label":"소개","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"채용","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"이용약관","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"개인정보 처리방침","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ko/tutorials/partner-nodes/pricing","label":"가격 정책"},{"href":"https://comfy.org/download?utm_source=docs","label":"다운로드"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"href":"ko"},{"language":"es","href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dripart","hasAudioNarration":false,"actualSubdomain":"dripart","customDomains":["docs.comfy.org"],"gitSource":{"type":"github","owner":"comfy-org","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b06627107bb69e7d1962a1c","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"en","tag":"Built-in Nodes","count":1206},{"language":"ja","tag":"組み込みノード","count":1206},{"language":"zh","tag":"内置节点","count":1206},{"language":"en","tag":"Nodes","count":1205},{"language":"ja","tag":"ノード","count":1205},{"language":"zh","tag":"节点","count":1205},{"language":"ko","tag":"내장 노드 (Built-in Nodes)","count":1164},{"language":"ko","tag":"노드","count":1163},{"language":"es","tag":"Nodos integrados","count":1098},{"language":"es","tag":"Nodos","count":1097},{"language":"en","tag":"Tutorials","count":441},{"language":"es","tag":"Tutoriales","count":441},{"language":"en","tag":"Model","count":385},{"language":"ja","tag":"Model","count":385},{"language":"ko","tag":"Model","count":385},{"language":"zh","tag":"Model","count":385},{"language":"es","tag":"Modelo","count":378},{"language":"en","tag":"Partner","count":377},{"language":"ja","tag":"API 開発","count":377},{"language":"ja","tag":"Partner","count":377},{"language":"ko","tag":"API 개발","count":377},{"language":"ko","tag":"Partner","count":377},{"language":"zh","tag":"API 开发","count":377},{"language":"zh","tag":"Partner","count":377},{"language":"es","tag":"Partner","count":375},{"language":"en","tag":"Image","count":365},{"language":"ja","tag":"はじめに","count":360},{"language":"ko","tag":"시작하기","count":360},{"language":"zh","tag":"开始使用","count":360},{"language":"es","tag":"Comfy Router","count":348},{"language":"en","tag":"Comfy Router","count":342},{"language":"ja","tag":"Comfy Router","count":339},{"language":"ko","tag":"Comfy Router","count":339},{"language":"zh","tag":"Comfy Router","count":339},{"language":"es","tag":"Imagen","count":332},{"language":"en","tag":"Agent tools","count":327},{"language":"en","tag":"Catalog","count":319},{"language":"en","tag":"Models","count":311},{"language":"es","tag":"Models","count":308},{"language":"ja","tag":"Models","count":308},{"language":"ko","tag":"Models","count":308},{"language":"zh","tag":"Models","count":308},{"language":"es","tag":"All Models","count":305},{"language":"es","tag":"Video","count":282},{"language":"ja","tag":"画像","count":220},{"language":"ko","tag":"이미지","count":220},{"language":"zh","tag":"图像","count":220},{"language":"ja","tag":"Video","count":205},{"language":"zh","tag":"Video","count":205},{"language":"ko","tag":"Video","count":188}],"searchSettings":{"maxResults":10}},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":":root{--ink-900: #151417;--hub-shell-light: #f7f6f9;--accent-purple: #49378b;--accent-yellow: #f2ff59;--primary: 73 55 139 !important;--primary-light: 242 255 89 !important;--primary-dark: 242 255 89 !important}html.dark{--primary: 242 255 89 !important;--background-dark: 14 14 13 !important}html.dark body{background-color:#0e0e0d!important}html.dark #navbar,html.dark #navbar-transition{background-color:var(--ink-900)!important}html.dark #sidebar,html.dark #sidebar-content{background-color:rgb(var(--background-dark))!important}html.dark #navbar,html.dark #navbar-transition{box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.dark #navbar-transition{border-bottom:1px solid rgba(255, 255, 255, 0.08)!important;opacity:1!important}html.dark img.nav-logo{filter:none}html.dark #sidebar-content a:not([aria-current=\"page\"]){color:rgba(255, 255, 255, 0.72)!important}html.dark #sidebar-content a:not([aria-current=\"page\"]) *{color:inherit!important}html.dark #sidebar-content a[aria-current=\"page\"]{color:var(--accent-yellow)!important;background-color:rgba(242, 255, 89, 0.10)!important}html.dark #sidebar-content a[aria-current=\"page\"] *{color:inherit!important}html.dark .nav-tabs-item[data-active],html.dark mobile-nav-tabs-item[data-active]{color:var(--accent-yellow)!important}html.dark #navbar a[href*=\"comfy.org/cloud\"] span.absolute{background-color:var(--accent-yellow)!important}html.dark #navbar a[href*=\"comfy.org/cloud\"] span.text-white{color:#151417!important}html:not(.dark) #background-color,html:not(.dark) #navbar,html:not(.dark) #navbar-transition,html:not(.dark) #sidebar,html:not(.dark) #sidebar-content{background-color:var(--hub-shell-light)!important}html:not(.dark) .nav-tabs-item[data-active],html:not(.dark) mobile-nav-tabs-item[data-active],html:not(.dark) nav-dropdown-item[data-active]{background-color:transparent!important;box-shadow:none!important;color:var(--accent-purple)!important;font-weight:600!important}html:not(.dark) .nav-tabs-item[data-active] *,html:not(.dark) mobile-nav-tabs-item[data-active] *,html:not(.dark) nav-dropdown-item[data-active] *{color:inherit!important}html:not(.dark) #sidebar-content li:has(>a[aria-current=\"page\"]){background-color:transparent!important;box-shadow:none!important}html:not(.dark) #sidebar-content a[aria-current=\"page\"]{color:var(--accent-purple)!important;background-color:rgba(73, 55, 139, 0.1)!important;font-weight:600!important}html:not(.dark) #sidebar-content a[aria-current=\"page\"] *{color:inherit!important}html:not(.dark) toc-item[data-active],html:not(.dark) toc-item[data-active-deepest],html:not(.dark) toc-item[data-active] a,html:not(.dark) toc-item[data-active-deepest] a{background-color:transparent!important;color:var(--accent-purple)!important;font-weight:600!important}html:not(.dark) #header :where(h1,h2,h3,h4,h5,h6),html:not(.dark) #content-area :where(h1,h2,h3,h4,h5,h6){color:#151417!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"]{background-color:transparent!important;color:var(--accent-purple)!important;border-radius:0.75rem;box-shadow:inset 0 0 0 1px var(--accent-purple)!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"] span.absolute{background-color:transparent!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"] *{color:inherit!important}#sidebar .sticky.top-0.pointer-events-none.bg-linear-to-b{background-image:none!important}@media (min-width: 1024px){#navbar.is-not-custom.is-not-center+div:has(>#sidebar),.max-w-8xl.mx-auto.relative,.max-w-8xl.mx-auto{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important}#navbar [class*=\"px-12\"],#navbar [class*=\"mx-4\"]{padding-left:0!important;padding-right:1.5rem!important;margin-left:0!important;margin-right:0!important}#navbar a.select-none,#navbar .nav-logo{margin-left:1rem!important}#navbar .nav-tabs{padding-left:2rem!important}#sidebar{left:0!important;margin-left:0!important;box-shadow:none!important}#sidebar-content{margin-left:0!important;padding-left:1rem!important;box-sizing:border-box!important}#navbar,#navbar-transition{left:0!important;right:0!important;width:100%!important;max-width:none!important}#content-area{margin-left:0!important;max-width:none!important;width:100%!important;padding-left:18rem!important}#sidebar.sticky~#content-container #content-area{padding-left:2rem!important;padding-right:2rem!important}#content-container,#body-content{max-width:none!important;width:100%!important}:root{--content-width: 100%;--sidebar-width: 18rem}}@media (min-width: 1024px){nav#sidebar,#sidebar[style]{left:0!important;right:auto!important;margin-left:0!important;transform:none!important}#navbar li.navbar-link:has(a[href*=\"comfy.org/download\"]){margin-right:0!important}#navbar a[href*=\"comfy.org/download\"]{box-sizing:border-box;border:1px solid rgb(255 255 255 / 0.22);border-radius:0.75rem;padding:7px 0.875rem!important;color:#fff!important;font-size:0.875rem;line-height:1.25rem}html:not(.dark) #navbar a[href*=\"comfy.org/download\"]{border-color:rgb(0 0 0 / 0.16);color:#151417!important}#navbar a[href*=\"comfy.org/download\"]:hover{background:rgb(255 255 255 / 0.06)}html:not(.dark) #navbar a[href*=\"comfy.org/download\"]:hover{background:rgb(0 0 0 / 0.04)}#navbar li.navbar-link:has(a[href*=\"comfy.org/download\"])+.whitespace-nowrap,#navbar .flex.space-x-6>.whitespace-nowrap.hidden{margin-left:0.5rem!important}}body:has(.router-api-reference-marker) #content,body:has(.router-api-reference-marker) #header{max-width:48rem}body:has(.router-api-reference-marker) #content-area table{width:100%;table-layout:auto}body:has(.router-api-reference-marker) #content-area th,body:has(.router-api-reference-marker) #content-area td{min-width:4rem!important;overflow-wrap:anywhere}body:has(.router-api-reference-marker) #content-area table:has(th:nth-child(6)) th:nth-child(3),body:has(.router-api-reference-marker) #content-area table:has(th:nth-child(6)) td:nth-child(3){min-width:5rem!important}@media (max-width: 1535px){body:has(.router-api-reference-marker) #content-side-layout{display:none!important}}body:has(.router-provider-coverage-marker) #content,body:has(.router-provider-coverage-marker) #header{max-width:64rem}body:has(.router-provider-coverage-marker) #content-area table{width:100%;table-layout:auto}body:has(.router-provider-coverage-marker) #content-area th,body:has(.router-provider-coverage-marker) #content-area td{min-width:5rem!important;overflow-wrap:anywhere}body:has(.router-provider-coverage-marker) #content-area th:first-child,body:has(.router-provider-coverage-marker) #content-area td:first-child{min-width:12rem!important}body:has(.router-quickstart-marker) [data-component-part=\"card-content\"] [data-component-part=\"code-block-root\"][style*=\"height:190px\"],body:has(.router-quickstart-marker) [data-component-part=\"card-content\"] [data-component-part=\"code-block-root\"][style*=\"height: 190px\"]{height:86px!important}#content img:not([data-component-part=\"card-image\"]){max-width:min(100%, 750px)}#content .frame:has(img){max-width:calc(750px + 1rem)}"},{"filePath":"samples-cards.css","content":".sample-card-grid{display:grid;gap:20px;grid-template-columns:repeat(2, minmax(0, 1fr));margin-top:28px}.sample-card{min-width:0;perspective:1200px}.sample-card-inner{height:565px;position:relative;transform-style:preserve-3d;transition:transform 560ms cubic-bezier(.2, .75, .3, 1)}.sample-card[data-flipped=\"true\"] .sample-card-inner{transform:rotateY(180deg)}.sample-card-face{backface-visibility:hidden;background:#fff;border:1px solid #e5e1eb;border-radius:12px;box-sizing:border-box;height:100%;inset:0;overflow:hidden;position:absolute;width:100%}.sample-card-front{display:flex;flex-direction:column}.sample-card-back{opacity:0;pointer-events:none;transform:rotateY(180deg);visibility:hidden}.sample-card[data-flipped=\"true\"] .sample-card-front{pointer-events:none;transition:visibility 0s linear 280ms;visibility:hidden}.sample-card[data-flipped=\"true\"][data-active-path=\"api\"] .sample-card-back[data-sample-path=\"api\"],.sample-card[data-flipped=\"true\"][data-active-path=\"endpoint\"] .sample-card-back[data-sample-path=\"endpoint\"]{opacity:1;pointer-events:auto;visibility:visible}.sample-card-preview{border-bottom:1px solid #e5e1eb;cursor:pointer;display:block;width:100%}.sample-card-body{display:flex;flex:1;flex-direction:column;padding:20px}.sample-card-body h2,.sample-path-body h2{color:#49378b;font-size:18px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px}.sample-path-body h2{text-align:center}.sample-card-body>p{color:#5f5966;font-size:14px;line-height:1.55;margin:0;min-height:66px}.sample-card-actions{display:flex;gap:8px;margin-top:20px}.sample-card-actions button{background:#fff;border:1px solid #cfc8de;border-radius:6px;color:#49378b;cursor:pointer;flex:1;font-size:13px;font-weight:700;padding:10px 12px}.sample-card-links{border-top:1px solid #eeeaf1;display:flex;gap:8px;margin-top:16px;padding-top:12px}.sample-card-links a{color:#625b6c;font-size:12px;font-weight:650;text-decoration:none}.sample-card-links span{color:#b3adba}.sample-path-body{padding:20px}.sample-path-body>button{background:transparent;border:0;color:#625b6c;cursor:pointer;font-size:12px;font-weight:700;padding:0}.sample-path-eyebrow{color:#857a9e;font-size:10px;font-weight:700;letter-spacing:.08em;margin:19px 0 5px;text-align:center;text-transform:uppercase}.sample-path-body>p:not(.sample-path-eyebrow){color:#5f5966;font-size:12px;line-height:1.5;margin:0 0 15px}.sample-path-steps{display:grid;gap:8px}.sample-path-step{align-items:center;background:#faf9fc;border:1px solid #e5e1ea;border-radius:8px;display:flex;gap:10px;padding:10px 11px}.sample-path-number{align-items:center;background:#49378b;border-radius:999px;color:#fff;display:inline-flex;flex:0 0 21px;font-size:11px;font-weight:700;height:21px;justify-content:center}.sample-path-copy{flex:1;min-width:0}.sample-path-copy strong{color:#312c36;display:block;font-size:12px}.sample-path-copy span{color:#706a75;display:block;font-size:11px;line-height:1.35;margin-top:2px}.sample-path-step a{color:#49378b;flex:0 0 auto;font-size:11px;font-weight:700;text-decoration:none}@media (max-width: 768px){.sample-card-grid{grid-template-columns:1fr}.sample-card-inner{height:clamp(620px, 180vw, 760px)}}"}]}
{"page":{"pagePath":"development/comfy-router/models/google/gemini/code","slug":"/development/comfy-router/models/google/gemini/code","pageMetadata":{"title":"Use Google Gemini with Comfy Router","description":"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape","sidebarTitle":"Google Gemini","href":"/development/comfy-router/models/google/gemini/code"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,ParamField,ResponseField,Tab,Tabs}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`API Reference for Google Gemini. Google Gemini is Google’s family of multimodal text models, covering fast drafting through deep reasoning across the Flash and Pro tiers.`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick start`}),`\n`,_jsxs(_components.p,{children:[`Create a key in `,_jsx(_components.a,{href:`https://platform.comfy.org/profile/api-keys?onboarding=router`,children:`your Comfy workspace`}),` and export it as `,_jsx(_components.code,{children:`COMFY_API_KEY`}),`. The Python and TypeScript snippets use the Comfy SDKs (`,_jsx(_components.code,{children:`pip install comfy-sdk`}),` and `,_jsx(_components.code,{children:`npm install @comfyorg/sdk`}),`); the cURL snippet is the same call over raw HTTP.`]}),`\n`,_jsx(_components.p,{children:`Pick the model you want to call. Everything below, from the snippets to the schema and examples, follows your choice.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Gemini 3.1 Pro`,id:`gemini-3-1-pro`,\"data-child-tab-ids\":`[\"wait-for-the-result\",\"queue-and-collect-later\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Model ID:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-3.1-pro-preview`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Wait for the result`,id:`wait-for-the-result`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.1-pro-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.1-pro-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Queue and collect later`,id:`queue-and-collect-later`,children:[_jsxs(_components.p,{children:[`The same body, sent to `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests`}),`. Router answers `,_jsx(_components.code,{children:`201`}),` with a `,_jsx(_components.code,{children:`request_id`}),` as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. `,_jsx(_components.a,{href:`/development/comfy-router/queue`,children:`Queued delivery`}),` walks through status, cancellation and collection.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.1-pro-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # The provider's own payload, the same value models.run() returns.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # A request that failed or was cancelled raises the typed Router error here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.1-pro-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The same result models.run() returns. A request that failed or was cancelled rejects here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`schema`,children:`Schema`}),_jsx(Heading,{level:`3`,id:`input`,children:`Input`}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents`,children:_jsx(_components.p,{children:`The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.`})}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts`}),_jsx(ParamField,{body:`contents[].parts[].fileData`,type:`object`,id:`param-contents-parts-file-data`,children:_jsx(_components.p,{children:`URI based data.`})}),_jsx(ParamField,{body:`contents[].parts[].fileData.fileUri`,type:`string`,id:`param-contents-parts-file-data-file-uri`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ParamField,{body:`contents[].parts[].fileData.mimeType`,type:`string`,id:`param-contents-parts-file-data-mime-type`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data`,children:_jsx(_components.p,{children:`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.`})}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string (byte)`,id:`param-contents-parts-inline-data-data`,children:[_jsx(_components.p,{children:`The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MB`}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].mediaProcessing`,type:`string`,id:`param-contents-parts-media-processing`,children:_jsx(_components.p,{children:`How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsx(ParamField,{body:`contents[].parts[].thought`,type:`boolean`,id:`param-contents-parts-thought`,children:_jsx(_components.p,{children:`Indicates this part is a thinking/reasoning step from the model.`})}),_jsx(ParamField,{body:`contents[].role`,type:`string`,id:`param-contents-role`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config`,children:_jsxs(_components.p,{children:[`Sampling, length and output settings for the generation. Every field is optional: the fields below that declare a `,_jsx(_components.code,{children:`default`}),` apply it when omitted, and the rest fall back to the model’s own behaviour.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig`,type:`object`,id:`param-generation-config-image-config`,children:_jsx(_components.p,{children:`Configuration for image generation`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.aspectRatio`,type:`string`,id:`param-generation-config-image-config-aspect-ratio`,children:_jsx(_components.p,{children:`Aspect ratio for generated images`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions`,type:`object`,id:`param-generation-config-image-config-image-output-options`,children:_jsx(_components.p,{children:`Optional. The image output format for generated images.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.compressionQuality`,type:`integer`,id:`param-generation-config-image-config-image-output-options-compression-quality`,children:_jsx(_components.p,{children:`Optional. The compression quality of the output image.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.mimeType`,type:`string`,id:`param-generation-config-image-config-image-output-options-mime-type`,children:_jsxs(_components.p,{children:[`Optional. The image format that the output should be saved as, on the Vertex AI paths: requests served by Comfy’s own credentials, and BYOK requests authenticated with a GCP service account. Accepted values there are `,_jsx(_components.code,{children:`image/png`}),` and `,_jsx(_components.code,{children:`image/jpeg`}),`, matched case-insensitively and normalised to lower case before the request is forwarded; any other value is rejected with a 400 naming this field. Defaults to `,_jsx(_components.code,{children:`image/png`}),` when omitted. A BYOK request authenticated with a Google AI Studio API key is the exception: that upstream has no such property and rejects the whole call if it is present, so the field is dropped from the request rather than honoured or rejected, and the output format is whatever AI Studio chooses. On every path, read the media type back from the response part you are given (`,_jsx(_components.code,{children:`inlineData.mimeType`}),`, or `,_jsx(_components.code,{children:`fileData.mimeType`}),` when `,_jsx(_components.code,{children:`uploadImagesToStorage`}),` is set) rather than assuming the value you sent.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageSize`,type:`string`,id:`param-generation-config-image-config-image-size`,children:_jsx(_components.p,{children:`Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.`})}),_jsxs(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens`,children:[_jsx(_components.p,{children:`Maximum number of tokens that can be generated in the response. A token is approximately 4 characters. 100 tokens correspond to roughly 60-80 words.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`16`}),` to `,_jsx(_components.code,{children:`65536`})]})]}),_jsx(ParamField,{body:`generationConfig.responseModalities`,type:\"`TEXT`, `IMAGE`[]\",id:`param-generation-config-response-modalities`}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed`,children:_jsx(_components.p,{children:`When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn’t guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used. Available for the following models:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences`}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,default:`1`,id:`param-generation-config-temperature`,children:[_jsx(_components.p,{children:`The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible. If the model returns a response that’s too generic, too short, or the model gives a fallback response, try increasing the temperature`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`2`})]}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config`,children:_jsx(_components.p,{children:`Optional. Configuration for thinking features. Thinking is a process where the model breaks down a complex task into smaller steps to generate a higher-quality response.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts`,children:_jsx(_components.p,{children:`Optional. If true, the model will include its thoughts in the response.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingBudget`,type:`integer`,id:`param-generation-config-thinking-config-thinking-budget`,children:_jsx(_components.p,{children:`Optional. The token budget for the model’s thinking process. The model will make a best effort to stay within this budget.`})}),_jsxs(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level`,children:[_jsx(_components.p,{children:`Optional. The thinking level for the model.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`THINKING_LEVEL_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`XHIGH`})]})]}),_jsxs(ParamField,{body:`generationConfig.topK`,type:`integer`,default:`40`,id:`param-generation-config-top-k`,children:[_jsx(_components.p,{children:`Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model’s vocabulary. A top-K of 3 means that the next token is selected from among the 3 most probable tokens by using temperature.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`1`}),` to `,_jsx(_components.code,{children:`…`})]})]}),_jsxs(ParamField,{body:`generationConfig.topP`,type:`number`,default:`0.95`,id:`param-generation-config-top-p`,children:[_jsx(_components.p,{children:`If specified, nucleus sampling is used.\nTop-P changes how the model selects tokens for output. Tokens are selected from the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.\nSpecify a lower value for less random responses and a higher value for more random responses.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`1`})]}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`safetySettings`,type:`object[]`,id:`param-safety-settings`,children:_jsx(_components.p,{children:`Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.`})}),_jsx(ParamField,{body:`safetySettings[].category`,type:`string`,required:true,id:`param-safety-settings-category`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsx(ParamField,{body:`safetySettings[].threshold`,type:`string`,required:true,id:`param-safety-settings-threshold`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`OFF`}),`, `,_jsx(_components.code,{children:`BLOCK_NONE`}),`, `,_jsx(_components.code,{children:`BLOCK_LOW_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_MEDIUM_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_ONLY_HIGH`})]})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,required:true,id:`param-system-instruction-parts`,children:_jsx(_components.p,{children:`A list of ordered parts that make up a single message. Different parts may have different IANA MIME types. For limits on the inputs, such as the maximum number of tokens or the number of images, see the model specifications on the Google models page.`})}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsxs(ParamField,{body:`systemInstruction.role`,type:`string`,id:`param-system-instruction-role`,children:[_jsx(_components.p,{children:`The identity of the entity that creates the message. The following values are supported: user: This indicates that the message is sent by a real person, typically a user-generated message. model: This indicates that the message is generated by the model. The model value is used to insert messages from the model into the conversation during multi-turn conversations. For non-multi-turn conversations, this field can be left blank or unset.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:_jsx(_components.p,{children:`A piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. See Function calling.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,required:true,id:`param-tools-function-declarations-name`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters`,children:_jsx(_components.p,{children:`JSON schema for the function parameters`})}),_jsx(ParamField,{body:`uploadImagesToStorage`,type:`boolean`,id:`param-upload-images-to-storage`,children:_jsx(_components.p,{children:`If true, generated images will be uploaded to cloud storage and returned as signed URLs instead of inline base64 data. The URLs expire after 24 hours.`})}),_jsx(ParamField,{body:`videoMetadata`,type:`object`,id:`param-video-metadata`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ParamField,{body:`videoMetadata.endOffset`,type:`object`,id:`param-video-metadata-end-offset`,children:_jsx(_components.p,{children:`Represents a duration offset for video timeline positions.`})}),_jsxs(ParamField,{body:`videoMetadata.endOffset.nanos`,type:`integer`,id:`param-video-metadata-end-offset-nanos`,children:[_jsx(_components.p,{children:`Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.endOffset.seconds`,type:`integer`,id:`param-video-metadata-end-offset-seconds`,children:[_jsx(_components.p,{children:`Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`-315576000000`}),` to `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsx(ParamField,{body:`videoMetadata.startOffset`,type:`object`,id:`param-video-metadata-start-offset`,children:_jsx(_components.p,{children:`Represents a duration offset for video timeline positions.`})}),_jsxs(ParamField,{body:`videoMetadata.startOffset.nanos`,type:`integer`,id:`param-video-metadata-start-offset-nanos`,children:[_jsx(_components.p,{children:`Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.startOffset.seconds`,type:`integer`,id:`param-video-metadata-start-offset-seconds`,children:[_jsx(_components.p,{children:`Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`-315576000000`}),` to `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsxs(_components.p,{children:[`Generated from the schema Router serves at `,_jsx(_components.code,{children:`GET /v2/models/vertexai/gemini-3.1-pro-preview/openapi.json`}),`, the same document it validates a call against before the request reaches the provider.`]}),_jsx(Heading,{level:`3`,id:`output`,children:`Output`}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates`}),_jsx(ResponseField,{name:`candidates[].citationMetadata`,type:`object`,id:`param-candidates-citation-metadata`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations`,type:`object[]`,id:`param-candidates-citation-metadata-citations`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].authors`,type:`string[]`,id:`param-candidates-citation-metadata-citations-authors`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].endIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-end-index`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].license`,type:`string`,id:`param-candidates-citation-metadata-citations-license`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].publicationDate`,type:`string (date)`,id:`param-candidates-citation-metadata-citations-publication-date`,children:_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`date`})]})}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].startIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-start-index`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].title`,type:`string`,id:`param-candidates-citation-metadata-citations-title`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].uri`,type:`string`,id:`param-candidates-citation-metadata-citations-uri`}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content`,children:_jsx(_components.p,{children:`The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.`})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,required:true,id:`param-candidates-content-parts`}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData`,type:`object`,id:`param-candidates-content-parts-file-data`,children:_jsx(_components.p,{children:`URI based data.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData.fileUri`,type:`string`,id:`param-candidates-content-parts-file-data-file-uri`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].fileData.mimeType`,type:`string`,id:`param-candidates-content-parts-file-data-mime-type`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].inlineData`,type:`object`,id:`param-candidates-content-parts-inline-data`,children:_jsx(_components.p,{children:`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.`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.data`,type:`string (byte)`,id:`param-candidates-content-parts-inline-data-data`,children:[_jsx(_components.p,{children:`The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MB`}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.mimeType`,type:`string`,id:`param-candidates-content-parts-inline-data-mime-type`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].mediaProcessing`,type:`string`,id:`param-candidates-content-parts-media-processing`,children:_jsx(_components.p,{children:`How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].thought`,type:`boolean`,id:`param-candidates-content-parts-thought`,children:_jsx(_components.p,{children:`Indicates this part is a thinking/reasoning step from the model.`})}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason`}),_jsx(ResponseField,{name:`candidates[].safetyRatings`,type:`object[]`,id:`param-candidates-safety-ratings`}),_jsx(ResponseField,{name:`candidates[].safetyRatings[].category`,type:`string`,id:`param-candidates-safety-ratings-category`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`candidates[].safetyRatings[].probability`,type:`string`,id:`param-candidates-safety-ratings-probability`,children:[_jsx(_components.p,{children:`The probability that the content violates the specified safety category`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`createTime`,type:`string`,id:`param-create-time`,children:_jsx(_components.p,{children:`Timestamp when the response was created.`})}),_jsx(ResponseField,{name:`modelVersion`,type:`string`,id:`param-model-version`,children:_jsx(_components.p,{children:`The model version used to generate the response.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback`}),_jsx(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason`}),_jsx(ResponseField,{name:`promptFeedback.blockReasonMessage`,type:`string`,id:`param-prompt-feedback-block-reason-message`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings`,type:`object[]`,id:`param-prompt-feedback-safety-ratings`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings[].category`,type:`string`,id:`param-prompt-feedback-safety-ratings-category`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`promptFeedback.safetyRatings[].probability`,type:`string`,id:`param-prompt-feedback-safety-ratings-probability`,children:[_jsx(_components.p,{children:`The probability that the content violates the specified safety category`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`responseId`,type:`string`,id:`param-response-id`,children:_jsx(_components.p,{children:`Unique identifier for the response.`})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata`}),_jsx(ResponseField,{name:`usageMetadata.cachedContentTokenCount`,type:`integer`,id:`param-usage-metadata-cached-content-token-count`,children:_jsx(_components.p,{children:`Output only. Number of tokens in the cached part in the input (the cached content).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count`,children:_jsx(_components.p,{children:`Number of tokens in the response(s).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails`,type:`object[]`,id:`param-usage-metadata-candidates-tokens-details`,children:_jsx(_components.p,{children:`Breakdown of candidate tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-candidates-tokens-details-modality`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-candidates-tokens-details-token-count`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails`,type:`object[]`,id:`param-usage-metadata-prompt-tokens-details`,children:_jsx(_components.p,{children:`Breakdown of prompt tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.promptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-prompt-tokens-details-modality`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-prompt-tokens-details-token-count`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.thoughtsTokenCount`,type:`integer`,id:`param-usage-metadata-thoughts-token-count`,children:_jsx(_components.p,{children:`Number of tokens present in thoughts output.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-token-count`,children:_jsx(_components.p,{children:`Number of tokens present in tool-use prompt(s).`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails`,type:`object[]`,id:`param-usage-metadata-tool-use-prompt-tokens-details`,children:_jsx(_components.p,{children:`Breakdown of tool-use prompt tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-tool-use-prompt-tokens-details-modality`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-tokens-details-token-count`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.totalTokenCount`,type:`integer`,id:`param-usage-metadata-total-token-count`,children:_jsx(_components.p,{children:`Total number of tokens (prompt + candidates).`})}),_jsx(ResponseField,{name:`usageMetadata.trafficType`,type:`string`,id:`param-usage-metadata-traffic-type`,children:_jsx(_components.p,{children:`Traffic type used for the request (e.g., PROVISIONED_THROUGHPUT).`})}),_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),_jsx(Heading,{level:`3`,id:`input-2`,children:`Input`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`output-2`,children:`Output`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Gemini 3.5 Flash`,id:`gemini-3-5-flash`,\"data-child-tab-ids\":`[\"wait-for-the-result-2\",\"queue-and-collect-later-2\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Model ID:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-3.5-flash`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Wait for the result`,id:`wait-for-the-result-2`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Queue and collect later`,id:`queue-and-collect-later-2`,children:[_jsxs(_components.p,{children:[`The same body, sent to `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests`}),`. Router answers `,_jsx(_components.code,{children:`201`}),` with a `,_jsx(_components.code,{children:`request_id`}),` as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. `,_jsx(_components.a,{href:`/development/comfy-router/queue`,children:`Queued delivery`}),` walks through status, cancellation and collection.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # The provider's own payload, the same value models.run() returns.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # A request that failed or was cancelled raises the typed Router error here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The same result models.run() returns. A request that failed or was cancelled rejects here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`schema-2`,children:`Schema`}),_jsx(Heading,{level:`3`,id:`input-3`,children:`Input`}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-1`,children:_jsx(_components.p,{children:`The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.`})}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-1`}),_jsx(ParamField,{body:`contents[].parts[].fileData`,type:`object`,id:`param-contents-parts-file-data-1`,children:_jsx(_components.p,{children:`URI based data.`})}),_jsx(ParamField,{body:`contents[].parts[].fileData.fileUri`,type:`string`,id:`param-contents-parts-file-data-file-uri-1`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ParamField,{body:`contents[].parts[].fileData.mimeType`,type:`string`,id:`param-contents-parts-file-data-mime-type-1`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-1`,children:_jsx(_components.p,{children:`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.`})}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string (byte)`,id:`param-contents-parts-inline-data-data-1`,children:[_jsx(_components.p,{children:`The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MB`}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-1`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].mediaProcessing`,type:`string`,id:`param-contents-parts-media-processing-1`,children:_jsx(_components.p,{children:`How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-1`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsx(ParamField,{body:`contents[].parts[].thought`,type:`boolean`,id:`param-contents-parts-thought-1`,children:_jsx(_components.p,{children:`Indicates this part is a thinking/reasoning step from the model.`})}),_jsx(ParamField,{body:`contents[].role`,type:`string`,id:`param-contents-role-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-1`,children:_jsxs(_components.p,{children:[`Sampling, length and output settings for the generation. Every field is optional: the fields below that declare a `,_jsx(_components.code,{children:`default`}),` apply it when omitted, and the rest fall back to the model’s own behaviour.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig`,type:`object`,id:`param-generation-config-image-config-1`,children:_jsx(_components.p,{children:`Configuration for image generation`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.aspectRatio`,type:`string`,id:`param-generation-config-image-config-aspect-ratio-1`,children:_jsx(_components.p,{children:`Aspect ratio for generated images`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions`,type:`object`,id:`param-generation-config-image-config-image-output-options-1`,children:_jsx(_components.p,{children:`Optional. The image output format for generated images.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.compressionQuality`,type:`integer`,id:`param-generation-config-image-config-image-output-options-compression-quality-1`,children:_jsx(_components.p,{children:`Optional. The compression quality of the output image.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.mimeType`,type:`string`,id:`param-generation-config-image-config-image-output-options-mime-type-1`,children:_jsxs(_components.p,{children:[`Optional. The image format that the output should be saved as, on the Vertex AI paths: requests served by Comfy’s own credentials, and BYOK requests authenticated with a GCP service account. Accepted values there are `,_jsx(_components.code,{children:`image/png`}),` and `,_jsx(_components.code,{children:`image/jpeg`}),`, matched case-insensitively and normalised to lower case before the request is forwarded; any other value is rejected with a 400 naming this field. Defaults to `,_jsx(_components.code,{children:`image/png`}),` when omitted. A BYOK request authenticated with a Google AI Studio API key is the exception: that upstream has no such property and rejects the whole call if it is present, so the field is dropped from the request rather than honoured or rejected, and the output format is whatever AI Studio chooses. On every path, read the media type back from the response part you are given (`,_jsx(_components.code,{children:`inlineData.mimeType`}),`, or `,_jsx(_components.code,{children:`fileData.mimeType`}),` when `,_jsx(_components.code,{children:`uploadImagesToStorage`}),` is set) rather than assuming the value you sent.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageSize`,type:`string`,id:`param-generation-config-image-config-image-size-1`,children:_jsx(_components.p,{children:`Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.`})}),_jsxs(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-1`,children:[_jsx(_components.p,{children:`Maximum number of tokens that can be generated in the response. A token is approximately 4 characters. 100 tokens correspond to roughly 60-80 words.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`16`}),` to `,_jsx(_components.code,{children:`65536`})]})]}),_jsx(ParamField,{body:`generationConfig.responseModalities`,type:\"`TEXT`, `IMAGE`[]\",id:`param-generation-config-response-modalities-1`}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-1`,children:_jsx(_components.p,{children:`When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn’t guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used. Available for the following models:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-1`}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,default:`1`,id:`param-generation-config-temperature-1`,children:[_jsx(_components.p,{children:`The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results. A temperature of 0 means that the highest probability tokens are always selected. In this case, responses for a given prompt are mostly deterministic, but a small amount of variation is still possible. If the model returns a response that’s too generic, too short, or the model gives a fallback response, try increasing the temperature`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`2`})]}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-1`,children:_jsx(_components.p,{children:`Optional. Configuration for thinking features. Thinking is a process where the model breaks down a complex task into smaller steps to generate a higher-quality response.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-1`,children:_jsx(_components.p,{children:`Optional. If true, the model will include its thoughts in the response.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingBudget`,type:`integer`,id:`param-generation-config-thinking-config-thinking-budget-1`,children:_jsx(_components.p,{children:`Optional. The token budget for the model’s thinking process. The model will make a best effort to stay within this budget.`})}),_jsxs(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-1`,children:[_jsx(_components.p,{children:`Optional. The thinking level for the model.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`THINKING_LEVEL_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`XHIGH`})]})]}),_jsxs(ParamField,{body:`generationConfig.topK`,type:`integer`,default:`40`,id:`param-generation-config-top-k-1`,children:[_jsx(_components.p,{children:`Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model’s vocabulary. A top-K of 3 means that the next token is selected from among the 3 most probable tokens by using temperature.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`1`}),` to `,_jsx(_components.code,{children:`…`})]})]}),_jsxs(ParamField,{body:`generationConfig.topP`,type:`number`,default:`0.95`,id:`param-generation-config-top-p-1`,children:[_jsx(_components.p,{children:`If specified, nucleus sampling is used.\nTop-P changes how the model selects tokens for output. Tokens are selected from the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.\nSpecify a lower value for less random responses and a higher value for more random responses.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`1`})]}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`safetySettings`,type:`object[]`,id:`param-safety-settings-1`,children:_jsx(_components.p,{children:`Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.`})}),_jsx(ParamField,{body:`safetySettings[].category`,type:`string`,required:true,id:`param-safety-settings-category-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsx(ParamField,{body:`safetySettings[].threshold`,type:`string`,required:true,id:`param-safety-settings-threshold-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`OFF`}),`, `,_jsx(_components.code,{children:`BLOCK_NONE`}),`, `,_jsx(_components.code,{children:`BLOCK_LOW_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_MEDIUM_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_ONLY_HIGH`})]})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-1`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,required:true,id:`param-system-instruction-parts-1`,children:_jsx(_components.p,{children:`A list of ordered parts that make up a single message. Different parts may have different IANA MIME types. For limits on the inputs, such as the maximum number of tokens or the number of images, see the model specifications on the Google models page.`})}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-1`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsxs(ParamField,{body:`systemInstruction.role`,type:`string`,id:`param-system-instruction-role-1`,children:[_jsx(_components.p,{children:`The identity of the entity that creates the message. The following values are supported: user: This indicates that the message is sent by a real person, typically a user-generated message. model: This indicates that the message is generated by the model. The model value is used to insert messages from the model into the conversation during multi-turn conversations. For non-multi-turn conversations, this field can be left blank or unset.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-1`,children:_jsx(_components.p,{children:`A piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. See Function calling.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,required:true,id:`param-tools-function-declarations-name-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-1`,children:_jsx(_components.p,{children:`JSON schema for the function parameters`})}),_jsx(ParamField,{body:`uploadImagesToStorage`,type:`boolean`,id:`param-upload-images-to-storage-1`,children:_jsx(_components.p,{children:`If true, generated images will be uploaded to cloud storage and returned as signed URLs instead of inline base64 data. The URLs expire after 24 hours.`})}),_jsx(ParamField,{body:`videoMetadata`,type:`object`,id:`param-video-metadata-1`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ParamField,{body:`videoMetadata.endOffset`,type:`object`,id:`param-video-metadata-end-offset-1`,children:_jsx(_components.p,{children:`Represents a duration offset for video timeline positions.`})}),_jsxs(ParamField,{body:`videoMetadata.endOffset.nanos`,type:`integer`,id:`param-video-metadata-end-offset-nanos-1`,children:[_jsx(_components.p,{children:`Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.endOffset.seconds`,type:`integer`,id:`param-video-metadata-end-offset-seconds-1`,children:[_jsx(_components.p,{children:`Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`-315576000000`}),` to `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsx(ParamField,{body:`videoMetadata.startOffset`,type:`object`,id:`param-video-metadata-start-offset-1`,children:_jsx(_components.p,{children:`Represents a duration offset for video timeline positions.`})}),_jsxs(ParamField,{body:`videoMetadata.startOffset.nanos`,type:`integer`,id:`param-video-metadata-start-offset-nanos-1`,children:[_jsx(_components.p,{children:`Signed fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.startOffset.seconds`,type:`integer`,id:`param-video-metadata-start-offset-seconds-1`,children:[_jsx(_components.p,{children:`Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`-315576000000`}),` to `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsxs(_components.p,{children:[`Generated from the schema Router serves at `,_jsx(_components.code,{children:`GET /v2/models/vertexai/gemini-3.5-flash/openapi.json`}),`, the same document it validates a call against before the request reaches the provider.`]}),_jsx(Heading,{level:`3`,id:`output-3`,children:`Output`}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata`,type:`object`,id:`param-candidates-citation-metadata-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations`,type:`object[]`,id:`param-candidates-citation-metadata-citations-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].authors`,type:`string[]`,id:`param-candidates-citation-metadata-citations-authors-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].endIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-end-index-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].license`,type:`string`,id:`param-candidates-citation-metadata-citations-license-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].publicationDate`,type:`string (date)`,id:`param-candidates-citation-metadata-citations-publication-date-1`,children:_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`date`})]})}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].startIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-start-index-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].title`,type:`string`,id:`param-candidates-citation-metadata-citations-title-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].uri`,type:`string`,id:`param-candidates-citation-metadata-citations-uri-1`}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-1`,children:_jsx(_components.p,{children:`The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and the latest request.`})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,required:true,id:`param-candidates-content-parts-1`}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData`,type:`object`,id:`param-candidates-content-parts-file-data-1`,children:_jsx(_components.p,{children:`URI based data.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData.fileUri`,type:`string`,id:`param-candidates-content-parts-file-data-file-uri-1`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].fileData.mimeType`,type:`string`,id:`param-candidates-content-parts-file-data-mime-type-1`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].inlineData`,type:`object`,id:`param-candidates-content-parts-inline-data-1`,children:_jsx(_components.p,{children:`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.`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.data`,type:`string (byte)`,id:`param-candidates-content-parts-inline-data-data-1`,children:[_jsx(_components.p,{children:`The base64 encoding of the image, PDF, or video to include inline in the prompt. When including media inline, you must also specify the media type (mimeType) of the data. Size limit: 20MB`}),_jsxs(_components.p,{children:[`Format: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.mimeType`,type:`string`,id:`param-candidates-content-parts-inline-data-mime-type-1`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].mediaProcessing`,type:`string`,id:`param-candidates-content-parts-media-processing-1`,children:_jsx(_components.p,{children:`How the model reads this part’s video. Set “AGENTIC” to let the model decide which segments to inspect, instead of fixed-rate frame sampling. Omit for the default fixed-rate sampling. Supported on gemini-3.7-flash and newer Flash models.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-1`,children:_jsx(_components.p,{children:`A text prompt or code snippet.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].thought`,type:`boolean`,id:`param-candidates-content-parts-thought-1`,children:_jsx(_components.p,{children:`Indicates this part is a thinking/reasoning step from the model.`})}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-1`}),_jsx(ResponseField,{name:`candidates[].safetyRatings`,type:`object[]`,id:`param-candidates-safety-ratings-1`}),_jsx(ResponseField,{name:`candidates[].safetyRatings[].category`,type:`string`,id:`param-candidates-safety-ratings-category-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`candidates[].safetyRatings[].probability`,type:`string`,id:`param-candidates-safety-ratings-probability-1`,children:[_jsx(_components.p,{children:`The probability that the content violates the specified safety category`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`createTime`,type:`string`,id:`param-create-time-1`,children:_jsx(_components.p,{children:`Timestamp when the response was created.`})}),_jsx(ResponseField,{name:`modelVersion`,type:`string`,id:`param-model-version-1`,children:_jsx(_components.p,{children:`The model version used to generate the response.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-1`}),_jsx(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-1`}),_jsx(ResponseField,{name:`promptFeedback.blockReasonMessage`,type:`string`,id:`param-prompt-feedback-block-reason-message-1`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings`,type:`object[]`,id:`param-prompt-feedback-safety-ratings-1`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings[].category`,type:`string`,id:`param-prompt-feedback-safety-ratings-category-1`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`promptFeedback.safetyRatings[].probability`,type:`string`,id:`param-prompt-feedback-safety-ratings-probability-1`,children:[_jsx(_components.p,{children:`The probability that the content violates the specified safety category`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`responseId`,type:`string`,id:`param-response-id-1`,children:_jsx(_components.p,{children:`Unique identifier for the response.`})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-1`}),_jsx(ResponseField,{name:`usageMetadata.cachedContentTokenCount`,type:`integer`,id:`param-usage-metadata-cached-content-token-count-1`,children:_jsx(_components.p,{children:`Output only. Number of tokens in the cached part in the input (the cached content).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens in the response(s).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails`,type:`object[]`,id:`param-usage-metadata-candidates-tokens-details-1`,children:_jsx(_components.p,{children:`Breakdown of candidate tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-candidates-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-candidates-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-1`,children:_jsx(_components.p,{children:`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.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails`,type:`object[]`,id:`param-usage-metadata-prompt-tokens-details-1`,children:_jsx(_components.p,{children:`Breakdown of prompt tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.promptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-prompt-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-prompt-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.thoughtsTokenCount`,type:`integer`,id:`param-usage-metadata-thoughts-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens present in thoughts output.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens present in tool-use prompt(s).`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails`,type:`object[]`,id:`param-usage-metadata-tool-use-prompt-tokens-details-1`,children:_jsx(_components.p,{children:`Breakdown of tool-use prompt tokens by modality.`})}),_jsxs(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-tool-use-prompt-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Type of input or output content modality.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Number of tokens for the given modality.`})}),_jsx(ResponseField,{name:`usageMetadata.totalTokenCount`,type:`integer`,id:`param-usage-metadata-total-token-count-1`,children:_jsx(_components.p,{children:`Total number of tokens (prompt + candidates).`})}),_jsx(ResponseField,{name:`usageMetadata.trafficType`,type:`string`,id:`param-usage-metadata-traffic-type-1`,children:_jsx(_components.p,{children:`Traffic type used for the request (e.g., PROVISIONED_THROUGHPUT).`})}),_jsx(Heading,{level:`2`,id:`examples-2`,children:`Examples`}),_jsx(Heading,{level:`3`,id:`input-4`,children:`Input`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`output-4`,children:`Output`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Gemini 2.5 Pro`,id:`gemini-2-5-pro`,\"data-child-tab-ids\":`[\"wait-for-the-result-3\",\"queue-and-collect-later-3\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Model ID:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-2.5-pro`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Wait for the result`,id:`wait-for-the-result-3`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Queue and collect later`,id:`queue-and-collect-later-3`,children:[_jsxs(_components.p,{children:[`The same body, sent to `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests`}),`. Router answers `,_jsx(_components.code,{children:`201`}),` with a `,_jsx(_components.code,{children:`request_id`}),` as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. `,_jsx(_components.a,{href:`/development/comfy-router/queue`,children:`Queued delivery`}),` walks through status, cancellation and collection.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # The provider's own payload, the same value models.run() returns.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # A request that failed or was cancelled raises the typed Router error here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The same result models.run() returns. A request that failed or was cancelled rejects here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`schema-3`,children:`Schema`}),_jsx(Heading,{level:`3`,id:`input-5`,children:`Input`}),_jsx(_components.p,{children:_jsx(_components.em,{children:`Fields follow Google’s published API specification and are checked against it in CI. Router’s own schema for this model is not published yet, so requests are forwarded to the provider unvalidated.`})}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-2`,children:_jsxs(_components.p,{children:[`The conversation so far, oldest first. A part is `,_jsx(_components.code,{children:`text`}),`, or `,_jsx(_components.code,{children:`inlineData`}),` to send an image, audio or video alongside the prompt.`]})}),_jsxs(ParamField,{body:`contents[].role`,type:`string`,required:true,id:`param-contents-role-2`,children:[_jsx(_components.p,{children:`Who authored the turn.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-2`,children:_jsx(_components.p,{children:`The turn’s content parts.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-2`,children:_jsx(_components.p,{children:`A text part.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-2`,children:_jsx(_components.p,{children:`An inline media part.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-2`,children:_jsxs(_components.p,{children:[`Media type, for example `,_jsx(_components.code,{children:`image/png`}),`.`]})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string`,id:`param-contents-parts-inline-data-data-2`,children:_jsx(_components.p,{children:`Base64-encoded media bytes.`})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-2`,children:_jsx(_components.p,{children:`System prompt applied to the whole conversation.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,id:`param-system-instruction-parts-2`}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-2`}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-2`,children:_jsx(_components.p,{children:`Sampling and length settings.`})}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,id:`param-generation-config-temperature-2`,children:[_jsx(_components.p,{children:`Randomness of sampling. Defaults are model specific.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`2`})]})]}),_jsx(ParamField,{body:`generationConfig.topP`,type:`number`,id:`param-generation-config-top-p-2`,children:_jsx(_components.p,{children:`Nucleus sampling threshold. Defaults are model specific.`})}),_jsx(ParamField,{body:`generationConfig.topK`,type:`integer`,id:`param-generation-config-top-k-2`,children:_jsx(_components.p,{children:`Top-k sampling cutoff. Defaults are model specific.`})}),_jsx(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-2`,children:_jsx(_components.p,{children:`Upper bound on generated tokens.`})}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-2`,children:_jsx(_components.p,{children:`Seed for reproducible sampling.`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-2`,children:_jsx(_components.p,{children:`Strings that end generation when produced.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-2`,children:_jsx(_components.p,{children:`Reasoning effort controls on models that support it.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-2`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`})]})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-2`,children:_jsx(_components.p,{children:`Return the model’s reasoning alongside the answer.`})}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-2`,children:_jsx(_components.p,{children:`Function declarations the model may call.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,id:`param-tools-function-declarations-name-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-2`,children:_jsx(_components.p,{children:`JSON Schema for the function’s arguments.`})}),_jsx(Heading,{level:`3`,id:`output-5`,children:`Output`}),_jsxs(_components.p,{children:[`Router returns Google’s native response unchanged. The text is at `,_jsx(_components.code,{children:`candidates[0].content.parts[0].text`}),`.`]}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-2`,children:_jsx(_components.p,{children:`Generated candidates; one unless you asked for more.`})}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-2`}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-2`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,id:`param-candidates-content-parts-2`}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-2`,children:_jsx(_components.p,{children:`The generated text.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall`,type:`object`,id:`param-candidates-content-parts-function-call`,children:_jsxs(_components.p,{children:[`Present when the model chose to call one of your `,_jsx(_components.code,{children:`tools`}),`.`]})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.name`,type:`string`,id:`param-candidates-content-parts-function-call-name`}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.args`,type:`object`,id:`param-candidates-content-parts-function-call-args`}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-2`,children:_jsxs(_components.p,{children:[`Why generation stopped: `,_jsx(_components.code,{children:`STOP`}),`, `,_jsx(_components.code,{children:`MAX_TOKENS`}),`, `,_jsx(_components.code,{children:`SAFETY`}),`, …`]})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-2`,children:_jsx(_components.p,{children:`Token accounting for the call.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-2`,children:_jsx(_components.p,{children:`Tokens in the prompt.`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-2`,children:_jsx(_components.p,{children:`Tokens in the generated candidates.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-2`,children:_jsxs(_components.p,{children:[`Present when the prompt itself was blocked. Check whether `,_jsx(_components.code,{children:`candidates`}),` is present before reading the result; `,_jsx(_components.code,{children:`usageMetadata`}),` can also appear on a blocked response.`]})}),_jsxs(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-2`,children:[_jsx(_components.p,{children:`Why the prompt was blocked. No candidates are returned; rephrase the prompt and retry.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`SAFETY`}),`, `,_jsx(_components.code,{children:`OTHER`}),`, `,_jsx(_components.code,{children:`BLOCKLIST`}),`, `,_jsx(_components.code,{children:`PROHIBITED_CONTENT`}),`, `,_jsx(_components.code,{children:`IMAGE_SAFETY`})]})]}),_jsx(Heading,{level:`2`,id:`examples-3`,children:`Examples`}),_jsx(Heading,{level:`3`,id:`input-6`,children:`Input`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`output-6`,children:`Output`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Gemini 2.5 Flash`,id:`gemini-2-5-flash`,\"data-child-tab-ids\":`[\"wait-for-the-result-4\",\"queue-and-collect-later-4\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Model ID:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-2.5-flash`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Wait for the result`,id:`wait-for-the-result-4`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The SDK automatically creates an idempotency key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Queue and collect later`,id:`queue-and-collect-later-4`,children:[_jsxs(_components.p,{children:[`The same body, sent to `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests`}),`. Router answers `,_jsx(_components.code,{children:`201`}),` with a `,_jsx(_components.code,{children:`request_id`}),` as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. `,_jsx(_components.a,{href:`/development/comfy-router/queue`,children:`Queued delivery`}),` walks through status, cancellation and collection.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # The provider's own payload, the same value models.run() returns.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # A request that failed or was cancelled raises the typed Router error here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads COMFY_API_KEY from the environment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }[] } }[] };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` generationConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// with the model ID, all another process needs`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Poll until the request completes, waiting the Retry-After the server names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The same result models.run() returns. A request that failed or was cancelled rejects here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`schema-4`,children:`Schema`}),_jsx(Heading,{level:`3`,id:`input-7`,children:`Input`}),_jsx(_components.p,{children:_jsx(_components.em,{children:`Fields follow Google’s published API specification and are checked against it in CI. Router’s own schema for this model is not published yet, so requests are forwarded to the provider unvalidated.`})}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-3`,children:_jsxs(_components.p,{children:[`The conversation so far, oldest first. A part is `,_jsx(_components.code,{children:`text`}),`, or `,_jsx(_components.code,{children:`inlineData`}),` to send an image, audio or video alongside the prompt.`]})}),_jsxs(ParamField,{body:`contents[].role`,type:`string`,required:true,id:`param-contents-role-3`,children:[_jsx(_components.p,{children:`Who authored the turn.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-3`,children:_jsx(_components.p,{children:`The turn’s content parts.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-3`,children:_jsx(_components.p,{children:`A text part.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-3`,children:_jsx(_components.p,{children:`An inline media part.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-3`,children:_jsxs(_components.p,{children:[`Media type, for example `,_jsx(_components.code,{children:`image/png`}),`.`]})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string`,id:`param-contents-parts-inline-data-data-3`,children:_jsx(_components.p,{children:`Base64-encoded media bytes.`})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-3`,children:_jsx(_components.p,{children:`System prompt applied to the whole conversation.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,id:`param-system-instruction-parts-3`}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-3`}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-3`,children:_jsx(_components.p,{children:`Sampling and length settings.`})}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,id:`param-generation-config-temperature-3`,children:[_jsx(_components.p,{children:`Randomness of sampling. Defaults are model specific.`}),_jsxs(_components.p,{children:[`Range: `,_jsx(_components.code,{children:`0`}),` to `,_jsx(_components.code,{children:`2`})]})]}),_jsx(ParamField,{body:`generationConfig.topP`,type:`number`,id:`param-generation-config-top-p-3`,children:_jsx(_components.p,{children:`Nucleus sampling threshold. Defaults are model specific.`})}),_jsx(ParamField,{body:`generationConfig.topK`,type:`integer`,id:`param-generation-config-top-k-3`,children:_jsx(_components.p,{children:`Top-k sampling cutoff. Defaults are model specific.`})}),_jsx(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-3`,children:_jsx(_components.p,{children:`Upper bound on generated tokens.`})}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-3`,children:_jsx(_components.p,{children:`Seed for reproducible sampling.`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-3`,children:_jsx(_components.p,{children:`Strings that end generation when produced.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-3`,children:_jsx(_components.p,{children:`Reasoning effort controls on models that support it.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-3`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`})]})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-3`,children:_jsx(_components.p,{children:`Return the model’s reasoning alongside the answer.`})}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-3`,children:_jsx(_components.p,{children:`Function declarations the model may call.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,id:`param-tools-function-declarations-name-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-3`,children:_jsx(_components.p,{children:`JSON Schema for the function’s arguments.`})}),_jsx(Heading,{level:`3`,id:`output-7`,children:`Output`}),_jsxs(_components.p,{children:[`Router returns Google’s native response unchanged. The text is at `,_jsx(_components.code,{children:`candidates[0].content.parts[0].text`}),`.`]}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-3`,children:_jsx(_components.p,{children:`Generated candidates; one unless you asked for more.`})}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-3`}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-3`,children:_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,id:`param-candidates-content-parts-3`}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-3`,children:_jsx(_components.p,{children:`The generated text.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall`,type:`object`,id:`param-candidates-content-parts-function-call-1`,children:_jsxs(_components.p,{children:[`Present when the model chose to call one of your `,_jsx(_components.code,{children:`tools`}),`.`]})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.name`,type:`string`,id:`param-candidates-content-parts-function-call-name-1`}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.args`,type:`object`,id:`param-candidates-content-parts-function-call-args-1`}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-3`,children:_jsxs(_components.p,{children:[`Why generation stopped: `,_jsx(_components.code,{children:`STOP`}),`, `,_jsx(_components.code,{children:`MAX_TOKENS`}),`, `,_jsx(_components.code,{children:`SAFETY`}),`, …`]})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-3`,children:_jsx(_components.p,{children:`Token accounting for the call.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-3`,children:_jsx(_components.p,{children:`Tokens in the prompt.`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-3`,children:_jsx(_components.p,{children:`Tokens in the generated candidates.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-3`,children:_jsxs(_components.p,{children:[`Present when the prompt itself was blocked. Check whether `,_jsx(_components.code,{children:`candidates`}),` is present before reading the result; `,_jsx(_components.code,{children:`usageMetadata`}),` can also appear on a blocked response.`]})}),_jsxs(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-3`,children:[_jsx(_components.p,{children:`Why the prompt was blocked. No candidates are returned; rephrase the prompt and retry.`}),_jsxs(_components.p,{children:[`Possible values: `,_jsx(_components.code,{children:`SAFETY`}),`, `,_jsx(_components.code,{children:`OTHER`}),`, `,_jsx(_components.code,{children:`BLOCKLIST`}),`, `,_jsx(_components.code,{children:`PROHIBITED_CONTENT`}),`, `,_jsx(_components.code,{children:`IMAGE_SAFETY`})]})]}),_jsx(Heading,{level:`2`,id:`examples-4`,children:`Examples`}),_jsx(Heading,{level:`3`,id:`input-8`,children:`Input`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`output-8`,children:`Output`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-ship`,children:`Before you ship`}),`\n`,_jsxs(_components.p,{children:[`The SDKs create an `,_jsx(_components.code,{children:`Idempotency-Key`}),` and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes.`]}),`\n`,_jsxs(_components.p,{children:[`When a request fails, Router sends an `,_jsx(_components.code,{children:`X-Comfy-Error-Type`}),` response header explaining why. A `,_jsx(_components.code,{children:`422`}),` means Router rejected the input before calling the provider, and a `,_jsx(_components.code,{children:`413`}),` means the request body was larger than Router accepts. Download generated assets promptly because `,_jsx(_components.a,{href:`/development/comfy-router/reference#result-assets`,children:`result URLs can expire`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Any size limit named in a field description above is the provider’s own bound on that field, quoted from the provider’s specification. Router applies a separate cap to the whole request body, which base64-encoded media counts against: see `,_jsx(_components.a,{href:`/development/comfy-router/limitations#request-bodies-are-capped`,children:`request body size`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This page documents one partner model called through Comfy Router. The same `,_jsx(_components.code,{children:`comfy-sdk`}),` / `,_jsx(_components.code,{children:`@comfyorg/sdk`}),` package also ships a second client, for running a whole ComfyUI workflow graph on Comfy Cloud: `,_jsx(_components.code,{children:`Comfy(api_key=...)`}),` / `,_jsx(_components.code,{children:`new Comfy({ apiKey })`}),`, with `,_jsx(_components.code,{children:`client.workflows`}),`, `,_jsx(_components.code,{children:`client.assets`}),` and `,_jsx(_components.code,{children:`client.jobs`}),`. See `,_jsx(_components.a,{href:`/development/api-development/sdks`,children:`Comfy SDKs`}),`.`]}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`Headers`,icon:`list`,href:`/development/comfy-router/headers`,children:_jsx(_components.p,{children:`Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.`})}),_jsx(Card,{title:`Using the Router API`,icon:`code`,href:`/development/comfy-router/api`,children:_jsx(_components.p,{children:`Model discovery, validation errors, retries, and billing.`})}),_jsx(Card,{title:`Limitations`,icon:`triangle-exclamation`,href:`/development/comfy-router/limitations`,children:_jsx(_components.p,{children:`What Router does not do today, and what to use instead.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Use Google Gemini with Comfy Router","description":"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape","sidebarTitle":"Google Gemini","href":"/development/comfy-router/models/google/gemini/code"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick start","slug":"quick-start","depth":2,"children":[]},{"title":"Schema","slug":"schema","depth":2,"children":[{"title":"Input","slug":"input","depth":3,"children":[],"tabId":"gemini-3-1-pro"},{"title":"Output","slug":"output","depth":3,"children":[],"tabId":"gemini-3-1-pro"}],"tabId":"gemini-3-1-pro"},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Input","slug":"input-2","depth":3,"children":[],"tabId":"gemini-3-1-pro"},{"title":"Output","slug":"output-2","depth":3,"children":[],"tabId":"gemini-3-1-pro"}],"tabId":"gemini-3-1-pro"},{"title":"Schema","slug":"schema-2","depth":2,"children":[{"title":"Input","slug":"input-3","depth":3,"children":[],"tabId":"gemini-3-5-flash"},{"title":"Output","slug":"output-3","depth":3,"children":[],"tabId":"gemini-3-5-flash"}],"tabId":"gemini-3-5-flash"},{"title":"Examples","slug":"examples-2","depth":2,"children":[{"title":"Input","slug":"input-4","depth":3,"children":[],"tabId":"gemini-3-5-flash"},{"title":"Output","slug":"output-4","depth":3,"children":[],"tabId":"gemini-3-5-flash"}],"tabId":"gemini-3-5-flash"},{"title":"Schema","slug":"schema-3","depth":2,"children":[{"title":"Input","slug":"input-5","depth":3,"children":[],"tabId":"gemini-2-5-pro"},{"title":"Output","slug":"output-5","depth":3,"children":[],"tabId":"gemini-2-5-pro"}],"tabId":"gemini-2-5-pro"},{"title":"Examples","slug":"examples-3","depth":2,"children":[{"title":"Input","slug":"input-6","depth":3,"children":[],"tabId":"gemini-2-5-pro"},{"title":"Output","slug":"output-6","depth":3,"children":[],"tabId":"gemini-2-5-pro"}],"tabId":"gemini-2-5-pro"},{"title":"Schema","slug":"schema-4","depth":2,"children":[{"title":"Input","slug":"input-7","depth":3,"children":[],"tabId":"gemini-2-5-flash"},{"title":"Output","slug":"output-7","depth":3,"children":[],"tabId":"gemini-2-5-flash"}],"tabId":"gemini-2-5-flash"},{"title":"Examples","slug":"examples-4","depth":2,"children":[{"title":"Input","slug":"input-8","depth":3,"children":[],"tabId":"gemini-2-5-flash"},{"title":"Output","slug":"output-8","depth":3,"children":[],"tabId":"gemini-2-5-flash"}],"tabId":"gemini-2-5-flash"},{"title":"Before you ship","slug":"before-you-ship","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dripart/9d6bf2b2531e904c/giscus-comments.js","/_mintlify/custom/dripart/bd0341946f3c75a6/syft.js","/_mintlify/custom/dripart/042392a43b5e681e/samples-cards.js"],"subdomain":"dripart","siteName":"ComfyUI","title":"Use Google Gemini with Comfy Router - ComfyUI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/development/comfy-router/models/google/gemini/code","matchLevel":0},"zh":{"href":"/zh/development/comfy-router/models/google/gemini/code","matchLevel":1},"ja":{"href":"/ja/development/comfy-router/models/google/gemini/code","matchLevel":1},"ko":{"href":"/ko/development/comfy-router/models/google/gemini/code","matchLevel":1},"es":{"href":"/es/development/comfy-router/models/google/gemini/code","matchLevel":1}}},"lastModified":"2026-11-13T14:01:35.531Z","originalFileLocation":"development/comfy-router/models/google/gemini/code.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\">\u003cmeta data-mint-head name=\"application-name\" content=\"ComfyUI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Use Google Gemini with Comfy Router - ComfyUI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ComfyUI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dripart.mintlify.site/_mintlify/api/og/v2?division=Google\u0026amp;title=Use+Google+Gemini+with+Comfy+Router\u0026amp;description=Python%2C+TypeScript+and+cURL+snippets+for+calling+Google+Gemini+text+models+over+HTTP+through+Comfy+Router%2C+plus+the+request+fields+and+the+result+shape\u0026amp;theme=b252c39adf72ba65053766a0\u0026amp;signature=4f002be902c14a74b0f17d1b64baac50b551b34480fd0075090f400c7ad9473a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Use Google Gemini with Comfy Router - ComfyUI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dripart.mintlify.site/_mintlify/api/og/v2?division=Google\u0026amp;title=Use+Google+Gemini+with+Comfy+Router\u0026amp;description=Python%2C+TypeScript+and+cURL+snippets+for+calling+Google+Gemini+text+models+over+HTTP+through+Comfy+Router%2C+plus+the+request+fields+and+the+result+shape\u0026amp;theme=b252c39adf72ba65053766a0\u0026amp;signature=4f002be902c14a74b0f17d1b64baac50b551b34480fd0075090f400c7ad9473a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ComfyUI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#49378B\">\u003cmeta data-mint-head name=\"googlebot\" content=\"max-video-preview:0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/development/comfy-router/models/google/gemini/code.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.comfy.org/zh/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.comfy.org/ja/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.comfy.org/ko/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.comfy.org/es/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.comfy.org/#organization\",\"name\":\"ComfyUI\",\"url\":\"https://docs.comfy.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dripart/WCFdTagRdhtvk9-o/logo/light.svg?fit=max\u0026auto=format\u0026n=WCFdTagRdhtvk9-o\u0026q=85\u0026s=ec112de87239058f5a931a7e4b594965\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.comfy.org#website\",\"name\":\"ComfyUI\",\"url\":\"https://docs.comfy.org\",\"publisher\":{\"@id\":\"https://docs.comfy.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code#webpage\",\"url\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\",\"name\":\"Use Google Gemini with Comfy Router\",\"description\":\"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\",\"dateModified\":\"2026-11-13T14:01:35.531Z\",\"isPartOf\":{\"@id\":\"https://docs.comfy.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Models\",\"item\":\"https://docs.comfy.org/development/comfy-router/models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"All Models\",\"item\":\"https://docs.comfy.org/development/comfy-router/models/anthropic/claude-fable-5-1/code\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Google\",\"item\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini-2-5-flash-image/code\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Use Google Gemini with Comfy Router\",\"item\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code#article\",\"headline\":\"Use Google Gemini with Comfy Router\",\"name\":\"Use Google Gemini with Comfy Router\",\"description\":\"Python, TypeScript and cURL snippets for calling Google Gemini text models over HTTP through Comfy Router, plus the request fields and the result shape\",\"url\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\",\"mainEntityOfPage\":{\"@id\":\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code#webpage\"},\"dateModified\":\"2026-11-13T14:01:35.531Z\",\"publisher\":{\"@id\":\"https://docs.comfy.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.comfy.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ComfyUI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ComfyUI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/development/comfy-router/models/google/gemini/code.md","siteName":"ComfyUI","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Getting started","pages":[{"title":"Getting started","href":""}]},{"tab":"Tutorials","pages":[{"title":"Tutorials","href":"/basic-concepts/workflow"}]},{"tab":"Comfy Router","pages":[{"title":"Comfy Router quickstart","sidebarTitle":"Quickstart","href":"/development/comfy-router/quickstart"},{"group":"Router API","pages":[{"title":"Comfy Router API overview","sidebarTitle":"Overview","href":"/development/comfy-router/api"},{"title":"Discover Comfy Router models","sidebarTitle":"Discover models","href":"/development/comfy-router/discover-models"},{"title":"Comfy Router model schemas and results","sidebarTitle":"Schemas and results","href":"/development/comfy-router/schemas"},{"title":"Queue Comfy Router requests","sidebarTitle":"Queued requests","href":"/development/comfy-router/queue"},{"title":"Comfy Router errors and retries","sidebarTitle":"Errors and retries","href":"/development/comfy-router/errors"},{"title":"Comfy Router billing","sidebarTitle":"Billing","href":"/development/comfy-router/billing"},{"title":"Using Comfy Router with LiteLLM","sidebarTitle":"LiteLLM","href":"/development/comfy-router/litellm"},{"title":"Comfy Router realtime models","sidebarTitle":"Realtime models","href":"/development/comfy-router/realtime"},{"title":"Kling 4.0 elements and voices in Comfy Router","sidebarTitle":"Kling 4.0 elements and voices","href":"/development/comfy-router/kling-4-0-elements-voices"}]},{"group":"Reference","pages":[{"title":"Comfy Router API reference","sidebarTitle":"API Reference","href":"/development/comfy-router/reference"},{"title":"Comfy Router headers","sidebarTitle":"Headers","href":"/development/comfy-router/headers"},{"title":"Comfy Router capabilities and limits","sidebarTitle":"Capabilities and limits","href":"/development/comfy-router/limitations"},{"group":"API Reference","pages":[{"group":"Comfy Router","pages":[{"title":"List the models Comfy Router can run.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models","href":"/api-reference/router/comfy-router/list-the-models-comfy-router-can-run"},{"title":"Read one partner model's catalog entry by canonical model ID.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}","href":"/api-reference/router/comfy-router/read-one-partner-models-catalog-entry-by-canonical-model-id"},{"title":"Run a partner model synchronously by canonical model ID.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}","href":"/api-reference/router/comfy-router/run-a-partner-model-synchronously-by-canonical-model-id"},{"title":"Price a model call before running it, without running it.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}/estimate","href":"/api-reference/router/comfy-router/price-a-model-call-before-running-it-without-running-it"},{"title":"Read one partner model's input and output schemas as an OpenAPI document.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/openapi.json","href":"/api-reference/router/comfy-router/read-one-partner-models-input-and-output-schemas-as-an-openapi-document"},{"title":"Submit a partner model run to the queue and return immediately.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}/requests","href":"/api-reference/router/comfy-router/submit-a-partner-model-run-to-the-queue-and-return-immediately"},{"title":"Collect the result of one submitted request.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/requests/{request_id}","href":"/api-reference/router/comfy-router/collect-the-result-of-one-submitted-request"},{"title":"Ask for one submitted request to be cancelled.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml put /v2/models/{provider}/{model}/requests/{request_id}/cancel","href":"/api-reference/router/comfy-router/ask-for-one-submitted-request-to-be-cancelled"},{"title":"Read the queue state of one submitted request.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/requests/{request_id}/status","href":"/api-reference/router/comfy-router/read-the-queue-state-of-one-submitted-request"}]}]}]},{"group":"Models","pages":[{"title":"Comfy Router models","sidebarTitle":"All models","href":"/development/comfy-router/models"},{"title":"Comfy Router pricing","sidebarTitle":"Pricing","href":"/development/comfy-router/pricing"},{"title":"Comfy Router serving providers","sidebarTitle":"Serving providers","href":"/development/comfy-router/providers"},{"group":"All Models","pages":[{"group":"Anthropic","pages":[{"title":"Use Claude Fable 5.1 with Comfy Router","sidebarTitle":"Claude Fable 5.1","href":"/development/comfy-router/models/anthropic/claude-fable-5-1/code"},{"title":"Use Claude Fable 5.2 with Comfy Router","sidebarTitle":"Claude Fable 5.2","href":"/development/comfy-router/models/anthropic/claude-fable-5-2/code"},{"title":"Use Claude Fable 5 with Comfy Router","sidebarTitle":"Claude Fable 5","href":"/development/comfy-router/models/anthropic/claude-fable-5/code"},{"title":"Use Claude Haiku 4.5 20251001 with Comfy Router","sidebarTitle":"Claude Haiku 4.5 20251001","href":"/development/comfy-router/models/anthropic/claude-haiku-4-5-20251001/code"},{"title":"Use Claude Opus 4.6 with Comfy Router","sidebarTitle":"Claude Opus 4.6","href":"/development/comfy-router/models/anthropic/claude-opus-4-6/code"},{"title":"Use Claude Opus 4.7 with Comfy Router","sidebarTitle":"Claude Opus 4.7","href":"/development/comfy-router/models/anthropic/claude-opus-4-7/code"},{"title":"Use Claude Opus 4.8 with Comfy Router","sidebarTitle":"Claude Opus 4.8","href":"/development/comfy-router/models/anthropic/claude-opus-4-8/code"},{"title":"Use Claude Opus 5.5 with Comfy Router","sidebarTitle":"Claude Opus 5.5","href":"/development/comfy-router/models/anthropic/claude-opus-5-5/code"},{"title":"Use Claude Opus 5 with Comfy Router","sidebarTitle":"Claude Opus 5","href":"/development/comfy-router/models/anthropic/claude-opus-5/code"},{"title":"Use Claude Sonnet 4.5 20250929 with Comfy Router","sidebarTitle":"Claude Sonnet 4.5 20250929","href":"/development/comfy-router/models/anthropic/claude-sonnet-4-5-20250929/code"},{"title":"Use Claude Sonnet 4.6 with Comfy Router","sidebarTitle":"Claude Sonnet 4.6","href":"/development/comfy-router/models/anthropic/claude-sonnet-4-6/code"},{"title":"Use Claude Sonnet 5.5 with Comfy Router","sidebarTitle":"Claude Sonnet 5.5","href":"/development/comfy-router/models/anthropic/claude-sonnet-5-5/code"},{"title":"Use Claude Sonnet 5 with Comfy Router","sidebarTitle":"Claude Sonnet 5","href":"/development/comfy-router/models/anthropic/claude-sonnet-5/code"}]},{"group":"Beeble","pages":[{"title":"Use SwitchX with Comfy Router","sidebarTitle":"SwitchX","href":"/development/comfy-router/models/beeble/switchx/code"}]},{"group":"Black Forest Labs","pages":[{"title":"Use Erase V1 with Comfy Router","sidebarTitle":"Erase V1","href":"/development/comfy-router/models/black-forest-labs/erase-v1/code"},{"title":"Use Flux 1.1 Pro Ultra Image with Comfy Router","sidebarTitle":"Flux 1.1 Pro Ultra Image","href":"/development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code"},{"title":"Use FLUX.1 Kontext with Comfy Router","sidebarTitle":"FLUX.1 Kontext","href":"/development/comfy-router/models/black-forest-labs/flux-1-kontext/code"},{"title":"Use FLUX 2 Max with Comfy Router","sidebarTitle":"FLUX 2 Max","href":"/development/comfy-router/models/black-forest-labs/flux-2-max/code"},{"title":"Use FLUX 2 Pro with Comfy Router","sidebarTitle":"FLUX 2 Pro","href":"/development/comfy-router/models/black-forest-labs/flux-2-pro/code"},{"title":"Use FLUX 3 Image with Comfy Router","sidebarTitle":"FLUX 3 Image","href":"/development/comfy-router/models/black-forest-labs/flux-3-image/code"},{"title":"Use FLUX 3 Video with Comfy Router","sidebarTitle":"FLUX 3 Video","href":"/development/comfy-router/models/black-forest-labs/flux-3-video/code"},{"title":"Use FLUX Pro 1.0 Expand with Comfy Router","sidebarTitle":"FLUX Pro 1.0 Expand","href":"/development/comfy-router/models/black-forest-labs/flux-pro-1-0-expand/code"},{"title":"Use FLUX Pro 1.0 Fill with Comfy Router","sidebarTitle":"FLUX Pro 1.0 Fill","href":"/development/comfy-router/models/black-forest-labs/flux-pro-1-0-fill/code"},{"title":"Use FLUX Video Upscale with Comfy Router","sidebarTitle":"FLUX Video Upscale","href":"/development/comfy-router/models/black-forest-labs/flux-video-upscale/code"},{"title":"Use Video Edit V1 with Comfy Router","sidebarTitle":"Video Edit V1","href":"/development/comfy-router/models/black-forest-labs/video-edit-v1/code"},{"title":"Use VTO V1 with Comfy Router","sidebarTitle":"VTO V1","href":"/development/comfy-router/models/black-forest-labs/vto-v1/code"}]},{"group":"Bria","pages":[{"title":"Use Fibo with Comfy Router","sidebarTitle":"Fibo","href":"/development/comfy-router/models/bria/fibo/code"},{"title":"Use Image Edit Add Object By Text with Comfy Router","sidebarTitle":"Image Edit Add Object By Text","href":"/development/comfy-router/models/bria/image-edit-add-object-by-text/code"},{"title":"Use Image Edit Erase By Text with Comfy Router","sidebarTitle":"Image Edit Erase By Text","href":"/development/comfy-router/models/bria/image-edit-erase-by-text/code"},{"title":"Use Image Edit Erase Foreground with Comfy Router","sidebarTitle":"Image Edit Erase Foreground","href":"/development/comfy-router/models/bria/image-edit-erase-foreground/code"},{"title":"Use Image Edit Erase with Comfy Router","sidebarTitle":"Image Edit Erase","href":"/development/comfy-router/models/bria/image-edit-erase/code"},{"title":"Use Image Edit Expand with Comfy Router","sidebarTitle":"Image Edit Expand","href":"/development/comfy-router/models/bria/image-edit-expand/code"},{"title":"Use Image Edit Gen Fill with Comfy Router","sidebarTitle":"Image Edit Gen Fill","href":"/development/comfy-router/models/bria/image-edit-gen-fill/code"},{"title":"Use Image Edit Increase Resolution with Comfy Router","sidebarTitle":"Image Edit Increase Resolution","href":"/development/comfy-router/models/bria/image-edit-increase-resolution/code"},{"title":"Use Image Edit Product Holding with Comfy Router","sidebarTitle":"Image Edit Product Holding","href":"/development/comfy-router/models/bria/image-edit-product-holding/code"},{"title":"Use Image Edit Product Virtual Tryon with Comfy Router","sidebarTitle":"Image Edit Product Virtual Tryon","href":"/development/comfy-router/models/bria/image-edit-product-virtual-tryon/code"},{"title":"Use Image Edit Relight with Comfy Router","sidebarTitle":"Image Edit Relight","href":"/development/comfy-router/models/bria/image-edit-relight/code"},{"title":"Use Image Edit Remove Background Guided with Comfy Router","sidebarTitle":"Image Edit Remove Background Guided","href":"/development/comfy-router/models/bria/image-edit-remove-background-guided/code"},{"title":"Use Image Edit Remove Background with Comfy Router","sidebarTitle":"Image Edit Remove Background","href":"/development/comfy-router/models/bria/image-edit-remove-background/code"},{"title":"Use Image Edit Replace Background with Comfy Router","sidebarTitle":"Image Edit Replace Background","href":"/development/comfy-router/models/bria/image-edit-replace-background/code"},{"title":"Use Image Edit Replace Object By Text with Comfy Router","sidebarTitle":"Image Edit Replace Object By Text","href":"/development/comfy-router/models/bria/image-edit-replace-object-by-text/code"},{"title":"Use Image Edit Reseason with Comfy Router","sidebarTitle":"Image Edit Reseason","href":"/development/comfy-router/models/bria/image-edit-reseason/code"},{"title":"Use Image Edit Restore with Comfy Router","sidebarTitle":"Image Edit Restore","href":"/development/comfy-router/models/bria/image-edit-restore/code"},{"title":"Use Image with Comfy Router","sidebarTitle":"Image","href":"/development/comfy-router/models/bria/image/code"},{"title":"Use Video Edit Erase with Comfy Router","sidebarTitle":"Video Edit Erase","href":"/development/comfy-router/models/bria/video-edit-erase/code"},{"title":"Use Video Edit Green Screen with Comfy Router","sidebarTitle":"Video Edit Green Screen","href":"/development/comfy-router/models/bria/video-edit-green-screen/code"},{"title":"Use Video Edit Remove Background with Comfy Router","sidebarTitle":"Video Edit Remove Background","href":"/development/comfy-router/models/bria/video-edit-remove-background/code"},{"title":"Use Video Edit Replace Background with Comfy Router","sidebarTitle":"Video Edit Replace Background","href":"/development/comfy-router/models/bria/video-edit-replace-background/code"}]},{"group":"BytePlus","pages":[{"title":"Use Dreamina Seedance 2.0 260128 with Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 260128","href":"/development/comfy-router/models/byteplus/dreamina-seedance-2-0-260128/code"},{"title":"Use Dreamina Seedance 2.0 Fast 260128 with Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 Fast 260128","href":"/development/comfy-router/models/byteplus/dreamina-seedance-2-0-fast-260128/code"},{"title":"Use Dreamina Seedance 2.0 Mini with Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 Mini","href":"/development/comfy-router/models/byteplus/dreamina-seedance-2-0-mini/code"},{"title":"Use Dreamina Seedance 2.5 260628 with Comfy Router","sidebarTitle":"Dreamina Seedance 2.5 260628","href":"/development/comfy-router/models/byteplus/dreamina-seedance-2-5-260628/code"},{"title":"Use Seed 2.0 Lite 260228 with Comfy Router","sidebarTitle":"Seed 2.0 Lite 260228","href":"/development/comfy-router/models/byteplus/seed-2-0-lite-260228/code"},{"title":"Use Seed 2.0 Mini 260215 with Comfy Router","sidebarTitle":"Seed 2.0 Mini 260215","href":"/development/comfy-router/models/byteplus/seed-2-0-mini-260215/code"},{"title":"Use Seed 2.0 Pro 260328 with Comfy Router","sidebarTitle":"Seed 2.0 Pro 260328","href":"/development/comfy-router/models/byteplus/seed-2-0-pro-260328/code"},{"title":"Use Seed Audio 1.0 Multilingual with Comfy Router","sidebarTitle":"Seed Audio 1.0 Multilingual","href":"/development/comfy-router/models/byteplus/seed-audio-1-0-multilingual/code"},{"title":"Use Seed Audio 1.0 with Comfy Router","sidebarTitle":"Seed Audio 1.0","href":"/development/comfy-router/models/byteplus/seed-audio-1-0/code"},{"title":"Use Seedance 1.0 Pro 250528 with Comfy Router","sidebarTitle":"Seedance 1.0 Pro 250528","href":"/development/comfy-router/models/byteplus/seedance-1-0-pro-250528/code"},{"title":"Use Seedance 1.0 Pro Fast 251015 with Comfy Router","sidebarTitle":"Seedance 1.0 Pro Fast 251015","href":"/development/comfy-router/models/byteplus/seedance-1-0-pro-fast-251015/code"},{"title":"Use Seedream 4.0 250828 with Comfy Router","sidebarTitle":"Seedream 4.0 250828","href":"/development/comfy-router/models/byteplus/seedream-4-0-250828/code"},{"title":"Use Seedream 4.5 251128 with Comfy Router","sidebarTitle":"Seedream 4.5 251128","href":"/development/comfy-router/models/byteplus/seedream-4-5-251128/code"},{"title":"Use Seedream 5.0 260128 with Comfy Router","sidebarTitle":"Seedream 5.0 260128","href":"/development/comfy-router/models/byteplus/seedream-5-0-260128/code"},{"title":"Use Seedream 5.0 Flash 260915 with Comfy Router","sidebarTitle":"Seedream 5.0 Flash 260915","href":"/development/comfy-router/models/byteplus/seedream-5-0-flash-260915/code"},{"title":"Use Seedream 5.0 Pro 260628 with Comfy Router","sidebarTitle":"Seedream 5.0 Pro 260628","href":"/development/comfy-router/models/byteplus/seedream-5-0-pro-260628/code"},{"title":"Use Seedream 5.5 261028 with Comfy Router","sidebarTitle":"Seedream 5.5 261028","href":"/development/comfy-router/models/byteplus/seedream-5-5-261028/code"}]},{"group":"Byteplusomnihuman","pages":[{"title":"Use Omnihuman 2.0 with Comfy Router","sidebarTitle":"Omnihuman 2.0","href":"/development/comfy-router/models/byteplusomnihuman/omnihuman-2-0/code"}]},{"group":"Elevenlabs","pages":[{"title":"Use Eleven Multilingual V2 with Comfy Router","sidebarTitle":"Eleven Multilingual V2","href":"/development/comfy-router/models/elevenlabs/eleven-multilingual-v2/code"},{"title":"Use Eleven Sfx V2 with Comfy Router","sidebarTitle":"Eleven Sfx V2","href":"/development/comfy-router/models/elevenlabs/eleven-sfx-v2/code"},{"title":"Use Eleven Sfx V3 with Comfy Router","sidebarTitle":"Eleven Sfx V3","href":"/development/comfy-router/models/elevenlabs/eleven-sfx-v3/code"},{"title":"Use Eleven V3 with Comfy Router","sidebarTitle":"Eleven V3","href":"/development/comfy-router/models/elevenlabs/eleven-v3/code"},{"title":"Use Eleven V4 Turbo with Comfy Router","sidebarTitle":"Eleven V4 Turbo","href":"/development/comfy-router/models/elevenlabs/eleven-v4-turbo/code"},{"title":"Use Eleven V4 with Comfy Router","sidebarTitle":"Eleven V4","href":"/development/comfy-router/models/elevenlabs/eleven-v4/code"}]},{"group":"fal","pages":[{"title":"Use Crystal Upscaler with Comfy Router","sidebarTitle":"Crystal Upscaler","href":"/development/comfy-router/models/fal/crystal-upscaler/code"},{"title":"Use Crystal Video Upscaler with Comfy Router","sidebarTitle":"Crystal Video Upscaler","href":"/development/comfy-router/models/fal/crystal-video-upscaler/code"},{"title":"Use FLUX 3 Max with Comfy Router","sidebarTitle":"FLUX 3 Max","href":"/development/comfy-router/models/fal/flux-3-max/code"},{"title":"Use H3 Max Turbo with Comfy Router","sidebarTitle":"H3 Max Turbo","href":"/development/comfy-router/models/fal/h3-max-turbo/code"},{"title":"Use H3 Max with Comfy Router","sidebarTitle":"H3 Max","href":"/development/comfy-router/models/fal/h3-max/code"},{"title":"Use Patina with Comfy Router","sidebarTitle":"Patina","href":"/development/comfy-router/models/fal/patina/code"}]},{"group":"Freepik","pages":[{"title":"Use AI Image Relight with Comfy Router","sidebarTitle":"AI Image Relight","href":"/development/comfy-router/models/freepik/ai-image-relight/code"},{"title":"Use AI Image Style Transfer with Comfy Router","sidebarTitle":"AI Image Style Transfer","href":"/development/comfy-router/models/freepik/ai-image-style-transfer/code"},{"title":"Use AI Image Upscaler Precision V2 with Comfy Router","sidebarTitle":"AI Image Upscaler Precision V2","href":"/development/comfy-router/models/freepik/ai-image-upscaler-precision-v2/code"},{"title":"Use AI Skin Enhancer Creative with Comfy Router","sidebarTitle":"AI Skin Enhancer Creative","href":"/development/comfy-router/models/freepik/ai-skin-enhancer-creative/code"},{"title":"Use AI Skin Enhancer Faithful with Comfy Router","sidebarTitle":"AI Skin Enhancer Faithful","href":"/development/comfy-router/models/freepik/ai-skin-enhancer-faithful/code"},{"title":"Use AI Skin Enhancer Flexible with Comfy Router","sidebarTitle":"AI Skin Enhancer Flexible","href":"/development/comfy-router/models/freepik/ai-skin-enhancer-flexible/code"}]},{"group":"Gemini Interactions","pages":[{"title":"Use Gemini Omni 1.1 Flash with Comfy Router","sidebarTitle":"Gemini Omni 1.1 Flash","href":"/development/comfy-router/models/gemini-interactions/gemini-omni-1-1-flash/code"},{"title":"Use Gemini Omni 1.2 Flash with Comfy Router","sidebarTitle":"Gemini Omni 1.2 Flash","href":"/development/comfy-router/models/gemini-interactions/gemini-omni-1-2-flash/code"},{"title":"Use Gemini Omni Flash Preview with Comfy Router","sidebarTitle":"Gemini Omni Flash Preview","href":"/development/comfy-router/models/gemini-interactions/gemini-omni-flash-preview/code"}]},{"group":"Google","pages":[{"title":"Use Gemini 2.5 Flash Image with Comfy Router","sidebarTitle":"Gemini 2.5 Flash Image","href":"/development/comfy-router/models/google/gemini-2-5-flash-image/code"},{"title":"Use Gemini 3.1 Flash Lite with Comfy Router","sidebarTitle":"Gemini 3.1 Flash Lite","href":"/development/comfy-router/models/google/gemini-3-1-flash-lite/code"},{"title":"Use Gemini 3.7 Flash with Comfy Router","sidebarTitle":"Gemini 3.7 Flash","href":"/development/comfy-router/models/google/gemini-3-7-flash/code"},{"title":"Use Gemini 3.8 Flash with Comfy Router","sidebarTitle":"Gemini 3.8 Flash","href":"/development/comfy-router/models/google/gemini-3-8-flash/code"},{"title":"Use Gemini 4 Argon with Comfy Router","sidebarTitle":"Gemini 4 Argon","href":"/development/comfy-router/models/google/gemini-4-argon/code"},{"title":"Use Gemini 4 Carbon with Comfy Router","sidebarTitle":"Gemini 4 Carbon","href":"/development/comfy-router/models/google/gemini-4-carbon/code"},{"title":"Use Gemini 4 Hydrogen with Comfy Router","sidebarTitle":"Gemini 4 Hydrogen","href":"/development/comfy-router/models/google/gemini-4-hydrogen/code"},{"title":"Use Gemini 4 Neon with Comfy Router","sidebarTitle":"Gemini 4 Neon","href":"/development/comfy-router/models/google/gemini-4-neon/code"},{"title":"Use Gemini Nano Banana 2.1 with Comfy Router","description":"Call vertexai/gemini-nano-banana-2.1 through Comfy Router: endpoint, request shape and the response Router returns.","sidebarTitle":"Gemini Nano Banana 2.1","href":"/development/comfy-router/models/google/gemini-nano-banana-2-1/code"},{"title":"Use Google Gemini with Comfy Router","sidebarTitle":"Google Gemini","href":"/development/comfy-router/models/google/gemini/code"},{"title":"Use Nano Banana 2 Lite with Comfy Router","description":"Python, TypeScript and cURL snippets for Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) image generation through Comfy Router, plus request fields","sidebarTitle":"Nano Banana 2 Lite","href":"/development/comfy-router/models/google/nano-banana-2-lite/code"},{"title":"Use Nano Banana 2 with Comfy Router","sidebarTitle":"Nano Banana 2","href":"/development/comfy-router/models/google/nano-banana-2/code"},{"title":"Use Nano Banana Pro with Comfy Router","sidebarTitle":"Nano Banana Pro","href":"/development/comfy-router/models/google/nano-banana-pro/code"}]},{"group":"HeyGen","pages":[{"title":"Use Starfish with Comfy Router","sidebarTitle":"Starfish","href":"/development/comfy-router/models/heygen/starfish/code"}]},{"group":"Higgsfield","pages":[{"title":"Use Higgsfield Genjutsu Motion Transfer V1.0 with Comfy Router","sidebarTitle":"Higgsfield Genjutsu Motion Transfer V1.0","href":"/development/comfy-router/models/higgsfield/higgsfield-genjutsu-motion-transfer-v1-0/code"},{"title":"Use Higgsfield Kling 3.4k with Comfy Router","sidebarTitle":"Higgsfield Kling 3.4k","href":"/development/comfy-router/models/higgsfield/higgsfield-kling-3-4k/code"},{"title":"Use Higgsfield Kling 3 Pro with Comfy Router","sidebarTitle":"Higgsfield Kling 3 Pro","href":"/development/comfy-router/models/higgsfield/higgsfield-kling-3-pro/code"}]},{"group":"Ideogram","pages":[{"title":"Use Ideogram 4.5 with Comfy Router","sidebarTitle":"Ideogram 4.5","href":"/development/comfy-router/models/ideogram/ideogram-4-5/code"},{"title":"Use Ideogram 4.6 with Comfy Router","sidebarTitle":"Ideogram 4.6","href":"/development/comfy-router/models/ideogram/ideogram-4-6/code"},{"title":"Use Ideogram V3 with Comfy Router","sidebarTitle":"Ideogram V3","href":"/development/comfy-router/models/ideogram/ideogram-v3/code"},{"title":"Use Ideogram 4.0 with Comfy Router","sidebarTitle":"Ideogram 4.0","href":"/development/comfy-router/models/ideogram/ideogram-v4/code"},{"title":"Use P Image Ideogram with Comfy Router","sidebarTitle":"P Image Ideogram","href":"/development/comfy-router/models/ideogram/p-image-ideogram/code"}]},{"group":"Kelly","pages":[{"title":"Use Kelly Kling 4.0 with Comfy Router","sidebarTitle":"Kelly Kling 4.0","href":"/development/comfy-router/models/kelly/kelly-kling-4-0/code"},{"title":"Use Kelly Seedance 2.0 Fast with Comfy Router","sidebarTitle":"Kelly Seedance 2.0 Fast","href":"/development/comfy-router/models/kelly/kelly-seedance-2-0-fast/code"},{"title":"Use Kelly Seedance 2.0 with Comfy Router","sidebarTitle":"Kelly Seedance 2.0","href":"/development/comfy-router/models/kelly/kelly-seedance-2-0/code"},{"title":"Use Kelly Seedance 2.5 with Comfy Router","sidebarTitle":"Kelly Seedance 2.5","href":"/development/comfy-router/models/kelly/kelly-seedance-2-5/code"}]},{"group":"Kling","pages":[{"title":"Use Kling 3.0 Turbo with Comfy Router","sidebarTitle":"Kling 3.0 Turbo","href":"/development/comfy-router/models/kling/kling-3-0-turbo/code"},{"title":"Use Kling 4.0 Flash with Comfy Router","sidebarTitle":"Kling 4.0 Flash","href":"/development/comfy-router/models/kling/kling-4-0-flash/code"},{"title":"Use Kling 4.0 with Comfy Router","sidebarTitle":"Kling 4.0","href":"/development/comfy-router/models/kling/kling-4-0/code"},{"title":"Use Kling Image 4.0 with Comfy Router","sidebarTitle":"Kling Image 4.0","href":"/development/comfy-router/models/kling/kling-image-4-0/code"},{"title":"Use Kling Image O1 with Comfy Router","sidebarTitle":"Kling Image O1","href":"/development/comfy-router/models/kling/kling-image-o1/code"},{"title":"Use Kling Long Image 4.0 with Comfy Router","sidebarTitle":"Kling Long Image 4.0","href":"/development/comfy-router/models/kling/kling-long-image-4-0/code"},{"title":"Use Kling V2.5 Turbo with Comfy Router","sidebarTitle":"Kling V2.5 Turbo","href":"/development/comfy-router/models/kling/kling-v2-5-turbo/code"},{"title":"Use Kling V2.6 with Comfy Router","sidebarTitle":"Kling V2.6","href":"/development/comfy-router/models/kling/kling-v2-6/code"},{"title":"Use Kling V3 Omni with Comfy Router","sidebarTitle":"Kling V3 Omni","href":"/development/comfy-router/models/kling/kling-v3-omni/code"},{"title":"Use Kling V3 with Comfy Router","sidebarTitle":"Kling V3","href":"/development/comfy-router/models/kling/kling-v3/code"},{"title":"Use Kling Video O1 with Comfy Router","sidebarTitle":"Kling Video O1","href":"/development/comfy-router/models/kling/kling-video-o1/code"},{"title":"Use Videos Avatar Image 2video with Comfy Router","sidebarTitle":"Videos Avatar Image 2video","href":"/development/comfy-router/models/kling/videos-avatar-image2video/code"},{"title":"Use Videos Lip Sync with Comfy Router","sidebarTitle":"Videos Lip Sync","href":"/development/comfy-router/models/kling/videos-lip-sync/code"}]},{"group":"Krea","pages":[{"title":"Use Krea 2 Large with Comfy Router","sidebarTitle":"Krea 2 Large","href":"/development/comfy-router/models/krea/krea-2-large/code"},{"title":"Use Krea 2 Medium Turbo with Comfy Router","sidebarTitle":"Krea 2 Medium Turbo","href":"/development/comfy-router/models/krea/krea-2-medium-turbo/code"},{"title":"Use Krea 2 Medium with Comfy Router","sidebarTitle":"Krea 2 Medium","href":"/development/comfy-router/models/krea/krea-2-medium/code"},{"title":"Use Krea 2 with Comfy Router","sidebarTitle":"Krea 2","href":"/development/comfy-router/models/krea/krea-2/code"},{"title":"Use Krea 3 with Comfy Router","sidebarTitle":"Krea 3","href":"/development/comfy-router/models/krea/krea-3/code"}]},{"group":"LTX","pages":[{"title":"Use LTX 2.5 Fast with Comfy Router","sidebarTitle":"LTX 2.5 Fast","href":"/development/comfy-router/models/ltx/ltx-2-5-fast/code"},{"title":"Use LTX 2.5 Pro with Comfy Router","sidebarTitle":"LTX 2.5 Pro","href":"/development/comfy-router/models/ltx/ltx-2-5-pro/code"},{"title":"Use LTX Video Alpha Gen with Comfy Router","sidebarTitle":"LTX Video Alpha Gen","href":"/development/comfy-router/models/ltx/ltx-video-alpha-gen/code"},{"title":"Use LTX Video To Video Hdr with Comfy Router","sidebarTitle":"LTX Video To Video Hdr","href":"/development/comfy-router/models/ltx/ltx-video-to-video-hdr/code"},{"title":"Use LTX Video To Video Reframe with Comfy Router","sidebarTitle":"LTX Video To Video Reframe","href":"/development/comfy-router/models/ltx/ltx-video-to-video-reframe/code"},{"title":"Use LTX Video Upscale with Comfy Router","sidebarTitle":"LTX Video Upscale","href":"/development/comfy-router/models/ltx/ltx-video-upscale/code"}]},{"group":"Luma 2","pages":[{"title":"Use Ray 3.2 with Comfy Router","sidebarTitle":"Ray 3.2","href":"/development/comfy-router/models/luma_2/ray-3-2/code"},{"title":"Use Uni 1 Max with Comfy Router","sidebarTitle":"Uni 1 Max","href":"/development/comfy-router/models/luma_2/uni-1-max/code"},{"title":"Use Uni 1 with Comfy Router","sidebarTitle":"Uni 1","href":"/development/comfy-router/models/luma_2/uni-1/code"}]},{"group":"Meshy","pages":[{"title":"Use Animations with Comfy Router","sidebarTitle":"Animations","href":"/development/comfy-router/models/meshy/animations/code"},{"title":"Use Meshy 6 with Comfy Router","sidebarTitle":"Meshy 6","href":"/development/comfy-router/models/meshy/meshy-6/code"},{"title":"Use Meshy 7.1 with Comfy Router","sidebarTitle":"Meshy 7.1","href":"/development/comfy-router/models/meshy/meshy-7-1/code"},{"title":"Use Meshy 7 with Comfy Router","sidebarTitle":"Meshy 7","href":"/development/comfy-router/models/meshy/meshy-7/code"},{"title":"Use Meshy N1 with Comfy Router","sidebarTitle":"Meshy N1","href":"/development/comfy-router/models/meshy/meshy-n1/code"},{"title":"Use Relief with Comfy Router","sidebarTitle":"Relief","href":"/development/comfy-router/models/meshy/relief/code"},{"title":"Use Remesh with Comfy Router","sidebarTitle":"Remesh","href":"/development/comfy-router/models/meshy/remesh/code"},{"title":"Use Rigging with Comfy Router","sidebarTitle":"Rigging","href":"/development/comfy-router/models/meshy/rigging/code"}]},{"group":"MiniMax","pages":[{"title":"Use MiniMax H3 Image Highspeed with Comfy Router","sidebarTitle":"MiniMax H3 Image Highspeed","href":"/development/comfy-router/models/minimax/minimax-h3-image-highspeed/code"},{"title":"Use MiniMax H3 Image with Comfy Router","sidebarTitle":"MiniMax H3 Image","href":"/development/comfy-router/models/minimax/minimax-h3-image/code"},{"title":"Use MiniMax H3 with Comfy Router","sidebarTitle":"MiniMax H3","href":"/development/comfy-router/models/minimax/minimax-h3/code"}]},{"group":"OpenAI","pages":[{"title":"Use GPT 4.1 Mini with Comfy Router","sidebarTitle":"GPT 4.1 Mini","href":"/development/comfy-router/models/openai/gpt-4-1-mini/code"},{"title":"Use GPT 4.1 with Comfy Router","sidebarTitle":"GPT 4.1","href":"/development/comfy-router/models/openai/gpt-4-1/code"},{"title":"Use GPT 4o with Comfy Router","sidebarTitle":"GPT 4o","href":"/development/comfy-router/models/openai/gpt-4o/code"},{"title":"Use GPT 5.5 Pro with Comfy Router","sidebarTitle":"GPT 5.5 Pro","href":"/development/comfy-router/models/openai/gpt-5-5-pro/code"},{"title":"Use GPT 5.5 with Comfy Router","sidebarTitle":"GPT 5.5","href":"/development/comfy-router/models/openai/gpt-5-5/code"},{"title":"Use GPT 5.6 Luna with Comfy Router","sidebarTitle":"GPT 5.6 Luna","href":"/development/comfy-router/models/openai/gpt-5-6-luna/code"},{"title":"Use GPT 5.6 Sol with Comfy Router","sidebarTitle":"GPT 5.6 Sol","href":"/development/comfy-router/models/openai/gpt-5-6-sol/code"},{"title":"Use GPT 5.6 Terra with Comfy Router","sidebarTitle":"GPT 5.6 Terra","href":"/development/comfy-router/models/openai/gpt-5-6-terra/code"},{"title":"Use GPT 5 Mini with Comfy Router","sidebarTitle":"GPT 5 Mini","href":"/development/comfy-router/models/openai/gpt-5-mini/code"},{"title":"Use GPT 5 Nano with Comfy Router","sidebarTitle":"GPT 5 Nano","href":"/development/comfy-router/models/openai/gpt-5-nano/code"},{"title":"Use GPT 5 with Comfy Router","sidebarTitle":"GPT 5","href":"/development/comfy-router/models/openai/gpt-5/code"},{"title":"Use GPT 6.1 Sol with Comfy Router","sidebarTitle":"GPT 6.1 Sol","href":"/development/comfy-router/models/openai/gpt-6-1-sol/code"},{"title":"Use GPT 6.1 Terra with Comfy Router","sidebarTitle":"GPT 6.1 Terra","href":"/development/comfy-router/models/openai/gpt-6-1-terra/code"},{"title":"Use GPT 6.2 Astra with Comfy Router","sidebarTitle":"GPT 6.2 Astra","href":"/development/comfy-router/models/openai/gpt-6-2-astra/code"},{"title":"Use GPT 6.2 Sol with Comfy Router","sidebarTitle":"GPT 6.2 Sol","href":"/development/comfy-router/models/openai/gpt-6-2-sol/code"},{"title":"Use GPT 6 Astra with Comfy Router","sidebarTitle":"GPT 6 Astra","href":"/development/comfy-router/models/openai/gpt-6-astra/code"},{"title":"Use GPT 6 Luna with Comfy Router","sidebarTitle":"GPT 6 Luna","href":"/development/comfy-router/models/openai/gpt-6-luna/code"},{"title":"Use GPT 6 Sol with Comfy Router","sidebarTitle":"GPT 6 Sol","href":"/development/comfy-router/models/openai/gpt-6-sol/code"},{"title":"Use GPT Image 1.5 with Comfy Router","sidebarTitle":"GPT Image 1.5","href":"/development/comfy-router/models/openai/gpt-image-1-5/code"},{"title":"Use GPT Image 2.5 Flare with Comfy Router","sidebarTitle":"GPT Image 2.5 Flare","href":"/development/comfy-router/models/openai/gpt-image-2-5-flare/code"},{"title":"Use GPT Image 2.5 Sunburst with Comfy Router","sidebarTitle":"GPT Image 2.5 Sunburst","href":"/development/comfy-router/models/openai/gpt-image-2-5-sunburst/code"},{"title":"Use GPT Image 2.6 Flare with Comfy Router","sidebarTitle":"GPT Image 2.6 Flare","href":"/development/comfy-router/models/openai/gpt-image-2-6-flare/code"},{"title":"Use GPT Image 2.6 Sunburst with Comfy Router","sidebarTitle":"GPT Image 2.6 Sunburst","href":"/development/comfy-router/models/openai/gpt-image-2-6-sunburst/code"},{"title":"Use GPT Image 2 with Comfy Router","sidebarTitle":"GPT Image 2","href":"/development/comfy-router/models/openai/gpt-image-2/code"},{"title":"Use o3 with Comfy Router","sidebarTitle":"o3","href":"/development/comfy-router/models/openai/o3/code"}]},{"group":"Openrouter","pages":[{"title":"Use Chat Completions with Comfy Router","sidebarTitle":"Chat Completions","href":"/development/comfy-router/models/openrouter/chat-completions/code"},{"title":"Use Images with Comfy Router","sidebarTitle":"Images","href":"/development/comfy-router/models/openrouter/images/code"}]},{"group":"Pika","pages":[{"title":"Use Pika 2.5 Image To Video with Comfy Router","sidebarTitle":"Pika 2.5 Image To Video","href":"/development/comfy-router/models/pika/pika-2-5-image-to-video/code"},{"title":"Use Pika 2.5 Text To Video with Comfy Router","sidebarTitle":"Pika 2.5 Text To Video","href":"/development/comfy-router/models/pika/pika-2-5-text-to-video/code"},{"title":"Use Pika H3 Flex Image To Video with Comfy Router","sidebarTitle":"Pika H3 Flex Image To Video","href":"/development/comfy-router/models/pika/pika-h3-flex-image-to-video/code"},{"title":"Use Pika H3 Flex Reference To Video with Comfy Router","sidebarTitle":"Pika H3 Flex Reference To Video","href":"/development/comfy-router/models/pika/pika-h3-flex-reference-to-video/code"},{"title":"Use Pika H3 Flex Text To Video with Comfy Router","sidebarTitle":"Pika H3 Flex Text To Video","href":"/development/comfy-router/models/pika/pika-h3-flex-text-to-video/code"},{"title":"Use Pika Music with Comfy Router","sidebarTitle":"Pika Music","href":"/development/comfy-router/models/pika/pika-music/code"},{"title":"Use Pika Sfx with Comfy Router","sidebarTitle":"Pika Sfx","href":"/development/comfy-router/models/pika/pika-sfx/code"},{"title":"Use Pika Soundtrack with Comfy Router","sidebarTitle":"Pika Soundtrack","href":"/development/comfy-router/models/pika/pika-soundtrack/code"}]},{"group":"Pixverse","pages":[{"title":"Use V3.5 with Comfy Router","sidebarTitle":"V3.5","href":"/development/comfy-router/models/pixverse/v3-5/code"},{"title":"Use V6 Max with Comfy Router","sidebarTitle":"V6 Max","href":"/development/comfy-router/models/pixverse/v6-max/code"},{"title":"Use V6 with Comfy Router","sidebarTitle":"V6","href":"/development/comfy-router/models/pixverse/v6/code"}]},{"group":"Pruna","pages":[{"title":"Use P Video 2 Pro Avatar with Comfy Router","sidebarTitle":"P Video 2 Pro Avatar","href":"/development/comfy-router/models/pruna/p-video-2-pro-avatar/code"},{"title":"Use P Video 2 Pro Reference with Comfy Router","sidebarTitle":"P Video 2 Pro Reference","href":"/development/comfy-router/models/pruna/p-video-2-pro-reference/code"},{"title":"Use P Video 2 with Comfy Router","sidebarTitle":"P Video 2","href":"/development/comfy-router/models/pruna/p-video-2/code"}]},{"group":"Quiver","pages":[{"title":"Use Arrow 2 Telos with Comfy Router","sidebarTitle":"Arrow 2 Telos","href":"/development/comfy-router/models/quiver/arrow-2-telos/code"},{"title":"Use Arrow 2 with Comfy Router","sidebarTitle":"Arrow 2","href":"/development/comfy-router/models/quiver/arrow-2/code"}]},{"group":"Qwen","pages":[{"title":"Use Qwen Image 3.0 Pro with Comfy Router","sidebarTitle":"Qwen Image 3.0 Pro","href":"/development/comfy-router/models/qwen/qwen-image-3-0-pro/code"},{"title":"Use Qwen Image 3.0 with Comfy Router","sidebarTitle":"Qwen Image 3.0","href":"/development/comfy-router/models/qwen/qwen-image-3-0/code"}]},{"group":"Recraft","pages":[{"title":"Use Images Vectorize with Comfy Router","sidebarTitle":"Images Vectorize","href":"/development/comfy-router/models/recraft/images-vectorize/code"},{"title":"Use Recraft V2 with Comfy Router","sidebarTitle":"Recraft V2","href":"/development/comfy-router/models/recraft/recraftv2/code"},{"title":"Use Recraft V3 with Comfy Router","sidebarTitle":"Recraft V3","href":"/development/comfy-router/models/recraft/recraftv3/code"},{"title":"Use Recraft V4.1 Flash V2 with Comfy Router","sidebarTitle":"Recraft V4.1 Flash V2","href":"/development/comfy-router/models/recraft/recraftv4-1-flash-v2/code"},{"title":"Use Recraft V4.1 Pro Vector with Comfy Router","sidebarTitle":"Recraft V4.1 Pro Vector","href":"/development/comfy-router/models/recraft/recraftv4-1-pro-vector/code"},{"title":"Use Recraft V4.1 Pro with Comfy Router","sidebarTitle":"Recraft V4.1 Pro","href":"/development/comfy-router/models/recraft/recraftv4-1-pro/code"},{"title":"Use Recraft V4.1 Utility Pro Vector with Comfy Router","sidebarTitle":"Recraft V4.1 Utility Pro Vector","href":"/development/comfy-router/models/recraft/recraftv4-1-utility-pro-vector/code"},{"title":"Use Recraft V4.1 Utility Pro with Comfy Router","sidebarTitle":"Recraft V4.1 Utility Pro","href":"/development/comfy-router/models/recraft/recraftv4-1-utility-pro/code"},{"title":"Use Recraft V4.1 Utility Vector with Comfy Router","sidebarTitle":"Recraft V4.1 Utility Vector","href":"/development/comfy-router/models/recraft/recraftv4-1-utility-vector/code"},{"title":"Use Recraft V4.1 Utility with Comfy Router","sidebarTitle":"Recraft V4.1 Utility","href":"/development/comfy-router/models/recraft/recraftv4-1-utility/code"},{"title":"Use Recraft V4.1 Vector with Comfy Router","sidebarTitle":"Recraft V4.1 Vector","href":"/development/comfy-router/models/recraft/recraftv4-1-vector/code"},{"title":"Use Recraft V4.1 with Comfy Router","sidebarTitle":"Recraft V4.1","href":"/development/comfy-router/models/recraft/recraftv4-1/code"},{"title":"Use Recraft V4 Pro with Comfy Router","sidebarTitle":"Recraft V4 Pro","href":"/development/comfy-router/models/recraft/recraftv4-pro/code"},{"title":"Use Recraft V4 Styles Pro Vector with Comfy Router","sidebarTitle":"Recraft V4 Styles Pro Vector","href":"/development/comfy-router/models/recraft/recraftv4-styles-pro-vector/code"},{"title":"Use Recraft V4 Styles Pro with Comfy Router","sidebarTitle":"Recraft V4 Styles Pro","href":"/development/comfy-router/models/recraft/recraftv4-styles-pro/code"},{"title":"Use Recraft V4 Styles Vector with Comfy Router","sidebarTitle":"Recraft V4 Styles Vector","href":"/development/comfy-router/models/recraft/recraftv4-styles-vector/code"},{"title":"Use Recraft V4 Styles with Comfy Router","sidebarTitle":"Recraft V4 Styles","href":"/development/comfy-router/models/recraft/recraftv4-styles/code"},{"title":"Use Recraft V4 with Comfy Router","sidebarTitle":"Recraft V4","href":"/development/comfy-router/models/recraft/recraftv4/code"}]},{"group":"Runway","pages":[{"title":"Use Aleph 2 with Comfy Router","sidebarTitle":"Aleph 2","href":"/development/comfy-router/models/runway/aleph2/code"},{"title":"Use Gen 4 Image with Comfy Router","sidebarTitle":"Gen 4 Image","href":"/development/comfy-router/models/runway/gen4-image/code"},{"title":"Use Gen 4 Turbo with Comfy Router","sidebarTitle":"Gen 4 Turbo","href":"/development/comfy-router/models/runway/gen4-turbo/code"}]},{"group":"Stability","pages":[{"title":"Use Control Sketch with Comfy Router","sidebarTitle":"Control Sketch","href":"/development/comfy-router/models/stability/control-sketch/code"},{"title":"Use Control Structure with Comfy Router","sidebarTitle":"Control Structure","href":"/development/comfy-router/models/stability/control-structure/code"},{"title":"Use Control Style Transfer with Comfy Router","sidebarTitle":"Control Style Transfer","href":"/development/comfy-router/models/stability/control-style-transfer/code"},{"title":"Use Control Style with Comfy Router","sidebarTitle":"Control Style","href":"/development/comfy-router/models/stability/control-style/code"},{"title":"Use Edit Erase with Comfy Router","sidebarTitle":"Edit Erase","href":"/development/comfy-router/models/stability/edit-erase/code"},{"title":"Use Edit Inpaint with Comfy Router","sidebarTitle":"Edit Inpaint","href":"/development/comfy-router/models/stability/edit-inpaint/code"},{"title":"Use Edit Outpaint with Comfy Router","sidebarTitle":"Edit Outpaint","href":"/development/comfy-router/models/stability/edit-outpaint/code"},{"title":"Use Edit Remove Background with Comfy Router","sidebarTitle":"Edit Remove Background","href":"/development/comfy-router/models/stability/edit-remove-background/code"},{"title":"Use Edit Replace Background And Relight with Comfy Router","sidebarTitle":"Edit Replace Background And Relight","href":"/development/comfy-router/models/stability/edit-replace-background-and-relight/code"},{"title":"Use Edit Search And Recolor with Comfy Router","sidebarTitle":"Edit Search And Recolor","href":"/development/comfy-router/models/stability/edit-search-and-recolor/code"},{"title":"Use Edit Search And Replace with Comfy Router","sidebarTitle":"Edit Search And Replace","href":"/development/comfy-router/models/stability/edit-search-and-replace/code"},{"title":"Use Generate Core with Comfy Router","sidebarTitle":"Generate Core","href":"/development/comfy-router/models/stability/generate-core/code"},{"title":"Use Generate Ultra with Comfy Router","sidebarTitle":"Generate Ultra","href":"/development/comfy-router/models/stability/generate-ultra/code"},{"title":"Use Sd3.5 Flash with Comfy Router","sidebarTitle":"Sd3.5 Flash","href":"/development/comfy-router/models/stability/sd3-5-flash/code"},{"title":"Use Sd3.5 Large Turbo with Comfy Router","sidebarTitle":"Sd3.5 Large Turbo","href":"/development/comfy-router/models/stability/sd3-5-large-turbo/code"},{"title":"Use Sd3.5 Large with Comfy Router","sidebarTitle":"Sd3.5 Large","href":"/development/comfy-router/models/stability/sd3-5-large/code"},{"title":"Use Sd3.5 Medium with Comfy Router","sidebarTitle":"Sd3.5 Medium","href":"/development/comfy-router/models/stability/sd3-5-medium/code"},{"title":"Use Sdxl 1.0 Image To Image with Comfy Router","sidebarTitle":"Sdxl 1.0 Image To Image","href":"/development/comfy-router/models/stability/sdxl-1-0-image-to-image/code"},{"title":"Use Sdxl 1.0 Masking with Comfy Router","sidebarTitle":"Sdxl 1.0 Masking","href":"/development/comfy-router/models/stability/sdxl-1-0-masking/code"},{"title":"Use Sdxl 1.0 Text To Image with Comfy Router","sidebarTitle":"Sdxl 1.0 Text To Image","href":"/development/comfy-router/models/stability/sdxl-1-0-text-to-image/code"},{"title":"Use Stable Fast 3D with Comfy Router","sidebarTitle":"Stable Fast 3D","href":"/development/comfy-router/models/stability/stable-fast-3d/code"},{"title":"Use Stable Point Aware 3D with Comfy Router","sidebarTitle":"Stable Point Aware 3D","href":"/development/comfy-router/models/stability/stable-point-aware-3d/code"},{"title":"Use Upscale Conservative with Comfy Router","sidebarTitle":"Upscale Conservative","href":"/development/comfy-router/models/stability/upscale-conservative/code"},{"title":"Use Upscale Creative with Comfy Router","sidebarTitle":"Upscale Creative","href":"/development/comfy-router/models/stability/upscale-creative/code"},{"title":"Use Upscale Fast with Comfy Router","sidebarTitle":"Upscale Fast","href":"/development/comfy-router/models/stability/upscale-fast/code"}]},{"group":"Synclabs","pages":[{"title":"Use Sync 3 with Comfy Router","sidebarTitle":"Sync 3","href":"/development/comfy-router/models/synclabs/sync-3/code"}]},{"group":"Tencent","pages":[{"title":"Use Hunyuan 3D Part with Comfy Router","sidebarTitle":"Hunyuan 3D Part","href":"/development/comfy-router/models/tencent/hunyuan-3d-part/code"},{"title":"Use Hunyuan 3D Smart Topology with Comfy Router","sidebarTitle":"Hunyuan 3D Smart Topology","href":"/development/comfy-router/models/tencent/hunyuan-3d-smart-topology/code"},{"title":"Use Hunyuan 3D Texture Edit with Comfy Router","sidebarTitle":"Hunyuan 3D Texture Edit","href":"/development/comfy-router/models/tencent/hunyuan-3d-texture-edit/code"},{"title":"Use Hunyuan 3D Uv with Comfy Router","sidebarTitle":"Hunyuan 3D Uv","href":"/development/comfy-router/models/tencent/hunyuan-3d-uv/code"},{"title":"Use Hunyuan Image 3.5 with Comfy Router","sidebarTitle":"Hunyuan Image 3.5","href":"/development/comfy-router/models/tencent/hunyuan-image-3-5/code"}]},{"group":"Tripo","pages":[{"title":"Use P1 20260311 Image To Model with Comfy Router","sidebarTitle":"P1 20260311 Image To Model","href":"/development/comfy-router/models/tripo/p1-20260311-image-to-model/code"},{"title":"Use P1 20260311 Multiview To Model with Comfy Router","sidebarTitle":"P1 20260311 Multiview To Model","href":"/development/comfy-router/models/tripo/p1-20260311-multiview-to-model/code"},{"title":"Use P1 20260311 Text To Model with Comfy Router","sidebarTitle":"P1 20260311 Text To Model","href":"/development/comfy-router/models/tripo/p1-20260311-text-to-model/code"},{"title":"Use P2 20260801 Image To Model with Comfy Router","sidebarTitle":"P2 20260801 Image To Model","href":"/development/comfy-router/models/tripo/p2-20260801-image-to-model/code"},{"title":"Use P2 20260801 Multiview To Model with Comfy Router","sidebarTitle":"P2 20260801 Multiview To Model","href":"/development/comfy-router/models/tripo/p2-20260801-multiview-to-model/code"},{"title":"Use P2 20260801 Text To Model with Comfy Router","sidebarTitle":"P2 20260801 Text To Model","href":"/development/comfy-router/models/tripo/p2-20260801-text-to-model/code"},{"title":"Use V3.0 20250812 Image To Model with Comfy Router","sidebarTitle":"V3.0 20250812 Image To Model","href":"/development/comfy-router/models/tripo/v3-0-20250812-image-to-model/code"},{"title":"Use V3.0 20250812 Multiview To Model with Comfy Router","sidebarTitle":"V3.0 20250812 Multiview To Model","href":"/development/comfy-router/models/tripo/v3-0-20250812-multiview-to-model/code"},{"title":"Use V3.0 20250812 Text To Model with Comfy Router","sidebarTitle":"V3.0 20250812 Text To Model","href":"/development/comfy-router/models/tripo/v3-0-20250812-text-to-model/code"},{"title":"Use V3.1 20260211 Image To Model with Comfy Router","sidebarTitle":"V3.1 20260211 Image To Model","href":"/development/comfy-router/models/tripo/v3-1-20260211-image-to-model/code"},{"title":"Use V3.1 20260211 Multiview To Model with Comfy Router","sidebarTitle":"V3.1 20260211 Multiview To Model","href":"/development/comfy-router/models/tripo/v3-1-20260211-multiview-to-model/code"},{"title":"Use V3.1 20260211 Text To Model with Comfy Router","sidebarTitle":"V3.1 20260211 Text To Model","href":"/development/comfy-router/models/tripo/v3-1-20260211-text-to-model/code"}]},{"group":"Typesafe","pages":[{"title":"Use Jev 1.13.0 with Comfy Router","sidebarTitle":"Jev 1.13.0","href":"/development/comfy-router/models/typesafe/jev-1-13-0/code"},{"title":"Use Jev 1.14.0 with Comfy Router","sidebarTitle":"Jev 1.14.0","href":"/development/comfy-router/models/typesafe/jev-1-14-0/code"}]},{"group":"Veed","pages":[{"title":"Use Clean Audio Video with Comfy Router","sidebarTitle":"Clean Audio Video","href":"/development/comfy-router/models/veed/clean-audio-video/code"},{"title":"Use Clean Audio with Comfy Router","sidebarTitle":"Clean Audio","href":"/development/comfy-router/models/veed/clean-audio/code"},{"title":"Use Fabric 1.0 with Comfy Router","sidebarTitle":"Fabric 1.0","href":"/development/comfy-router/models/veed/fabric-1-0/code"},{"title":"Use Lipsync 2.0 with Comfy Router","sidebarTitle":"Lipsync 2.0","href":"/development/comfy-router/models/veed/lipsync-2-0/code"},{"title":"Use Video Background Removal Fast with Comfy Router","sidebarTitle":"Video Background Removal Fast","href":"/development/comfy-router/models/veed/video-background-removal-fast/code"},{"title":"Use Video Background Removal Green Screen with Comfy Router","sidebarTitle":"Video Background Removal Green Screen","href":"/development/comfy-router/models/veed/video-background-removal-green-screen/code"},{"title":"Use Video Background Removal with Comfy Router","sidebarTitle":"Video Background Removal","href":"/development/comfy-router/models/veed/video-background-removal/code"}]},{"group":"Veo","pages":[{"title":"Use Veo 3.1 Fast Generate 001 with Comfy Router","sidebarTitle":"Veo 3.1 Fast Generate 001","href":"/development/comfy-router/models/veo/veo-3-1-fast-generate-001/code"},{"title":"Use Veo 3.1 Generate 001 with Comfy Router","sidebarTitle":"Veo 3.1 Generate 001","href":"/development/comfy-router/models/veo/veo-3-1-generate-001/code"},{"title":"Use Veo 3.1 Lite Generate 001 with Comfy Router","sidebarTitle":"Veo 3.1 Lite Generate 001","href":"/development/comfy-router/models/veo/veo-3-1-lite-generate-001/code"}]},{"group":"Viggle","pages":[{"title":"Use Jst 2 Scene View with Comfy Router","sidebarTitle":"Jst 2 Scene View","href":"/development/comfy-router/models/viggle/jst-2-scene-view/code"},{"title":"Use Jst 2 Scene with Comfy Router","sidebarTitle":"Jst 2 Scene","href":"/development/comfy-router/models/viggle/jst-2-scene/code"},{"title":"Use Motion Capture with Comfy Router","sidebarTitle":"Motion Capture","href":"/development/comfy-router/models/viggle/motion-capture/code"},{"title":"Use Text To Motion with Comfy Router","sidebarTitle":"Text To Motion","href":"/development/comfy-router/models/viggle/text-to-motion/code"},{"title":"Use Video Remix with Comfy Router","sidebarTitle":"Video Remix","href":"/development/comfy-router/models/viggle/video-remix/code"}]},{"group":"Wan","pages":[{"title":"Use HappyHorse 1.0 I2V with Comfy Router","sidebarTitle":"HappyHorse 1.0 I2V","href":"/development/comfy-router/models/wan/happyhorse-1-0-i2v/code"},{"title":"Use HappyHorse 1.0 R2V with Comfy Router","sidebarTitle":"HappyHorse 1.0 R2V","href":"/development/comfy-router/models/wan/happyhorse-1-0-r2v/code"},{"title":"Use HappyHorse 1.0 T2V with Comfy Router","sidebarTitle":"HappyHorse 1.0 T2V","href":"/development/comfy-router/models/wan/happyhorse-1-0-t2v/code"},{"title":"Use HappyHorse 1.0 Video Edit with Comfy Router","sidebarTitle":"HappyHorse 1.0 Video Edit","href":"/development/comfy-router/models/wan/happyhorse-1-0-video-edit/code"},{"title":"Use HappyHorse 1.1 I2V with Comfy Router","sidebarTitle":"HappyHorse 1.1 I2V","href":"/development/comfy-router/models/wan/happyhorse-1-1-i2v/code"},{"title":"Use HappyHorse 1.1 R2V with Comfy Router","sidebarTitle":"HappyHorse 1.1 R2V","href":"/development/comfy-router/models/wan/happyhorse-1-1-r2v/code"},{"title":"Use HappyHorse 1.1 T2V with Comfy Router","sidebarTitle":"HappyHorse 1.1 T2V","href":"/development/comfy-router/models/wan/happyhorse-1-1-t2v/code"},{"title":"Use Wan 2.5 I2I Preview with Comfy Router","sidebarTitle":"Wan 2.5 I2I Preview","href":"/development/comfy-router/models/wan/wan2-5-i2i-preview/code"},{"title":"Use Wan 2.5 I2V Preview with Comfy Router","sidebarTitle":"Wan 2.5 I2V Preview","href":"/development/comfy-router/models/wan/wan2-5-i2v-preview/code"},{"title":"Use Wan 2.5 T2I Preview with Comfy Router","sidebarTitle":"Wan 2.5 T2I Preview","href":"/development/comfy-router/models/wan/wan2-5-t2i-preview/code"},{"title":"Use Wan 2.5 T2V Preview with Comfy Router","sidebarTitle":"Wan 2.5 T2V Preview","href":"/development/comfy-router/models/wan/wan2-5-t2v-preview/code"},{"title":"Use Wan 2.6 I2V with Comfy Router","sidebarTitle":"Wan 2.6 I2V","href":"/development/comfy-router/models/wan/wan2-6-i2v/code"},{"title":"Use Wan 2.6 R2V with Comfy Router","sidebarTitle":"Wan 2.6 R2V","href":"/development/comfy-router/models/wan/wan2-6-r2v/code"},{"title":"Use Wan 2.6 T2V with Comfy Router","sidebarTitle":"Wan 2.6 T2V","href":"/development/comfy-router/models/wan/wan2-6-t2v/code"},{"title":"Use Wan 2.7 I2V with Comfy Router","sidebarTitle":"Wan 2.7 I2V","href":"/development/comfy-router/models/wan/wan2-7-i2v/code"},{"title":"Use Wan 2.7 R2V with Comfy Router","sidebarTitle":"Wan 2.7 R2V","href":"/development/comfy-router/models/wan/wan2-7-r2v/code"},{"title":"Use Wan 2.7 T2V with Comfy Router","sidebarTitle":"Wan 2.7 T2V","href":"/development/comfy-router/models/wan/wan2-7-t2v/code"},{"title":"Use Wan 2.7 Video Edit with Comfy Router","sidebarTitle":"Wan 2.7 Video Edit","href":"/development/comfy-router/models/wan/wan2-7-videoedit/code"},{"title":"Use Wan 3.0 Video Prime with Comfy Router","sidebarTitle":"Wan 3.0 Video Prime","href":"/development/comfy-router/models/wan/wan3-0-video-prime/code"},{"title":"Use Wan 3.0 Video with Comfy Router","sidebarTitle":"Wan 3.0 Video","href":"/development/comfy-router/models/wan/wan3-0-video/code"}]},{"group":"WaveSpeed","pages":[{"title":"Use Flashvsr with Comfy Router","sidebarTitle":"Flashvsr","href":"/development/comfy-router/models/wavespeed/flashvsr/code"},{"title":"Use Seedvr 2 with Comfy Router","sidebarTitle":"Seedvr 2","href":"/development/comfy-router/models/wavespeed/seedvr2/code"},{"title":"Use Ultimate Image Upscaler with Comfy Router","sidebarTitle":"Ultimate Image Upscaler","href":"/development/comfy-router/models/wavespeed/ultimate-image-upscaler/code"}]},{"group":"xAI","pages":[{"title":"Use Grok Imagine Image 2.0 with Comfy Router","sidebarTitle":"Grok Imagine Image 2.0","href":"/development/comfy-router/models/xai/grok-imagine-image-2-0/code"},{"title":"Use Grok Imagine Image Pro with Comfy Router","sidebarTitle":"Grok Imagine Image Pro","href":"/development/comfy-router/models/xai/grok-imagine-image-pro/code"},{"title":"Use Grok Imagine Image Quality with Comfy Router","sidebarTitle":"Grok Imagine Image Quality","href":"/development/comfy-router/models/xai/grok-imagine-image-quality/code"},{"title":"Use Grok Imagine Image with Comfy Router","sidebarTitle":"Grok Imagine Image","href":"/development/comfy-router/models/xai/grok-imagine-image/code"},{"title":"Use Grok Imagine Video 1.5 Lite with Comfy Router","sidebarTitle":"Grok Imagine Video 1.5 Lite","href":"/development/comfy-router/models/xai/grok-imagine-video-1-5-lite/code"},{"title":"Use Grok Imagine Video 1.5 Preview with Comfy Router","sidebarTitle":"Grok Imagine Video 1.5 Preview","href":"/development/comfy-router/models/xai/grok-imagine-video-1-5-preview/code"},{"title":"Use Grok Imagine Video 1.5 with Comfy Router","sidebarTitle":"Grok Imagine Video 1.5","href":"/development/comfy-router/models/xai/grok-imagine-video-1-5/code"},{"title":"Use Grok Imagine Video with Comfy Router","sidebarTitle":"Grok Imagine Video","href":"/development/comfy-router/models/xai/grok-imagine-video/code"}]}]}]}]},{"tab":"Agent tools","pages":[{"title":"Agent tools","href":"/agent-tools"}]},{"tab":"Built-in Nodes","pages":[{"title":"Built-in Nodes","href":"/built-in-nodes/overview"}]},{"tab":"Developer","pages":[{"title":"Developer","href":"/development/overview"}]},{"tab":"Rankings","pages":[{"title":"Rankings","href":"/rankings"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support/contact-support"}]}]},{"language":"zh","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"资源","items":[{"label":"安装","href":"/zh/installation/system_requirements"},{"label":"教程","href":"/zh/tutorials/basic/text-to-image"},{"label":"开发","href":"/zh/development/overview"}]},{"header":"产品","items":[{"label":"功能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"画廊","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"下载","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"公司","items":[{"label":"关于","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"招聘","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"服务条款","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"隐私政策","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"pages":[{"title":"zh","href":"/zh/development/comfy-router/models/google/gemini/code"}]},{"language":"ja","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"リソース","items":[{"label":"インストール","href":"/ja/installation/system_requirements"},{"label":"チュートリアル","href":"/ja/tutorials/basic/text-to-image"},{"label":"開発","href":"/ja/development/overview"}]},{"header":"プロダクト","items":[{"label":"機能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"ギャラリー","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"ダウンロード","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"会社情報","items":[{"label":"概要","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"採用情報","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"利用規約","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"プライバシーポリシー","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ja/tutorials/partner-nodes/pricing","label":"料金"},{"href":"https://comfy.org/download?utm_source=docs","label":"ダウンロード"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"pages":[{"title":"ja","href":"/ja/development/comfy-router/models/google/gemini/code"}]},{"language":"ko","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"리소스","items":[{"label":"설치","href":"/ko/installation/system_requirements"},{"label":"튜토리얼","href":"/ko/tutorials/basic/text-to-image"},{"label":"개발","href":"/ko/development/overview"}]},{"header":"제품","items":[{"label":"기능","href":"https://www.comfy.org/?utm_source=docs"},{"label":"갤러리","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"다운로드","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"회사 정보","items":[{"label":"소개","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"채용","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"이용약관","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"개인정보 처리방침","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ko/tutorials/partner-nodes/pricing","label":"가격 정책"},{"href":"https://comfy.org/download?utm_source=docs","label":"다운로드"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"pages":[{"title":"ko","href":"/ko/development/comfy-router/models/google/gemini/code"}]},{"language":"es","pages":[{"title":"es","href":"/es/development/comfy-router/models/google/gemini/code"}]}]},"basePath":"","title":"Use Google Gemini with Comfy Router - ComfyUI","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":[],"chunks":[]}