How much does it cost to post to X through an API?
X bills API posting on a pay-per-use basis. The figures Socifyr uses to price a post, taken from the repo's cost helper, are:
| Post type | Estimated cost |
|---|---|
| Post without a link | $0.015 |
Post that contains an http:// or https:// link | $0.20 |
These are estimates that Socifyr accrues after a successful X post so you can see spend per workspace. A link makes a post more than 13 times as expensive, which is the single biggest lever on your bill. If a post needs a link, consider putting it in a first comment or a profile instead, but check whether that fits your use case.
How many X posts do I get on each plan?
Because X charges per post, Socifyr caps the included allowance per plan rather than offering unlimited X posting. The cap is a monthly count of X channels you publish to.
| Plan | X posts per month | Price |
|---|---|---|
| Free | 5 | $0 |
| Pro | 50 | $9.99 |
| Business | 300 | $39 |
When a workspace reaches its allowance, the API answers with a 403 and the message "X (Twitter) post allowance reached" until the monthly reset. Drafts are exempt until they actually publish. Self-hosted installs have no cap. Worst-case arithmetic from the numbers above: 300 posts without links is about $4.50 of estimated X cost in a month, while 300 posts that each contain a link is about $60.
socifyr usage --json # includes X posts used against your allowanceWhat are the X content limits?
| Limit | Value |
|---|---|
| Post length | 280 characters |
| Images per post | 4 |
| Video size and length | 1 GB, 4 hours |
| Image formats | JPG, PNG, GIF, WebP |
| Posts per rolling 24 hours | 50 |
| First comment | Supported, posted as a reply |
| Reply restrictions | Per post: everyone, followers or mentioned users |
Premium long-post entitlements do not extend through the standard API, so plan for 280 characters.
What happens if my text is longer than 280 characters?
Socifyr splits it into a thread. The splitter keeps paragraph boundaries where it can, then breaks by sentence, then by word, so each chunk stays within 280 characters and each tweet replies to the previous one. The replySetting option applies only to the first tweet in the thread. A first comment is attached to the last tweet so the whole thread stays connected. From the outside it is one post with one postUrl pointing at the first tweet.
Socifyr counts that as one X post against your allowance because it prices each X channel once. How X itself bills a multi-tweet thread is X's decision, so check X's current pricing if threads are a large part of your volume.
How do I post to X with cURL?
curl -X POST https://api.socifyr.com/api/content/text \
-H "Authorization: Bearer sk_your_key" \
-H "X-Workspace-Id: <workspaceId>" \
-H "Content-Type: application/json" \
-d '{
"connections": ["x-myhandle"],
"text": "Shipping the new release today"
}'Connect X once with the OAuth 2.0 PKCE screen. X access tokens last 2 hours and Socifyr renews them automatically, so there is nothing to refresh by hand in normal use.
How do I stop an AI agent from running up an X bill?
Put guardrails on the API key the agent uses. monthlyXSpendCentsCap sets a monthly budget in US cents. Each X post is reserved against it at the moment the post is dispatched, including scheduled and bulk-scheduled posts, so parallel requests cannot overshoot the cap. A post that would exceed it fails with 403. dailyPostLimit caps total posts per UTC day through that key, and requireApproval sends every post to a human first.
await socifyr.workspaces.updateApiKey(workspaceId, keyId, {
dailyPostLimit: 20,
monthlyXSpendCentsCap: 500, // $5.00 of X spend per month
})The key's reserved estimate is visible as xSpendCents in listApiKeys() so an agent can check its own budget before posting. More in how to give an AI agent safe access to social accounts.
How do I post images or video to X?
Send up to 4 images to POST /api/content/photos, or one video to /api/content/video. Socifyr uploads the media to X in chunks and then creates the post with the attached media IDs. If you pass more than 4 images the adapter uses the first 4, so trim the list yourself to control which ones are posted. Video can be up to 1 GB and 4 hours by the shared constants.
socifyr post "Release notes" --media shot1.png,shot2.png --to x-myhandle --waitThe post text for a media post comes from the title or description you supply. A first comment, if you set one, is posted as a reply from the same account.
How do I see how much X allowance I have left?
Usage is reported in one place for the dashboard, SDK, CLI and MCP. The summary includes X posts used against your plan allowance and an estimated X spend in US dollars for the month. Check it before a big batch rather than discovering the cap through a 403.
| Where | How |
|---|---|
| CLI | socifyr usage |
| MCP | Ask the assistant to run get_usage |
| Python SDK | client.usage() |
| API key level | listApiKeys() returns xSpendCents and xSpendMonth per key |
Remember that the estimate is Socifyr's accounting of what X charges, not an invoice from X. Use it for budgeting and guardrails, and check your X developer billing for the authoritative number.
Frequently asked questions
Is the X API free for posting?
Why does a link make an X post more expensive?
http:// or https:// URL in the text.