Skip to main content

Overview

Runway Gen4 Image generates still images from text prompts and optional reference images. Use it for higher-quality image generation when you need explicit aspect ratio, resolution, and seed controls.
CapabilityValue
Model IDrunway-gen4-image
Modestext-to-image, image-to-image
PromptRequired non-empty string
Reference imagesRequired for image-to-image; optional for text-to-image; 1-3 public image URLs when provided
Aspect ratios1:1, 16:9, 9:16, 4:3, 3:4
Resolution tiers720p, 1080p
SeedInteger from 1 through 2147483647

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/runway-gen4-imageSubmit an image generation task
GET/statusTask/runway-gen4-image?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

curl -X POST "https://api.apixo.ai/api/v1/generateTask/runway-gen4-image" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-image",
      "prompt": "A cinematic product photo of a silver running shoe on wet asphalt",
      "aspect_ratio": "4:3",
      "resolution": "1080p"
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/runway-gen4-image?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/runway-gen4-image.png\"]}",
    "createTime": 1782980000000,
    "completeTime": 1782980020000,
    "costTime": 20000
  }
}

Request body

Text-to-image

{
  "request_type": "async",
  "input": {
    "mode": "text-to-image",
    "prompt": "A fashion editorial portrait with dramatic side lighting",
    "aspect_ratio": "3:4",
    "resolution": "1080p",
    "seed": 123456
  }
}

Text-to-image with optional references

{
  "request_type": "async",
  "input": {
    "mode": "text-to-image",
    "prompt": "Use the reference composition but render it as a studio product photo",
    "image_urls": [
      "https://example.com/reference-1.png"
    ],
    "aspect_ratio": "4:3",
    "resolution": "1080p"
  }
}

Image-to-image

{
  "request_type": "async",
  "input": {
    "mode": "image-to-image",
    "prompt": "Keep the shoe silhouette but place it in a clean studio scene",
    "image_urls": [
      "https://example.com/reference-1.png"
    ],
    "aspect_ratio": "4:3",
    "resolution": "1080p"
  }
}

Parameters

request_type
string
default:"async"
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.
input
object
required
Runway Gen4 Image input parameters.

Response format

Submit task response

POST /generateTask/runway-gen4-image returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing generated image URLs in resultUrls. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
Processing duration in milliseconds when available.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/runway-gen4-image" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "image-to-image",
      "prompt": "Create a premium catalog image using this product reference",
      "image_urls": [
        "https://example.com/reference-1.png"
      ],
      "resolution": "1080p",
      "aspect_ratio": "4:3"
    }
  }'
See Webhooks for delivery requirements and retry behavior.

Billing

Runway Gen4 Image is billed per generated image. text-to-image and image-to-image use the same price for the same resolution.
ResolutionAPIXO price
720p$0.05 / image
1080p$0.08 / image

Latency and polling

Actual latency may vary by prompt complexity, reference image accessibility, resolution, and current queue load.
ResolutionTypical generation timeRecommended first pollPoll interval
720p15s-30s15s after task creation3s-5s
1080p20s-45s20s after task creation3s-5s
For production image workloads, use callback mode to avoid frequent polling while generation is still running.

Validation notes

ParameterBackend behavior
input.modeOptional. Supported values are text-to-image and image-to-image. If omitted, non-empty image_urls selects image-to-image; otherwise text-to-image.
input.promptRequired string. Must not be empty after trimming whitespace.
input.image_urlsRequired for image-to-image. Optional for text-to-image. When present, must be an array with 1-3 non-empty string URLs.
input.aspect_ratioOptional. Defaults to 4:3. Must be one of 1:1, 16:9, 9:16, 4:3, 3:4.
input.resolutionOptional. Defaults to 1080p. Must be 720p or 1080p.
input.seedOptional JSON integer. Must be from 1 through 2147483647.

Errors and troubleshooting

CodeMeaningWhat to do
400Invalid request body, mode, parameter value, or input image URLFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the modelCheck permissions and route strategy
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server error or unknown generation failureRetry with backoff
502Generation service or network errorRetry with backoff
504Generation timeoutRetry or use callback mode for long-running jobs
See Error Codes for the full error reference.