Top.Mail.Ru
General icon
General
Галерея icon
Галерея
UniFlow icon
UniFlow
Unitool Labs icon
Unitool Labs
Блог icon
Блог
MCP icon
MCP
API base URLapi.unitool.ai/v1

Runway ML

Runway · Video

runwayml
Modes
1

Modes and prices

Price
90 tokens
per video 5 s
The price of a generation depends on the mode and parameters and is known before it runs: POST /v1/quotes shows it. How prices are counted

Request

Gen-4.5

"model": "runwayml:gen45"

Price

90 tokens per video 5 s. This is the price of the example request below, in balance tokens. POST /v1/quotes gives the exact price of your request before it runs.duration: 5

balance tokens per second

18

Example: 5 s × 18 = 90 tokens.

All price rules: 1

The rules go in order: the first one a request matches sets its price.

ConditionPriceFor 5 s
with duration18 per second90

Price make-up (pricing from GET /v1/models/{id})

JSON
{
  "unit": "tokens",
  "kind": "by_parameters",
  "base": 90,
  "example_price": 90,
  "matrix": [
    {
      "when": {},
      "when_set": [
        "duration"
      ],
      "rate": 18,
      "per": "duration"
    }
  ]
}

Example request

POST/v1/generations
curl https://api.unitool.ai/v1/generations \
  -H "Authorization: Bearer $UNITOOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Prefer: wait=60" \
  -d '{
  "model": "runwayml",
  "mode": "gen45",
  "input": {
    "prompt": "A red fox running through fresh snow at sunrise",
    "duration": 5,
    "resolution": "1280:720"
  },
  "metadata": {
    "order_id": "A-1042"
  }
}'
Response202 Accepted
Location: /v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60
Retry-After: 5
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "runwayml",
  "mode": "gen45",
  "status": "queued",
  "progress": 0,
  "cost": {
    "estimated_tokens": 90,
    "charged_tokens": 0,
    "refunded_tokens": 0,
    "settled": false
  },
  "outputs": [],
  "error": null,
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": null,
  "expires_at": null
}

Result

While the generation runs, read it by id: the status changes from queued or running to succeeded. With the Prefer: wait header the finished object may come in the answer to POST itself, as 200 instead of 202.

GET/v1/generations/{id}
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
  -H "Authorization: Bearer $UNITOOL_API_KEY"
Response200 OK
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "runwayml",
  "mode": "gen45",
  "status": "succeeded",
  "progress": 1,
  "cost": {
    "estimated_tokens": 90,
    "charged_tokens": 90,
    "refunded_tokens": 0,
    "settled": true
  },
  "outputs": [
    {
      "index": 0,
      "type": "video",
      "file_ref": "attachment:482913",
      "url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
      "content_type": "video/mp4",
      "width": 1280,
      "height": 720,
      "duration_sec": 5,
      "size": 6815744,
      "expires_at": "2026-12-06T12:00:41.000Z"
    }
  ],
  "error": null,
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": "2026-11-29T12:00:41.000Z",
  "expires_at": "2026-12-06T12:00:41.000Z"
}

If the generation fails

The HTTP answer is still 200. The reason is in error.code, what happened to the tokens in error.refund. All codes: Media generations

200 OK · "status": "failed"
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "runwayml",
  "mode": "gen45",
  "status": "failed",
  "progress": 0,
  "cost": {
    "estimated_tokens": 90,
    "charged_tokens": 90,
    "refunded_tokens": 90,
    "settled": true
  },
  "outputs": [],
  "error": {
    "code": "model_error",
    "message": "The model failed to produce a result.",
    "refund": "full"
  },
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": "2026-11-29T12:00:41.000Z",
  "expires_at": null
}

Parameters

ParameterDescription
promptstring · required
durationnumber 2–10Default 5
resolutionstringValues:1280:720720:12801104:832960:960832:11041584:672Default "1280:720"
image_urlarray of file (≤ 1)A file_ref (asset:… or attachment:…), an https URL or a data: URL.

Webhook

When the generation finishes, the same object is sent by POST to your address, in the data field. Signature, retries and setup: Webhooks

POST · generation.succeeded
{
  "type": "generation.succeeded",
  "timestamp": "2026-11-29T12:00:41.000Z",
  "data": {
    "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
    "object": "generation",
    "model": "runwayml",
    "mode": "gen45",
    "status": "succeeded",
    "progress": 1,
    "cost": {
      "estimated_tokens": 90,
      "charged_tokens": 90,
      "refunded_tokens": 0,
      "settled": true
    },
    "outputs": [
      {
        "index": 0,
        "type": "video",
        "file_ref": "attachment:482913",
        "url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
        "content_type": "video/mp4",
        "width": 1280,
        "height": 720,
        "duration_sec": 5,
        "size": 6815744,
        "expires_at": "2026-12-06T12:00:41.000Z"
      }
    ],
    "error": null,
    "metadata": {
      "order_id": "A-1042"
    },
    "created_at": "2026-11-29T12:00:00.000Z",
    "completed_at": "2026-11-29T12:00:41.000Z",
    "expires_at": "2026-12-06T12:00:41.000Z"
  }
}

Limits

Generations are async: create, wait or poll, the result by link for 7 days. Details: Media generations

Concurrent generations are limited per account, extra ones wait in the queue: Limits and headers

We use cookies

By continuing to use the site you agree to our Privacy Policy.