Tesselith
ProductSolutionsAI agentsCompareFree toolsBlogPricing
Log inStart free
  1. Home/
  2. AI agents/
  3. OpenAI API/
  4. Threads
OpenAI API + Threads

Schedule Threads posts with OpenAI API

If you're building your own agent on the OpenAI API, you can give it Tesselith's tools and skip writing a Threads integration yourself. The Responses API's hosted MCP tool connects to Tesselith's server, so your app can draft and queue posts as one step in a bigger workflow. Publishing and deleting still need a confirmation step in your own code.

Start freeFull OpenAI API setup

1. Connect OpenAI API

agent.py
import os
from openai import OpenAI

client = OpenAI()
resp = client.responses.create(
    model="gpt-5",  # any model that supports remote MCP
    input="List my Tesselith channels",
    tools=[{
        "type": "mcp",
        "server_label": "tesselith",
        "server_url": "https://api.tesselith.com/mcp",
        "authorization": os.environ["TESSELITH_API_KEY"],
        "require_approval": "always",
    }],
)
print(resp.output_text)

Then connect Threads in Tesselith under Channels. How Threads scheduling works.

2. Ask for a Threads post

Find the Threads draft about the spring sale and put it in the next free slot.

Used Tesselith · add_to_queue

Done. The spring sale draft is in the next free slot on your Threads channel, Thursday at 17:00 in the workspace timezone.

What people use OpenAI API for on Threads

Turning closed bug reports into drafts

A SaaS team builds an internal tool that watches its support queue. When a bug report is closed as fixed, the tool asks the agent to write a Threads post about the fix and saves it with create_draft. The post lands in a review queue that a person on the team works through each morning. Nothing reaches the public feed until a reviewer approves it.

A weekly digest bot for a trade association

A trade association emails its members a weekly digest of industry news. A small bot pulls the week's top articles, asks the agent for one Threads post per article, and adds them to the channel with add_to_queue. Staff check the queue on Monday, which gives them a full week of posts to swap out or keep.

Filling empty days across a client account

An agency runs an internal job each morning. It calls list_channels to get the stable channel ids, finds the Threads channels with nothing queued in the next three days, and asks the agent to draft a post for each gap. The account owners review the drafts in Tesselith before they go into a slot.

Prompts to try in OpenAI API for Threads

  • “Draft a Threads post for this changelog entry, under 500 characters, and add it to the Threads queue.”
  • “Which Threads channels have nothing scheduled in the next three days? Draft one post for each one.”
  • “Find the Threads draft about the spring sale and put it in the next free slot.”
  • “Attach this public image URL to the Threads draft, then show me the post text.”
  • “Summarise this week's published Threads posts in one line each.”

Threads limits to keep in mind

Threads posts are limited to 500 characters. Longer ideas are usually written as a chain of replies to the first post. Tesselith checks drafts against these before they can be scheduled, so OpenAI API gets a clear error instead of a failed post.

Threads limits
Limit
Post500
Bio150
Images per postUp to 20
Video lengthUp to 5 minutes

Tips for Threads posts written with OpenAI API

  • Keep the system prompt short and specific: the platform, the 500-character limit, and the rule that a draft is approved before anything is queued. Long instructions get ignored when the task grows.
  • Store the channel id, not the channel name, once you have it. A name typed by a user can match more than one channel, while the id from list_channels always points at one.
  • Use a public image URL for upload_media_from_url. The tool fetches the file from the URL, so a link behind a login or a short-lived signed link won't work.
  • Log every tool call your agent makes. When a Threads post lands at the wrong time, the log shows whether the agent or the timezone caused it, and that saves a lot of guessing.

If something goes wrong

Troubleshooting OpenAI API with Tesselith
Fix
424 or "tool list failed"OpenAI couldn't reach Tesselith or got a 401. Check the key is sent as authorization on every request.
The model calls tools you didn't wantSet allowed_tools to the tools the agent needs.
Responses stall waiting for approvalAnswer the mcp_approval_request items, or use require_approval never for read-only tools.
403: your plan doesn't include API accessMCP is included on Pro, Team and Agency. New workspaces get a 14-day Pro trial; upgrade under Settings → Billing.
401: connection revoked or lost accessSomeone disconnected the assistant in Settings → AI assistants, or your role changed. Connect again and approve the workspace.
The assistant can read posts but can't scheduleYou unticked Schedule and queue on the consent screen. Disconnect and connect again, keeping that permission.
No channels foundThe assistant only sees accounts already connected in Tesselith. Connect them under Channels first.
Post scheduled at the wrong timeTell the assistant your time zone. Tesselith takes ISO 8601 times with an offset, and your workspace time zone is shown in get_queue.
429: rate limitedEach connection can make 120 requests a minute on Pro, 300 on Team and 600 on Agency. Wait for the Retry-After seconds.

Questions

Which Tesselith tools can my agent call?
The MCP server exposes 13 tools: listing channels, reading posts and the queue, analytics counts, drafting, updating, queueing, scheduling, media upload, publish now and delete.
Do I need a separate Threads API key?
No. Connect Threads to a Tesselith workspace once, and your agent works with that channel through Tesselith's tools. Your app only needs the MCP connection details.
Can my agent publish without a person in the loop?
Only if your code sends the call. publish_now takes a confirm: true flag on purpose, so treat that flag as your human check and put the approval step in your app before it.

OpenAI API with other networks

InstagramFacebook PagesYouTubeBlueskyMastodonTelegram

Other AI agents for Threads

ClaudeClaude CodeClaude CoworkChatGPTCodexCursorVS Code (GitHub Copilot)WindsurfZedClineGemini CLIHermes AgentOpenClawGoosen8nMistral Le ChatPerplexityManus

Put OpenAI API to work on Threads

Connect Threads to Tesselith, connect OpenAI API, and schedule your next post from a conversation.

Start free

Free to start

One calendar for everything you post.

No credit card. Connect your first channel and schedule a post in under two minutes.

Start free
Tesselith

The social scheduler for creators, teams and agencies. One calendar, every network you post to.

Product

  • Composer
  • Calendar
  • Analytics
  • Automation
  • AI assistant
  • Posting queue
  • API & webhooks
  • MCP server
  • All features

AI agents

  • Claude
  • Claude Code
  • ChatGPT
  • Codex
  • Cursor
  • Gemini CLI
  • n8n
  • All AI agents

Solutions

  • Creators
  • Agencies
  • Small business
  • E-commerce
  • All solutions

Compare

  • Scheduler pricing 2026
  • vs Buffer
  • vs Hootsuite
  • Metricool alternatives
  • Planoly alternatives
  • SocialBee alternatives
  • All comparisons
  • All alternatives

Free tools

  • Character counter
  • Best time to post
  • UTM builder
  • Engagement rate
  • All tools

Company

  • About
  • Blog
  • Research
  • Developer docs
  • Pricing
  • Contact
  • Security
  • Status

Legal

  • Privacy
  • Terms
  • Cookies
  • Acceptable Use
  • DPA
  • Refunds

Schedule posts for

  • X (Twitter)
  • Instagram
  • Facebook Pages
  • LinkedIn
  • YouTube
  • TikTok
  • Threads
  • Bluesky
  • Mastodon
  • Pinterest
  • Reddit
  • Discord
  • Telegram
  • Dev.to
  • Hashnode

Popular guides

  • Post to all social media at once
  • Schedule Discord messages
  • Cross-post to Bluesky, Mastodon and Threads
  • Buffer pricing
  • Sprout Social pricing
  • Metricool pricing
  • Sendible pricing
  • Loomly pricing
© 2026 Tesselith. All rights reserved.
PrivacyTermsCookiesSecurityData deletion
Tesselith