Relay
DocsLog inSign up

Relay docs

Relay schedules and publishes posts to Instagram, TikTok, YouTube and Threads. Everything the dashboard does is also available to machines: a REST API for your own code, and an MCP server for AI agents — both authenticated with the same API key.

What Relay does

Publishing to Instagram, TikTok, YouTube or Threads from an API is more involved than one HTTP call. You need reviewed developer apps, tokens that expire (60 days on Instagram and Threads, 24 hours on TikTok, an hour on YouTube), publicly reachable media URLs or a resumable upload, an asynchronous create → poll → publish handshake, and caps that silently stop you — 50 posts a day per account on Instagram, 250 on Threads, about 15 on TikTok, and a daily upload quota on YouTube. Relay owns all of that.

  • Connections. OAuth with Instagram Login, TikTok Login Kit, Google and Threads, tokens encrypted at rest (AES-256-GCM) and refreshed automatically before they expire.
  • Media. Upload bytes, send base64 inline (over the API or MCP), or hand Relay a public URL; it validates the format, dimensions and video length against each platform's rules and hosts the file for you. Agents holding a local file with no public URL to offer can park it at POST /v1/uploads (a video over 90 MB, up to 2 GB, in parts through POST /v1/uploads/sessions) and pass back the short-lived link it returns.
  • Scheduling. A scheduler claims due posts every minute, so "publish now" and "publish next Tuesday at 09:00" are the same code path.
  • Delivery. Instagram containers and carousel children, TikTok video and photo posts (straight to the profile or into the TikTok inbox), YouTube Shorts and videos (a resumable upload that picks up where it stopped), Threads text posts, images, videos, carousels and multi-post threads, status polling, retries on transient errors, and a per-account outcome you can read back — with the platform's own error code and message when something is rejected.

One post can target several accounts. Each target succeeds or fails independently, which is why a post can end up partly published.

A post can target Instagram, TikTok, YouTube and Threads accounts together. TikTok posts also need a tiktok object — who can view the post, which interactions are allowed, and any commercial disclosure — because TikTok requires the creator to choose those. See TikTok requirements. YouTube posts need a youtube object — the video's title, its visibility, and whether it is made for kids — and one made with an API key is saved as a draft for a person to upload from Relay, because YouTube requires the person to see its upload notice and confirm. See YouTube requirements. A post to Threads accounts alone may be text only, and Threads counts its 500 characters its own way (an emoji counts as several); an optional threads object says who can reply, sets a topic or a link preview, and adds further posts that make it a thread. See Threads requirements.

Core objects

Five objects carry the whole model. Every one of them is scoped to your account.

ObjectWhat it is
accountA connected Instagram, TikTok or Threads profile, or a YouTube channel. Carries the encrypted tokens, connection health, token expiry, and cached follower/media counts. Its id is what you pass as a post target.
mediaAn image or video stored by Relay and served from a public URL — which is what Instagram, TikTok and Threads fetch at publish time (Relay uploads YouTube videos itself). Reusable across posts.
postA caption, an ordered list of media (none on a Threads text post), a post type, TikTok settings when it targets TikTok, YouTube settings when it targets YouTube, Threads settings when it targets Threads, and a schedule. Carousel slides can each carry their own caption on top of the post’s. Holds the roll-up status across all its targets.
targetOne post ↔ one account. Owns the real outcome: the platform’s post ID, the permalink, and the error if it failed.
api keyA rly_live_… secret that authorizes both the REST API and the MCP server. Only a SHA-256 hash is stored, so a lost key can be revoked but never recovered.

Publishing lifecycle

Creating a post never blocks on Instagram. The API validates and queues; a scheduler running every minute does the work. That means a successful POST /v1/posts means "accepted", not "live" — read the post back to find out what happened.

create ─► scheduled ──(scheduler claims it)──► publishing ─┬─► published   all targets ok
                                                        ├─► partly      some ok, some failed
                                                        └─► failed      every target failed

per target:  pending ─► uploading (carousel children, YouTube upload) ─► processing ─► published
                                                                                   └─► failed

Images usually finish inside the tick that claims them. Video is slower: Instagram transcodes asynchronously, so the target sits in processing and Relay re-checks it on later ticks. A YouTube video is uploaded in pieces over one or more ticks, then processed by YouTube. A Threads text post, or a short thread of them, usually goes out in one or two ticks. Transient platform errors (429s, 5xx) don't fail a post — they're retried. See Timing & retries, YouTube quota & timing and Threads publishing for the exact budgets.

Quickstart

Five minutes from nothing to a scheduled post.

1. Create an API key

In the dashboard, go to API keys and create one. The full value is shown exactly once — store it in your secret manager. The same key authorizes the REST API and the MCP server.

2. Connect an account

Go to Accounts → Connect account and pick Instagram, TikTok, YouTube or Threads. An Instagram account must be a professional one (Business or Creator); personal accounts are rejected during the connect flow, not at publish time. Any TikTok account works. For YouTube, sign in with the Google account that owns or manages the channel and leave every permission ticked. Any Threads profile works, with or without a linked Instagram account: sign in with your Threads login and leave the posting permission ticked.

3. Find the account ID

curl https://api.relay.lantean.tech/v1/accounts \
  -H "Authorization: Bearer $RELAY_API_KEY"
{
  "accounts": [
    {
      "id": "9d1f2c34-5b6a-4c8d-9e0f-1a2b3c4d5e6f",
      "platform": "instagram",
      "username": "northlight.co",
      "status": "connected",
      "followersCount": 12840
    }
  ]
}

4. Schedule a post

Media can be a public URL — Relay fetches and stores it — or an ID from an earlier upload. Omit schedule_at to publish on the next tick instead.

curl -X POST https://api.relay.lantean.tech/v1/posts \
  -H "Authorization: Bearer $RELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: fall-drop-2026-08-04" \
  -d '{
    "targets": ["9d1f2c34-5b6a-4c8d-9e0f-1a2b3c4d5e6f"],
    "caption": "Fall drop is live — link in bio.",
    "media": ["https://cdn.example.com/fall-drop.jpg"],
    "schedule_at": "2026-08-04T18:30:00Z"
  }'

5. Check what happened

curl https://api.relay.lantean.tech/v1/posts/<post_id> \
  -H "Authorization: Bearer $RELAY_API_KEY"

Each entry in targets carries its own status, the permalink once live, and an error object with the platform's code and message when it isn't.

Prefer to drive this from an agent? Point an MCP client at the same key and ask it to "schedule this photo for Tuesday at 9am".

Limits at a glance

LimitValueWhere it comes from
API requests120 / minute per keyRelay
Failed auth attempts30 / minute per IPRelay
Published posts50 / rolling 24h per accountInstagram
Published posts~15 / day per creator, across all apps; 5 waiting inbox uploadsTikTok
Caption1–2,200 characters, at most 30 hashtags and 20 @mentionsInstagram
Alt text1–1,000 characters per file, sent on images (Instagram) and every item (Threads)Relay
Carousel items2–20Instagram
Reels and story videosReels 3 seconds – 15 minutes; story videos 3 – 60 secondsInstagram
Photo post images1–35 (images only)TikTok
Video lengthThe creator’s limit: 3, 5 or 10 minutesTikTok
UploadsA daily quota shared by every Relay user (100 a day by default, reset at midnight Pacific), plus each channel’s own daily limitYouTube
YouTube title1–100 characters, no < or >YouTube
YouTube description≤ 5,000 bytes, no < or > (the caption, unless youtube.description is set)YouTube
YouTube tagsUp to 100, 500 characters together (commas and quotes count)YouTube
ShortsSquare or vertical, ≤ 3 minutes — YouTube decides; anything else is a regular videoYouTube
YouTube video length≤ 15 minutes unless the channel is allowed long uploads (verified)YouTube
Published posts250 / rolling 24h per profile (a carousel, or a thread’s first post, counts once); 1,000 replies, a thread’s further posts includedThreads
Threads text1–500 characters by Threads’ count (an emoji counts its UTF-8 bytes: 😀 is 4), ≤ 5 linksThreads
Threads postsText only, 1 image, 1 video ≤ 5 minutes, or a carousel of 2–20 images and videos; a thread up to 10 postsThreads
ImageJPEG, ≤ 8 MB, 4:5 – 1.91:1 (the dashboard converts and fits other formats for you)Instagram
VideoMP4 / MOV, ≤ 2 GBRelay (TikTok and YouTube allow more; Instagram Reels stop at 300 MB, stories at 100 MB, Threads at 1 GB)
Schedule granularity~60 secondsRelay scheduler
Idempotency replay window24 hoursRelay

Support

Questions, bug reports, and access requests go to support@lantean.tech. When reporting a failed publish, include the post ID and the error.code from the target — that's enough to trace it end to end.

© 2026 Relaysupport@lantean.techPrivacyTerms