---
updatedAt: 2026-06-12T11:16:53.000Z
agentTools:
  projectIndex: https://apidocs.neuronsinc.com/llms.txt
---

# Draw Static Video Aois

# Draw static video AOIS
Specifiy the AOIs points and video frames to draw the static AOIs

## Notice

This endpoint has been marked for deprecation. While it is still completely functional, we recommend to use the brand new [update video AOIs endpoint](https://apidocs.neuronsinc.com/reference/update-video-aois).

### Pre-requisites

You must have an existing video with an associated *media\_id* and the prediction status as *done*.

Use the *media\_id* to send the **PUT** request to the endpoint `/predict/v2/videos/media_id/aois/static`

### Expected request payload

For each Area of Interest (AOI), there need to be , at least, 4 points, with both **x** (horizontal) and **y** (vertical) coordinates, so that a rectangle, or square can be set as the AOI.

**Note**: The coordinates for the points must be values within the interval 0 and 1, because it corresponds to the position relative to the with or height of the video frame image, so values like -0.3 or 1.56 will not be valid.

```json
{
  "aois": [
    {
      "points": [
        {
          "x": 0.7,
          "y": 0.2
        },
        {
          "x": 0.7,
          "y": 0.5
        },
        {
          "x": 0.9,
          "y": 0.5
        },
        {
          "x": 0.9,
          "y": 0.2
        }
      ],
      "name": "Static_Video_AOI_1",
      "start_frame": 10,
      "end_frame": 13
    }
  ]
}
```

### Example of a successful response

Upon updating the AOIs in your image, the successful response look should look like the snippet below.

**NOTE:** Every time you call this endpoint, it will completely overwrite the AOIs in your video so, if you want to append an AOI or edit an existing one, make sure to pass the current AOIs object with the appropriate changes.

```json json
{
  "detail": "AOI detection started"
}
```

**NOTE:** In case the AOI status is currently as *started* then no new calculation will be triggered and the response will be as below:

```json json
{
  "detail": "AOI detection already started"
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Neurons Customers API v2",
    "version": "2.0.0",
    "description": "Neurons Customers API"
  },
  "paths": {
    "/predict/v2/videos/{media_id}/aois/static": {
      "put": {
        "operationId": "drawStaticVideoAois",
        "summary": "Draw Static Video Aois",
        "parameters": [
          {
            "in": "path",
            "name": "media_id",
            "schema": {
              "format": "uuid4",
              "title": "Media Id",
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          }
        },
        "description": "# Draw static video AOIS\nSpecifiy the AOIs points and video frames to draw the static AOIs",
        "tags": [
          "Videos"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaticVideoAOIRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "LegacyPredictAPIAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Detail": {
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "detail"
        ],
        "title": "Detail",
        "type": "object"
      },
      "AOISpecPoint": {
        "properties": {
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          }
        },
        "required": [
          "x",
          "y"
        ],
        "title": "AOISpecPoint",
        "type": "object"
      },
      "StaticVideoAOIRequest": {
        "properties": {
          "aois": {
            "items": {
              "$ref": "#/components/schemas/StaticVideoAOISpec"
            },
            "title": "Aois",
            "type": "array"
          }
        },
        "required": [
          "aois"
        ],
        "title": "StaticVideoAOIRequest",
        "type": "object"
      },
      "StaticVideoAOISpec": {
        "properties": {
          "points": {
            "items": {
              "$ref": "#/components/schemas/AOISpecPoint"
            },
            "title": "Points",
            "type": "array"
          },
          "name": {
            "default": "",
            "title": "Name",
            "type": "string"
          },
          "aoi_type": {
            "title": "Aoi Type",
            "enum": [
              "product",
              "branding",
              "headline_text",
              "call_to_action",
              "body_text"
            ],
            "type": "string"
          },
          "start_frame": {
            "exclusiveMinimum": 0,
            "title": "Start Frame",
            "type": "integer"
          },
          "end_frame": {
            "exclusiveMinimum": 0,
            "title": "End Frame",
            "type": "integer"
          }
        },
        "required": [
          "points",
          "start_frame",
          "end_frame"
        ],
        "title": "StaticVideoAOISpec",
        "type": "object"
      }
    },
    "securitySchemes": {
      "LegacyPredictAPIAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.neuronsinc.com"
    }
  ]
}
```