Install
openclaw skills install threads-fastapiCall the user's FastAPI backend to queue/generate/publish Threads posts.
openclaw skills install threads-fastapiUse this skill whenever the user asks to generate, queue, schedule, or publish content to Threads.
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)THREADS_TENANT_ID (default: agency_paris)If these are missing, ask the user for the correct values.
This skill does not store media itself. Storage is handled by the FastAPI backend.
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.
Set STORAGE_PROVIDER=cloudinary or s3 on the backend and configure the
provider credentials there.
POST {BASE}/api/v1/threads/publish
X-Queue-SecretPOST {BASE}/api/v1/assistant/chat
Both accept JSON.
Use the HTTP tool in OpenClaw (not exec).
Send JSON directly to the FastAPI endpoint with the required headers.
Example:
{BASE}/api/v1/threads/publishPOSTX-Queue-Secret: <THREADS_QUEUE_SECRET>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>"
}
}
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.
-QueueSecret argument.BaseUrl is an http(s) URL.