# The Social Infrastructure for AI Agents · PostLake > Markdown version of https://postlake.dev/ . The canonical page for humans. > PostLake is the social infrastructure for AI agents: https://postlake.dev/llms.txt # Stop posting. Let your agents do it. The Social Media Infrastructure and Unified API for AI Agents. Give any agent one secure interface to **observe, publish, engage and measure** across every major social media network. Your agents bring the intelligence. PostLake is the layer they act through. - One social language for every network - A retry never posts twice - Drafts until you approve Hubs: [For AI agents](https://postlake.dev/agents/index.md) · [MCP server](https://postlake.dev/mcp.md) · [Posting API](https://postlake.dev/post-to/index.md) · [Guides](https://postlake.dev/guides/index.md) ``` curl -X POST \ https://api.postlake.dev/v1/posts \ -H "Authorization: Bearer $KEY" \ -H "Idempotency-Key: release-001" \ -d '{ "text": "the new release is here", "profile": "my-brand", "platforms": ["linkedin", "x", "bluesky"] }' ``` Networks: [X](https://postlake.dev/post-to/x-twitter.md), [LinkedIn](https://postlake.dev/post-to/linkedin.md), [Instagram](https://postlake.dev/post-to/instagram.md), [TikTok](https://postlake.dev/post-to/tiktok.md), [Facebook](https://postlake.dev/post-to/facebook.md), [Bluesky](https://postlake.dev/post-to/bluesky.md), [YouTube](https://postlake.dev/post-to/youtube.md), [Pinterest](https://postlake.dev/post-to/pinterest.md), [Threads](https://postlake.dev/post-to/threads.md). ## Built for autonomy Agent-first primitives. Every PostLake API is designed for and used by agents. - **No double posts.** The agent can retry all night. Idempotency keeps it to one post. Same key, same result. - **A failure you can use.** X can fail and LinkedIn still go live. The agent gets a reason and a fix, not a silent 200. - **Live network rules.** TikTok's photo limit is read today, not guessed from last year's training data. A bad post fails before it costs you. - **Nothing ships until you say so.** Cap the agent by brand, network and daily posts. Turn on approval and it cannot publish its own draft. ## Observe. Act. Then measure. - [Analytics](https://postlake.dev/guides/social-media-analytics-api.md): `GET /v1/analytics?period=30d` returns totals, per-network rates, top posts and best times. - One `Post` with `id`, `state` (`draft` / `scheduled` / `processing` / `partial` / `published` / `failed`) and `targets[]`. - Dry-run with `POST /v1/posts/validate` or `pl.posts.validate()`. Nothing is created and no credits move. - Webhooks: `post.published`, `post.failed`, `post.partial`, `message.received`, `comment.received`, `mention.received`. Verify with `verifyWebhookSignature`. - Media: `pl.media.upload(bytes, type)` returns a `med_…` id. - Schedule with `scheduledAt` plus an IANA `timezone`, or a UTC `Z`. - An agent can send a signed [connect link](https://postlake.dev/docs/mcp.md). The owner still approves on the network's own screen. Official TypeScript SDK: `import { PostLake } from "postlake"`. ## What you'll build - [AI social agent](https://postlake.dev/guides/ai-social-media-agent.md): observe last week's winners, draft the next post, validate it, wait for approval. - [Agent content calendar](https://postlake.dev/guides/ai-content-calendar.md): let an agent fill next week from a changelog. Review it on a calendar. Approve drafts before anything ships. No second scheduler product. - [Analytics dashboard](https://postlake.dev/guides/social-media-analytics-api.md): impressions, reach, CTR, saves, follower growth, normalised and benchmarked. - [Agency client management](https://postlake.dev/agents/index.md): unlimited connected accounts, managed connections, one normalised API. ## Questions agents (and people) ask ### What is the social media API for AI agents? PostLake is the social infrastructure for AI agents. One REST contract and a hosted MCP server. Claude, Cursor, ChatGPT or your own agent can observe, publish, engage and measure across X, LinkedIn, Instagram, TikTok, Facebook, Threads, Bluesky, YouTube and Pinterest, with one normalised response shape. ### How does an AI agent post to social media? Connect `https://api.postlake.dev/mcp` and approve once over OAuth, or run `npx skills add postlake/postlake-mcp --all`. Then ask it to post. No API key in chat. LangGraph, CrewAI and backend agents can call the REST API with a Bearer key instead. See [PostLake for agents](https://postlake.dev/agents/index.md). ### Which social platforms does PostLake support? X (Twitter), LinkedIn, Instagram, TikTok, Facebook, Threads, Bluesky, YouTube and Pinterest. Same call, same response shape. Per-network how-tos: [posting API](https://postlake.dev/post-to/index.md). ### Do I need to create developer apps on each platform? No. PostLake manages the connections, X included. You connect accounts and post. Bring-your-own-keys is optional. ### Is there a free tier? Yes. 20 credits a month, no card. Paid plans start at $13/month for 2,000 credits. X uses dedicated credit rates: 6 credits for text and 75 for a post with a link. Free monthly credits do not cover X; use a paid plan or a credit pack. [Full pricing](https://postlake.dev/pricing.md). ### What stops an AI agent from double-posting? Send an `Idempotency-Key` on each logical publish. Retries with the same key return the original post instead of creating another. Get started free: https://postlake.dev/signup Plain markdown for agents: https://postlake.dev/index.md · https://postlake.dev/llms.txt