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

# Delete video

> Permanently delete a finished video job and its video

Permanently deletes a finished job (`completed`, `failed` or `cancelled`) and its video. Without a delete, a completed video is kept for 7 days after it finishes and then removed automatically.

After deletion, the job returns `404` and no longer appears in [List videos](https://docs.inworld.ai/api-reference/videoAPI/list-videos.md). Its `Idempotency-Key` cannot be reused: a create with that key returns `409` with `code: "idempotency_key_reused"`. Deleting a job does not refund it.

## API reference

**Endpoint:** `DELETE https://api.inworld.ai/v1/videos/{video_id}`

### Authorization

- `Authorization` (string; required) — Your [authentication](https://docs.inworld.ai/api-reference/introduction.md) credentials. For Basic authentication, populate `Basic $INWORLD_API_KEY`.

### Path parameters

- `video_id` (string; required) — The id of a video job your workspace created (`video_` followed by 32 hexadecimal characters).

### Response

Status: `200`. Content type: `application/json`.

- `id` (string)
- `object` (enum<string>; options: "video.deleted")
- `deleted` (enum<boolean>; options: true)

### Response examples

#### 200: default_response

```json
{
  "id": "video_8f14e45fceea167a5a36dedd4bea2543",
  "object": "video.deleted",
  "deleted": true
}
```

#### 401: default_response

```json
"Unauthorized"
```

#### 403: default_response

```json
"Forbidden"
```

#### 404: default_response

```json
{
  "error": {
    "message": "seconds must be an integer from 2 to 30",
    "type": "invalid_request_error",
    "code": "string",
    "param": "seconds"
  }
}
```

#### 409: default_response

```json
{
  "error": {
    "message": "seconds must be an integer from 2 to 30",
    "type": "invalid_request_error",
    "code": "string",
    "param": "seconds"
  }
}
```

#### 429: default_response

```json
"Rate limit exceeded"
```

#### 500: default_response

```json
{
  "error": {
    "message": "seconds must be an integer from 2 to 30",
    "type": "invalid_request_error",
    "code": "string",
    "param": "seconds"
  }
}
```

#### 503: default_response

```json
{
  "error": {
    "message": "seconds must be an integer from 2 to 30",
    "type": "invalid_request_error",
    "code": "string",
    "param": "seconds"
  }
}
```

### Code examples

#### cURL

```bash
curl -X DELETE 'https://api.inworld.ai/v1/videos/video_8f14e45fceea167a5a36dedd4bea2543' \
  -H "Authorization: Basic $INWORLD_API_KEY"
```

#### Python

```python
import requests

url = "https://api.inworld.ai/v1/videos/%7Bvideo_id%7D"
headers = {
  "Authorization": "<api_key>"
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
```

#### JavaScript

```javascript
const options = {method: 'DELETE', headers: {"Authorization":"<api_key>"}};

fetch('https://api.inworld.ai/v1/videos/%7Bvideo_id%7D', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```
