# JSON2Video

> Render videos from movie definitions or templates and manage your media library.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/json2video

## Actions

### Delete a rendered video

Remove the rendered media for the selected project.

**Inputs**

- Project (`project`, text, required): The project ID from Render a video.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Get a media file

Read the details and URL for an existing media file.

**Inputs**

- Path (`path`, text, required): The file path, such as videos/clip.mp4.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "file": {
      "folder": "example",
      "name": "example",
      "status": "example",
      "type": "example",
      "url": "example"
    },
    "success": true
  }
}
```

### Get a video template

Read a saved template definition or its variables.

**Inputs**

- Template (`template_id`, text, required): Choose the saved template.
- Format (`format`, text): Choose a variables format, or leave empty for the movie definition. One of: `make`, `jsonschema`.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "success": true,
    "template": {
      "description": "example",
      "id": "example",
      "movie": "example",
      "name": "example",
      "variables": {}
    }
  }
}
```

### Get media storage usage

Check storage consumption and whether uploads are blocked.

**Inputs**: None.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "storage": {
      "blocked": true,
      "credits_per_week": 1,
      "free_allowance": 1,
      "used_bytes": 1
    },
    "success": true
  }
}
```

### Get video status

Read the render status and the finished download URL.

**Inputs**

- Project (`project`, text, required): The project ID from Render a video.
- Format (`format`, text): Leave empty to include the original movie JSON. One of: `simple`.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "movie": {
      "created_at": "example",
      "ended_at": "example",
      "message": "example",
      "project": "example",
      "status": "example",
      "url": "example"
    },
    "success": true
  }
}
```

### List library templates

Browse templates supplied by JSON2Video.

**Inputs**: None.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "success": true,
    "templates": [
      {
        "description": "example",
        "id": "example",
        "movie": {},
        "name": "example"
      }
    ]
  }
}
```

### List media in a folder

Browse files in a media folder.

**Inputs**

- Path (`path`, text): The media folder to read.
- Type (`type`, text): The kind of media to return. One of: `image`, `video`, `audio`, `other`.
- Search (`search`, text): Part of a file name.
- Page (`page`, number): The page number, starting at 0. At least 0.
- Page size (`page_size`, number): Number of files per page. From 1 to 100.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "files": [
      {
        "folder": "example",
        "name": "example",
        "status": "example",
        "type": "example",
        "url": "example"
      }
    ],
    "folders": [
      "example"
    ],
    "total": 1
  }
}
```

### List rendered videos

List video projects created during a date range.

**Inputs**

- Start time (`start_time`, date and time): Start of the creation window.
- End time (`end_time`, date and time): End of the creation window.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.
- Cursor (`cursor`, text): The next-page token from the previous response.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "has_next": true,
    "movies": [
      {
        "created_at": "example",
        "ended_at": "example",
        "message": "example",
        "project": "example",
        "status": "example",
        "url": "example"
      }
    ],
    "next_token": "example",
    "success": true
  }
}
```

### List video templates

List saved templates, optionally filtering by tag.

**Inputs**

- Tag (`tag`, text): The template tag to match.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "success": true,
    "templates": [
      {
        "description": "example",
        "id": "example",
        "movie": {},
        "name": "example"
      }
    ]
  }
}
```

### Render a video

Start a render from a movie JSON definition.

**Inputs**

- Movie (`movie`, object, required): The movie definition with scenes and elements.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "project": "example",
    "success": true
  }
}
```

### Render a video from a template

Start a render using a saved template and its variable values.

**Inputs**

- Template (`template`, text, required): Choose the template to render.
- Variables (`variables`, object): Values for the template variables.

**Outputs**

- `data` (object): The response from JSON2Video.

**Example output**

```json
{
  "data": {
    "project": "example",
    "success": true
  }
}
```
