# QPost > Video publishing infrastructure for AI agents. QPost publishes to the three > platforms that matter for generated video — YouTube, TikTok, and Instagram — > through a REST API and a native MCP server, so an agent can publish > autonomously without a human clicking through a dashboard. > > Publishing to these three requires app approvals (TikTok video.publish, > Instagram content publishing, YouTube upload) that take months to obtain. > QPost already holds them, so you connect an account and publish immediately. QPost is API-first. A human connects their social accounts once and generates an API key; from then on an agent can create, schedule, inspect, retry, and delete posts on its own. ## Using QPost as an agent Hosted MCP endpoint (nothing to install) — point your client at: ``` https://qpost.dev/mcp ``` Authenticate with your QPost API key via the `x-api-key` header (or `Authorization: Bearer `). Transport is Streamable HTTP, stateless. Or run it locally over stdio: ``` claude mcp add qpost -e QPOST_API_KEY=your_key_here -- npx -y qpost-mcp ``` Available MCP tools: `list_connected_accounts`, `get_account_stats`, `create_post`, `list_posts`, `get_post`, `get_post_stats`, `update_post`, `delete_post`, `retry_post`. (`get_post_stats` / `GET /api/post/:id/stats`: views, likes, comments and shares per platform, TikTok so far.) Tested n8n workflow (built-in nodes, draft-first): https://qpost.dev/guides/n8n-tiktok-instagram-youtube/ Download: https://qpost.dev/examples/n8n-video-draft.json On self-hosted n8n, install the community node `n8n-nodes-qpost` (https://github.com/arslan2012/n8n-nodes-qpost): create, schedule, retry and delete posts and read their stats from a workflow. Authenticate REST calls with the `x-api-key` header (or `Authorization: Bearer `). Keys carry scoped permissions (`posts: read/write/delete`). ## Key endpoints - `POST /api/post` — create/schedule a post (multipart form: `caption`, `platforms` JSON, `video` or `images[]`, optional `title`, `scheduledFor`, `timezone`) - `GET /api/post` — list posts, filter by `status` or `platform` - `GET|PATCH|DELETE /api/post/{id}` — inspect, update, or remove a post - `POST /api/post/{id}/retry` — retry a failed post - `GET /api/accounts` — list connected platforms before posting Platforms: `YOUTUBE`, `TIKTOK`, `INSTAGRAM`. Post statuses: `DRAFT`, `SCHEDULED`, `POSTED`, `FAILED`. ## Requirements worth knowing before you call **Every post needs media.** YouTube, TikTok and Instagram are all media-only — none of them can publish text on its own. A post without a video or at least one image is rejected up front with `400 MEDIA_REQUIRED` rather than failing later at the platform. Media reaches a hosted server by value, not by path: pass `mediaUrl` / `imageUrls` (publicly reachable) or `mediaBase64`. QPost downloads the file and re-hosts it before publishing, so a signed or expiring URL from an upstream generation API works directly, and TikTok's `url_ownership_unverified` check does not apply to it. Publishing is asynchronous on TikTok. `create_post` returns as soon as TikTok accepts the upload; the post settles to `PUBLISHED` or `FAILED` shortly after, so poll `get_post` rather than treating the create response as final. `get_post`, `update_post`, `delete_post` and `retry_post` take the post's `id`. Once TikTok makes a video public, `get_post` includes its link in that platform's `platformMetadata.postUrl` (and the bare id in `postId`). TikTok can take a while after PUBLISH_COMPLETE to hand the id out; it fills in within minutes. Private (SELF_ONLY) posts never get one. Generated video should say so. In TikTok `metadata`, set `"isAigc": true` and TikTok shows its AI-generated label; set `"commercialContentSelections": ["YOUR_BRAND"]` when the post promotes your own product, or `["BRANDED_CONTENT"]` for a paid partnership (which cannot be private). Errors come back as JSON with a `code` where one applies — `MEDIA_REQUIRED`, `QUOTA_EXCEEDED` — and platform errors are translated into plain language rather than passed through as raw platform codes. ## Docs - [API & MCP documentation](https://qpost.dev/docs): full request/response shapes and per-platform metadata options - Guides to specific platform errors: [unaudited_client_can_only_post_to_private_accounts](https://qpost.dev/guides/tiktok-unaudited-client-private/), [url_ownership_unverified](https://qpost.dev/guides/tiktok-url-ownership-unverified/), [are YouTube API uploads still forced private?](https://qpost.dev/guides/youtube-api-uploads-private/), [approval requirements](https://qpost.dev/guides/publishing-api-access/), [silent publishing failures](https://qpost.dev/guides/silent-publishing-failures/) - Comparisons: [QPost vs Ayrshare](https://qpost.dev/compare/ayrshare/) - [qpost-mcp source](https://github.com/arslan2012/qpost-mcp) - [qpost-mcp on npm](https://www.npmjs.com/package/qpost-mcp) - [Terms](https://qpost.dev/terms) / [Privacy](https://qpost.dev/privacy) ## Support Email support@qpost.dev — questions about the API, platform approvals, or a post that failed to publish. Self-hosted TikTok app eligibility and publishing options: https://qpost.dev/guides/self-hosted-tiktok-publishing/ Publishing errors and retries: - Publishing or scheduling requires a saved platform connection. Otherwise create/retry returns 409 PLATFORM_CONNECTION_REQUIRED, with platforms and accountsUrl. Connect/reconnect there first. Drafts can be saved without a connection. A successful local check does not guarantee a token is still accepted by the platform. - TikTok spam_risk_too_many_posts means its API posting cap was reached for the last 24 hours. Pause API posting; do not immediately retry in a loop or create duplicate posts. Retry the failed post later. Reconnecting does not reset the cap, and TikTok gives no exact reset time. Manual posting in the TikTok app is an alternative. QPost does not automatically retry failed posts. TikTok account statistics: GET /api/accounts/tiktok/stats or MCP get_account_stats returns followers, following, total likes, public-video count and fetchedAt. Uses user.info.stats. Existing connections need reauthorization in Accounts if 409 TIKTOK_STATS_SCOPE_REQUIRED is returned. Video view metrics still require video.list and use get_post_stats. Account totals are not per-video metrics.