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

# Create Video

# Create video
Creates a video object in the system and returns a resumable url to upload the video
--**content_type** the content type of the video
--**total_bytes** the size of the video

### Expected request payload

The request body must be populated with the video characteristics:

* **content\_type**: Can be in one of the following formats:
  * mp4 (`video/mp4`)
  * webm (`video/webm`)
  * mov (`video/mov`)
  * mkv (`video/mkv`)
  * avi (`video/avi`)
* **total\_bytes**: The size of the video file (in bytes)
* **name**: This is an optional parameter
* **Maximum allowed file size**: 500 MB (The upload URL will only accept the exact specified file size)
* **Maximum allowed video resolution:**  3000x3000

```json JSON
{
  "content_type": "video/mp4",
  "total_bytes": 953311
}
```

For more information on video upload requirements, please refer to [this page](https://knowledge.neuronsinc.com/upload-requirements-predict).

### Example of a successful response

The response contains two properties:

* The *media\_id*: serves as an identifier for the video media (to be used on any operation for the video)
* The resumable\_url: this URL is where the video file will have to be upload.

```json
{
  "resumable_url": "https://storage.googleapis.com/upload/storage/v1/b/o?uploadType=resumable&upload_id=",
  "media_id": "0d1aeafa-d360-47c2-afaf-c6149281c202"
}
```

### Upload video file to Cloud Services

In order to upload the video file to the cloud storage, and thus make it eligible for prediction, it is necessary to send a **PUT** request to the *resumable\_url*. The resumable upload endpoint follows the [Google Cloud Storage expected format](https://cloud.google.com/storage/docs/performing-resumable-uploads#single-chunk-upload).

```shell
curl -i -X PUT --data-binary '@/path/to/file/video_ad.mp4' \
    -H "Content-Length:YOUR_VIDEO_SIZE" \
    "https://storage.googleapis.com/upload/storage/v1/b/o?uploadType=resumable&upload_id="
```

This should elicit a successful response with a 200 status, which means that the video has been successfully uploaded.

# 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": {
      "post": {
        "operationId": "createVideo",
        "summary": "Create Video",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVideoOut"
                }
              }
            }
          },
          "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": "# Create video\nCreates a video object in the system and returns a resumable url to upload the video\n--**content_type** the content type of the video\n--**total_bytes** the size of the video",
        "tags": [
          "Videos"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVideoIn"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "LegacyPredictAPIAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Detail": {
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "detail"
        ],
        "title": "Detail",
        "type": "object"
      },
      "CreateVideoOut": {
        "properties": {
          "resumable_url": {
            "title": "Resumable Url",
            "type": "string"
          },
          "media_id": {
            "format": "uuid4",
            "title": "Media Id",
            "type": "string"
          }
        },
        "required": [
          "resumable_url",
          "media_id"
        ],
        "title": "CreateVideoOut",
        "type": "object"
      },
      "CreateVideoIn": {
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "total_bytes": {
            "title": "Total Bytes",
            "type": "integer"
          }
        },
        "required": [
          "content_type",
          "total_bytes"
        ],
        "title": "CreateVideoIn",
        "type": "object"
      }
    },
    "securitySchemes": {
      "LegacyPredictAPIAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.neuronsinc.com"
    }
  ]
}
```