# Create Video — Visibot

> Process a video from a URL with custom caption settings. See the documentation

- Key: `visibot-create-video`
- Type: Action (Write)
- Version: 0.0.1
- App: Visibot (`visibot`) — https://pipedream.com/apps/visibot.md
- This page (HTML): https://pipedream.com/apps/visibot/actions/create-video
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/visibot/actions/create-video/create-video.mjs

## Description

Process a video from a URL with custom caption settings. [See the documentation](https://dashboard.visibot.app/api-docs#video-api-POSTapi-video-create)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `videoUrl` | `string` | Yes | The URL of the video to process |
| `captions` | `string[]` | No | Array of objects with the following properties: start (number) - The start time of the caption in seconds end (number) - The end time of the caption in seconds text (string) - The text of the caption emoji (string) - The emoji of the caption Example: [ { "start": 0, "end": 1, "text": "Hello, world!", "emoji": "✉️" } ] |
| `language` | `string` | No | Language code (ISO-639-1) for subtitles (e.g. en, es, fr) |
| `resizeForSocialMedia` | `boolean` | No | Resize the video to 9:16 vertical format for social media |
| `captionsFontColor` | `string` | No | Caption font color as a hex code (e.g. #FF5733) |
| `captionsHighlightColor` | `string` | No | Highlight color for spoken words as a hex code (e.g. #FF5733) |
| `captionsOutlineColor` | `string` | No | Caption outline color as a hex code (e.g. #FF5733) |
| `captionsPosition` | `string` | No | Position of the captions. Use top, middle, bottom, or a value between 0.1 and 0.9 |
| `captionsFontSize` | `integer` | No | Font size for captions, between 18 and 65 |
| `captionsFontFamily` | `string` | No | Font family for captions |
| `captionsAddEmojis` | `boolean` | No | Whether to add emojis to captions |
| `captionsOutlineThickness` | `integer` | No | Thickness of the caption outline, between 0 and 20 |
| `callback` | `string` | No | URL to notify when video processing is complete |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "visibot",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "visibot-create-video",
  arguments: {
    videoUrl: "Video URL",
    captions: ["Captions"],
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "visibot-create-video",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    visibot: { authProvisionId: "apn_xxxxxxx" },
    videoUrl: "Video URL",
    captions: ["Captions"],
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "visibot-create-video",
    "configured_props": {
      "visibot": { "authProvisionId": "apn_xxxxxxx" },
      "videoUrl": "Video URL",
      "captions": ["Captions"]
    }
  }'
```

---

- App: https://pipedream.com/apps/visibot.md · All apps: https://pipedream.com/apps
