# Create a WebM Video

Creates a video in WebM format. 

<Callout icon="📘" theme="info">
  **Note:**

  * Scroll down to the **Responses** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/video.webm": {
      "post": {
        "summary": "Create a WebM Video",
        "description": "Create a WebM Video",
        "operationId": "create-a-webm-video",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_pose_id": {
                    "type": "string",
                    "description": "ID of the avatar's pose. Can be retrieved from <a href=\"https://docs.heygen.com/reference/list-avatars-v2\" target=\"_blank\">List All Avatars (V2)</a> endpoint. It corresponds to the same value as the `avatar_id` field returned in the response. ",
                    "default": "Vanessa-invest-20220722"
                  },
                  "avatar_style": {
                    "type": "string",
                    "description": "Visual style of the avatar. ",
                    "default": "normal",
                    "enum": [
                      "normal",
                      "closeUp"
                    ]
                  },
                  "input_text": {
                    "type": "string",
                    "description": "The text that the avatar will speak in the video. Either (`input_text` & `voice_id`) or `input_audio` needs to be provided. Omitting both or defining both will result in an error. ",
                    "default": "This is a WebM video generated by HeyGen API"
                  },
                  "voice_id": {
                    "type": "string",
                    "description": "Unique identifier of the voice that the avatar will use. Either (`input_text` & `voice_id`) or `input_audio` needs to be provided. Omitting both or defining both will result in an error. Can be retrieved from <a href=\"https://docs.heygen.com/reference/list-voices-v2\" target=\"_blank\">List All Voices (V2)</a> endpoint. ",
                    "default": "1bd001e7e50f421d891986aad5158bc8"
                  },
                  "input_audio": {
                    "type": "string",
                    "description": "URL/ID of the uploaded audio. Either (`input_text` & `voice_id`) or `input_audio` needs to be provided. Omitting both or defining both will result in an error. Can be retrieved from <a href=\"https://docs.heygen.com/reference/upload-asset\" target=\"_blank\">Upload Asset</a> endpoint.  "
                  },
                  "dimension": {
                    "type": "object",
                    "description": "Custom dimensions for the output video. The output will be scaled based on the height of the original avatar size.",
                    "properties": {
                      "width": {
                        "type": "integer",
                        "default": 1280,
                        "format": "int32",
                        "description": "Width of the output video. "
                      },
                      "height": {
                        "type": "integer",
                        "default": 720,
                        "format": "int32",
                        "description": "Height of the output video. "
                      }
                    }
                  }
                },
                "required": [
                  "avatar_style",
                  "avatar_pose_id",
                  "input_text",
                  "voice_id",
                  "input_audio"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Video created successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "code": 100,
                      "data": {
                        "video_id": "ar73b5e326254e012g7303c4b1ab63c4"
                      },
                      "msg": null,
                      "message": null
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Status code indicating the result of the API request. A 100 indicates a successful response. Other codes might indicate different types of errors. Refer to the <a href=\"https://docs.heygen.com/reference/errors\" target=\"_blank\">Error Responses</a> for more details. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "video_id": {
                          "type": "string",
                          "description": "Unique identifier of the generated video. "
                        }
                      },
                      "description": "Contains the video details. "
                    },
                    "msg": {
                      "type": "string",
                      "description": "Legacy field for messages. This field is deprecated."
                    },
                    "message": {
                      "type": "string",
                      "description": "New field for messages. Contains human-readable messages explaining the status of the request. In case of errors, it returns an explanation."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Avatar does not support WebM. ",
            "content": {
              "application/json": {
                "examples": {
                  "Avatar Does Not Support WebM": {
                    "value": {
                      "code": 400175,
                      "message": "Avatar Abigail_standing_office_front does not support WebM"
                    },
                    "summary": "Avatar Does Not Support WebM"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```