# Videos API

Make more videos from a ready format, read one video and its files with their links, and list your videos newest first.

## Make videos

`POST /api/v1/formats/{id}/videos`

Makes more videos from a format that is `ready`. Needs **Videos: Write**.

| Field | Needed | What it is |
|---|---|---|
| `style` | optional | One of the styles the format was made with. None: the format in the site's own look. |
| `count` | optional | How many videos, 1 to 6. Default 1. Each is its own video with its own id. |
| `aspects` | optional | Any of `"9:16"`, `"1:1"`, `"16:9"`. Default: the format's. |
| `voiceover` | optional | `true` or `false`. Default: the format's. |
| `music` | optional | `false` for no music, with `"engine": "motion-v1-flash"` only. Default: the format's. |
| `engine` | optional | `"motion-v1"` or `"motion-v1-flash"`. Default: `"motion-v1"`. [Motion V1 Flash](/docs/models) makes videos only, at its own price, and does not use `style`. |

cURL:

```bash
curl https://10xvid.com/api/v1/formats/FORMAT_ID/videos \
  -H "Authorization: Bearer $TENX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"style": "whiteboard", "count": 2, "aspects": ["9:16", "1:1"]}'
```

JavaScript:

```js
const res = await fetch(`https://10xvid.com/api/v1/formats/${formatId}/videos`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.TENX_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ style: 'whiteboard', count: 2, aspects: ['9:16', '1:1'] }),
});
const { data: videos } = await res.json();
```

Python:

```python
res = requests.post(
    f"https://10xvid.com/api/v1/formats/{format_id}/videos",
    headers={"Authorization": f"Bearer {os.environ['TENX_API_KEY']}"},
    json={"style": "whiteboard", "count": 2, "aspects": ["9:16", "1:1"]},
)
videos = res.json()["data"]
```

The answer is `202` with the new videos, each `"status": "making"`. A format that is not ready answers `409` with what it waits for.

## The video object

```json
{
  "id": "MV40XXRN514AA9",
  "object": "video",
  "format": "typally-com-mgn4x2a1",
  "style": "whiteboard",
  "status": "done",
  "aspects": ["9:16", "1:1"],
  "engine": "motion-v1",
  "voiceover": false,
  "music": true,
  "length": 15,
  "created": "2026-10-13T09:20:41.003Z",
  "finished": "2026-10-13T10:02:17.912Z",
  "error": null,
  "files": [
    {
      "video_id": "MV40XXRN514AA9-V1",
      "aspect": "9:16",
      "url": "https://10xvid.com/files/brands/.../final.mp4?dl=...",
      "poster": "https://10xvid.com/files/brands/.../poster.jpg?dl=...",
      "width": 1080,
      "height": 1920,
      "duration": 15.04,
      "title": "Write while you talk"
    }
  ]
}
```

| Field | What it is |
|---|---|
| `id` | The video's id. |
| `object` | Always `video`. |
| `format` | The format it was made from. |
| `style` | The style it was made in, or `null` for the site's own look. |
| `status` | `making`, `done`, `failed` or `stopped`. |
| `progress` | From 0 to 1, while it is `making`. |
| `aspects` | The shapes it is made in. |
| `engine` | `motion-v1` or `motion-v1-flash`: which made it; `image-v1` on an image. |
| `voiceover`, `music`, `length` | As it was made. |
| `created`, `finished` | When it started and ended. |
| `error` | A sentence when it `failed`. What it cost was given back. |
| `files` | One for each finished shape. Empty until then. |

Each file:

| Field | What it is |
|---|---|
| `video_id` | The file's own id, as the app shows it. |
| `aspect` | `9:16`, `1:1` or `16:9`. |
| `url` | The MP4. It works on its own, with no key, for seven days. Ask for the video again for a fresh link. |
| `poster` | A still of it, on the same terms. |
| `width`, `height`, `duration` | In pixels and seconds. |
| `title` | Its title, when it has one. |

## Get a video

`GET /api/v1/videos/{id}`

One video. The video's `id` or one of its files' `video_id` works. Needs **Videos: Read**.

## List videos

`GET /api/v1/videos`

Your videos, newest first. Needs **Videos: Read**.

| Query | What it is |
|---|---|
| `format` | Only this format's videos. |
| `limit` | How many, from 1 to 100. Default 20. |
| `before` | Only videos made before this moment, as an ISO date or milliseconds. |
