---
updatedAt: 2026-10-30T02:14:26.000Z
agentTools:
  projectIndex: https://docs.vizard.ai/llms.txt
---

# Publish Clips to Social Media

Publish a generated clip to a connected social account. 

<br />

Vizard automatically creates the post caption and relevant hashtags for you. You can publish the video immediately or schedule it for a future time.

**Supported platforms**

* TikTok
* YouTube
* Instagram
* Facebook
* Twitter(X)
* LinkedIn

> This endpoint corresponds to the <Anchor label="**Auto Schedule**" target="_blank" href="https://help.vizard.ai/en/articles/10848181-auto-schedule-post-ai-clips">**Auto Schedule**</Anchor> feature in the Vizard web app, which appears when you submit a long video for clipping.
>
> <Image align="center" border={false} src="https://files.readme.io/d0ed5ca5a6566ac7aae9f545b3dacb4f87463b85127dad83199667035dd9e312-Frame_1321316020.png" />
>
> <br />

<Callout icon="📘" theme="info">
  ### X (Twitter) posts with links use credits

  When you publish to X, a post whose `post` text contains a URL starting with `http://` or `https://` uses **10 credits**. Posts without links don't use extra credits. A post is charged once, no matter how many links it contains.

  Credits are checked and used when the post is published, not when you call this endpoint. For scheduled posts (`publishTime` set), that's the scheduled time. If your balance is too low at that moment, the post isn't published. Publishing to other platforms is not affected. <Anchor target="_blank" href="https://help.vizard.ai/en/articles/17765692-why-do-x-posts-with-links-use-credits">Learn more</Anchor>
</Callout>

# Example Request

```curl
curl -X POST "https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/publish-video" \
  -H "Content-Type: application/json" \
  -H "VIZARDAI_API_KEY: YOUR_API_KEY" \
  -d '{
    "finalVideoId": 14015572,
    "publishTime": 1767605047792,
    "socialAccountId": "123456",
    "post": "Your post content here",
    "title": "Your YouTube title here"
  }'
```

> If `publishTime` is not provided, the video will be published immediately.
> title is only used when publishing to YouTube and can be omitted for other platforms.

## Parameter Values and Meanings

| Field             | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `finalVideoId`    | long   | ❌        | The ID of the generated video returned from [**Retrieve Output**](https://docs.vizard.ai/docs/retrieve-video-clips) Videos endpoint. Exactly one of videoUrl or finalVideoId must be provided.                                                                                                                                                                              |
| `videoUrl`        | string | ❌        | Video file resource address that can be directly downloaded. Exactly one of videoUrl or finalVideoId must be provided.  When using `videoUrl`, Vizard does not automatically generate post captions or hashtags.                                                                                                                                                            |
| `publishTime`     | long   | ❌        | Unix timestamp for scheduled publishing. If not set, the video is published immediately.                                                                                                                                                                                                                                                                                    |
| `socialAccountId` | String | ✅        | The ID of the connected social account returned by the [**Retrieve Social Accounts**](https://docs.vizard.ai/docs/retrieve-social-accounts)  endpoint.                                                                                                                                                                                                                      |
| `post`            | String | ❌        | Video description for the social post. Empty string is allowed — AI will generate content automatically. [**Character limits**](https://docs.vizard.ai/docs/publish-clips-to-social-media#video-post-character-limits) vary by platform. **For X, text containing a URL starting with&#x20;**`http://`**&#x20;or&#x20;**`https://`**&#x20;uses 10 credits when published.** |
| `title`           | String | ❌        | YouTube video title. Only used for YouTube. If empty, an AI-generated title will be used.                                                                                                                                                                                                                                                                                   |

# Example Response

```json
{
  "code": 2000
}
```

## Parameter Values and Meanings

| Field    | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| `code`   | int    | Status code of the request.                         |
| `errMsg` | string | Error message, shown only when `code` is not `2000` |

## Status Codes

| Code    | Meaning                    |
| :------ | :------------------------- |
| `2000`  | Publish succeeded          |
| `-1000` | Invalid request parameters |
| `4001`  | Invalid API key            |
| `4004`  | Feature requires upgrade   |
| `4006`  | Illegal parameter          |
| `4011`  | Invalid social account ID  |

## Video Post Character Limits

| Platform    | Character limit           |
| :---------- | :------------------------ |
| TikTok      | 2,200                     |
| YouTube     | 5,000 (post), 100 (title) |
| Instagram   | 2,200                     |
| Facebook    | 2,200                     |
| Twitter (X) | 280                       |
| LinkedIn    | 3,000                     |