threads_fastapi

Call the user's FastAPI backend to queue/generate/publish Threads posts.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "threads_fastapi" with this command: npx skills add outibricoutilage-dotcom/threads-fastapi

Threads FastAPI skill

Use this skill whenever the user asks to generate, queue, schedule, or publish content to Threads.

Required environment variables (on the Gateway host)

  • THREADS_FASTAPI_BASE_URL (example: http://127.0.0.1:8000)
  • THREADS_QUEUE_SECRET (the value to send as X-Queue-Secret, only for /threads/publish)
  • Optional: THREADS_TENANT_ID (default: agency_paris)

If these are missing, ask the user for the correct values.

Storage options (backend-side)

This skill does not store media itself. Storage is handled by the FastAPI backend.

Local Pack (demo / single machine)

Set on the backend:

STORAGE_PROVIDER=local
UPLOADS_DIR=uploads
UPLOADS_PATH=/uploads

This stores uploads in UPLOADS_DIR and serves them from UPLOADS_PATH.

Cloud storage (prod)

Set STORAGE_PROVIDER=cloudinary or s3 on the backend and configure the provider credentials there.

Endpoints (per your spec)

  • POST {BASE}/api/v1/threads/publish
    • Requires header X-Queue-Secret
  • POST {BASE}/api/v1/assistant/chat
    • No queue secret header (unless your backend requires it later)

Both accept JSON.

How to call (safe)

Use the HTTP tool in OpenClaw (not exec).
Send JSON directly to the FastAPI endpoint with the required headers.

Example:

  • URL: {BASE}/api/v1/threads/publish
  • Method: POST
  • Headers: X-Queue-Secret: <THREADS_QUEUE_SECRET>
  • Body: JSON payload (see below)

Payloads

A) Publish / enqueue Threads post

Call POST {BASE}/api/v1/threads/publish with:

{
  "message": "<message text>",
  "images": [],
  "scheduled_at": null,
  "publish_mode": "queue",
  "auto_proxy_images": true,
  "meta": {
    "tenant_id": "agency_paris",
    "source": "telegram",
    "chat_id": "<tg chat id>",
    "user_id": "<tg user id>",
    "username": "<tg username>"
  }
}

B) /postimg generate+enqueue via assistant

Call POST {BASE}/api/v1/assistant/chat with:

{
  "session_id": "tg_<chat id>",
  "execute_tools": true,
  "message": "Generate and enqueue one image post",
  "context": {
    "tenant_id": "agency_paris",
    "prompt": "<tg args>",
    "message": "<tg args>",
    "provider": "replicate",
    "model": "black-forest-labs/flux-1.1-pro",
    "source": "telegram",
    "campaign": "remote_demo",
    "api_base_url": "http://127.0.0.1:8000"
  }
}

Note: The skill should fill tenant_id from THREADS_TENANT_ID when set.

Safety

  • Never forward secrets from chat into shell commands except as the -QueueSecret argument.
  • Do not log the secret.
  • Validate that BaseUrl is an http(s) URL.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Douyin Automation

抖音内容自动化运营技能。跨平台(Windows/macOS/Linux),一键安装,自动 clone 后端代码并配置,流水线执行:抓取AI量化视频→AI改写→发布长图文→自动回复评论。支持 Cron 定时任务。

Registry SourceRecently Updated
1400Profile unavailable
Automation

Douyin Automation

Puppeteer-based Douyin (TikTok China) video uploader. Automate login, upload and publish videos to Douyin Creator Platform using headless browser. 抖音视频自动化发布工...

Registry SourceRecently Updated
3170Profile unavailable
Automation

Wechat Mp Auto

自动完成微信公众号文章的选题调研、Markdown写作、智能配图、内容审核和发布全流程管理。

Registry SourceRecently Updated
4281Profile unavailable
Automation

Toutiao Publish

自动发布内容到今日头条(微头条/文章)。触发词:发头条、发布头条、微头条、今日头条、发文章、写头条。支持 AI 推荐图片插入正文、免费正版图片库封面、完整文章自动化发布。

Registry SourceRecently Updated
1.2K5Profile unavailable