runway/gen4_image, served by Comfy Router from Runway.
Quick start
Create a key in your Comfy workspace and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: runway/gen4_image
Endpoint: POST https://api.comfy.org/v2/models/runway/gen4_image
Schema
Input
string
Model to use for generation. On the Comfy Router route
POST /v2/models/runway/{model} this field is supplied from the path and MUST NOT be sent; on the v1 POST /proxy/runway/text_to_image route it is required and constrained to gen4_image.string
required
Text prompt for the image generation
string
required
Possible values:
1920:1080, 1080:1920, 1024:1024, 1360:768, 1080:1080, 1168:880, 1440:1080, 1080:1440, 1808:768, 2112:912object[]
Array of reference images to guide the generation
string
required
A HTTPS URL or data URI containing an encoded image
GET /v2/models/runway/gen4_image/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
string (date-time)
required
Task creation timestampFormat:
date-timestring
required
Task ID
string[]
The finished generation’s asset URLs — for
runway/gen4_image each element is an IMAGE URL. Present once the task terminates successfully; this list IS the result.number
Float value between 0 and 1 representing the progress of the task. Only available if status is RUNNING.Range:
0 to 1Format: floatstring
required
Possible statuses for a Runway task.Possible values:
SUCCEEDED, RUNNING, FAILED, PENDING, CANCELLED, THROTTLEDExamples
Input
Output
Before you ship
The SDKs create anIdempotency-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. Download generated assets promptly because result URLs can expire.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Using the Router API
Model discovery, validation errors, retries, and billing.
Limitations
What Router does not do today, and what to use instead.