Skip to content
UGC API

The publish button for UGC generator apps

If your app generates hooks, slideshows or AI UGC videos, your users' next question is how to post it. UGC API is the posting layer behind that button, so you don't maintain four platform integrations. It started as the publisher inside UGCHooks.

Updated

Why build on an API instead of direct integrations

Each platform has its own app review, its own media flow and its own failure modes. TikTok requires an audit before posts can be public. Meta requires App Review for the publish permission. YouTube gives each project a small daily upload quota. Building and keeping all four working is a team's worth of maintenance. Our comparison breaks down the work.

How it fits into your app

  1. Connect. When a user clicks Connect TikTok, your backend calls POST /v1/accounts/connect with external_id set to your user ID and redirect_url set to a page in your app. Redirect the user to the returned URL.
  2. Generate. Your app renders the video or slides as it does today.
  3. Publish. Your backend sends POST /v1/posts with the file URLs, the user's account IDs and the caption. Use scheduled_at if you offer scheduling.
  4. Show results. Handle post.published and post.failed webhooks and show the live link or the error in your UI.
javascript
// Your backend: start a TikTok connect for one of your users
const r = await fetch("https://ugcapi.dev/v1/accounts/connect", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.UGCAPI_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    platform: "tiktok",
    external_id: user.id,
    redirect_url: "https://yourapp.com/settings/social?connected=1",
  }),
});
const { url } = await r.json();
// redirect the user to url

Pricing that works for a SaaS margin

Posts cost $0.01 or less each: $10 per 1,000, $40 per 5,000, $70 per 10,000. There is no monthly minimum and no per-user fee, so a free-tier user who posts twice costs you two cents. You can pass that through in your own plans however you like. See pricing.

Features generator apps ask for

  • Slideshows to TikTok photo mode with auto music. See slideshow API.
  • Instagram Story frames from the same slides.
  • TikTok drafts, so users can add a trending sound before posting.
  • TikTok's AI-generated label for AI avatar videos.
  • White-label connect, so users see your app's flow before and after the platform login. See white-label account connect.

FAQ

Will my users see UGC API during connect?

They start and end in your app via redirect_url. The platform's own login page sits in the middle, as with any OAuth flow.

How do I map accounts to my users?

Set external_id to your user ID on the connect call. Then list accounts with GET /v1/accounts?external_id=... .

Do I need to host the generated files?

No. You can upload them to POST /v1/media. We keep them until 3 days after the last post that uses them, then delete them.

Is there a monthly minimum?

No. You buy credit packs and they never expire. You start with 50 free posts.

Related