> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.deerapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Runway Generate

> Use DeerAPI to call the Runway Generate endpoint with request details, response details, examples, and an OpenAPI playground.

## Overview

Use this endpoint to call the Runway Generate workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.

## Before you start

Use the DeerAPI base URL and pass your API Key in the `Authorization` header:

```text theme={null}
https://api.deerapi.com
```

```text theme={null}
Authorization: Bearer $DEERAPI_KEY
```

## Model selection

Choose a current model ID from the [live pricing page](https://api.deerapi.com/pricing). Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.

## Implementation notes

* Use the OpenAPI playground for the exact request fields accepted by this endpoint.
* Keep API Keys on the server side when you build production applications.
* Log the request ID from failed calls so support can investigate the request.
* Retry `429`, `500`, and `503` responses with exponential backoff.


## OpenAPI

````yaml /api/openapi/video/runway/compat/post-generate.openapi.json POST /runway/pro/generate
openapi: 3.1.0
info:
  title: Generate Text API
  version: 1.0.0
servers:
  - url: https://api.deerapi.com
security:
  - bearerAuth: []
paths:
  /runway/pro/generate:
    post:
      summary: Generate Text API
      operationId: generate
      parameters:
        - name: X-Runway-Version
          in: header
          required: false
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - callback_url
                - ratio
                - prompt
                - style
                - model
                - options
              properties:
                callback_url:
                  type: string
                  description: Use this field according to the endpoint schema.
                  default: example
                ratio:
                  type: string
                  description: Use this field according to the endpoint schema.
                  default: example
                prompt:
                  type: string
                  description: Use this field according to the endpoint schema.
                  default: Hello
                style:
                  type: string
                  description: Use this field according to the endpoint schema.
                  default: example
                model:
                  type: string
                  description: Use this field according to the endpoint schema.
                  default: gen4_turbo
                options:
                  type: object
                  description: Use this field according to the endpoint schema.
                  required:
                    - seconds
                  properties:
                    seconds:
                      type: integer
                      description: Use this field according to the endpoint schema.
                    motion_vector:
                      type: object
                      description: Use this field according to the endpoint schema.
                      required:
                        - x
                        - 'y'
                        - z
                        - r
                        - bg_x_pan
                        - bg_y_pan
                      properties:
                        x:
                          type: integer
                          description: Use this field according to the endpoint schema.
                        'y':
                          type: number
                          description: Use this field according to the endpoint schema.
                        z:
                          type: integer
                          description: Use this field according to the endpoint schema.
                        r:
                          type: integer
                          description: Use this field according to the endpoint schema.
                        bg_x_pan:
                          type: integer
                          description: Use this field according to the endpoint schema.
                        bg_y_pan:
                          type: integer
                          description: Use this field according to the endpoint schema.
                  default:
                    seconds: 1
                    motion_vector:
                      x: 1
                      'y': 1
                      z: 1
                      r: 1
                      bg_x_pan: 1
                      bg_y_pan: 1
              default:
                callback_url: https://your-server.com/callback
                ratio: '16:9'
                prompt: >-
                  A cinematic shot of a modern glass workspace at sunrise with
                  smooth camera movement.
                style: cinematic
                model: gen4_turbo
                options:
                  seconds: 10
                  motion_vector:
                    x: 0
                    'y': 0.4
                    z: 0
                    r: -6
                    bg_x_pan: 0
                    bg_y_pan: 0
            examples:
              Default:
                summary: Default
                value:
                  callback_url: https://your-server.com/callback
                  ratio: '16:9'
                  prompt: >-
                    A cinematic shot of a modern glass workspace at sunrise with
                    smooth camera movement.
                  style: cinematic
                  model: gen4_turbo
                  options:
                    seconds: 10
                    motion_vector:
                      x: 0
                      'y': 0.4
                      z: 0
                      r: -6
                      bg_x_pan: 0
                      bg_y_pan: 0
            example:
              callback_url: https://your-server.com/callback
              ratio: '16:9'
              prompt: >-
                A cinematic shot of a modern glass workspace at sunrise with
                smooth camera movement.
              style: cinematic
              model: gen4_turbo
              options:
                seconds: 10
                motion_vector:
                  x: 0
                  'y': 0.4
                  z: 0
                  r: -6
                  bg_x_pan: 0
                  bg_y_pan: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - msg
                  - data
                  - exec_time
                properties:
                  code:
                    type: integer
                    description: Use this field according to the endpoint schema.
                  msg:
                    type: string
                    description: Use this field according to the endpoint schema.
                  data:
                    type: object
                    required:
                      - task_id
                    properties:
                      task_id:
                        type: string
                        description: Use this field according to the endpoint schema.
                      state:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      status:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      prompt:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      prompt_en:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      video_url:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      raw_video_url:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      poster:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      last_frame:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      msg:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      point:
                        type:
                          - string
                          - 'null'
                      refund:
                        type:
                          - string
                          - 'null'
                      create_time:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                      update_time:
                        type:
                          - string
                          - 'null'
                        description: Use this field according to the endpoint schema.
                    additionalProperties: true
                  exec_time:
                    type: number
                    description: Use this field according to the endpoint schema.
                example:
                  code: 200
                  msg: Request accepted.
                  data:
                    task_id: 221c136d-7888-43c3-acd3-1fcc90d51cfd
                    state: ''
                    status: '0'
                    prompt: ''
                    prompt_en: null
                    video_url: null
                    raw_video_url: null
                    poster: null
                    last_frame: null
                    msg: null
                    create_time: '0'
                    update_time: '0'
                  exec_time: 0
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |
            curl https://api.deerapi.com/runway/pro/generate \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $DEERAPI_KEY" \
              -d '{
                "callback_url": "https://your-server.com/callback",
                "ratio": "16:9",
                "prompt": "A cinematic shot of a modern glass workspace at sunrise with smooth camera movement.",
                "style": "cinematic",
                "model": "gen4_turbo",
                "options": {
                  "seconds": 10,
                  "motion_vector": {
                    "x": 0,
                    "y": 0.4,
                    "z": 0,
                    "r": -6,
                    "bg_x_pan": 0,
                    "bg_y_pan": 0
                  }
                }
              }'
        - lang: Python
          label: requests
          source: |
            import os
            import requests

            url = "https://api.deerapi.com/runway/pro/generate"
            headers = {
                "Authorization": "Bearer " + os.environ["DEERAPI_KEY"],
                "Content-Type": "application/json",
            }
            payload = {
              "callback_url": "https://your-server.com/callback",
              "ratio": "16:9",
              "prompt": "A cinematic shot of a modern glass workspace at sunrise with smooth camera movement.",
              "style": "cinematic",
              "model": "gen4_turbo",
              "options": {
                "seconds": 10,
                "motion_vector": {
                  "x": 0,
                  "y": 0.4,
                  "z": 0,
                  "r": -6,
                  "bg_x_pan": 0,
                  "bg_y_pan": 0
                }
              }
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.json())
        - lang: JavaScript
          label: fetch
          source: >
            const response = await
            fetch("https://api.deerapi.com/runway/pro/generate", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.DEERAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "callback_url": "https://your-server.com/callback",
                "ratio": "16:9",
                "prompt": "A cinematic shot of a modern glass workspace at sunrise with smooth camera movement.",
                "style": "cinematic",
                "model": "gen4_turbo",
                "options": {
                  "seconds": 10,
                  "motion_vector": {
                    "x": 0,
                    "y": 0.4,
                    "z": 0,
                    "r": -6,
                    "bg_x_pan": 0,
                    "bg_y_pan": 0
                  }
                }
              }),
            });


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a DeerAPI API Key as a Bearer token.

````