X API for developers and AI agents

X publishing without rebuilding OAuth, media upload, queues, and webhook status handling.

No credit card required

import { KavenioClient } from "@kavenio/sdk";

const kavenio = new KavenioClient({
  authToken: process.env.KAVENIO_API_KEY,
});

// Send your user to this URL to connect their X account.
const { authorizationUrl } = await kavenio.connect.begin({
  platform: "twitter",
});

// Publish to the connected X account.
await kavenio.posts.create({
  content: "Shipping X posts through one social API.",
  publishNow: true,
  platforms: [
    {
      platform: "twitter",
      accountId: "acct_x_123",
    },
  ],
});

How it works

Connect the account, publish to a selected X profile, then let webhook events drive the automation around status changes.
  1. kavenio.connect.begin(...)

    Create an X connect URL and send the user through OAuth for the account they want to publish from.

  2. kavenio.posts.create(...)

    Publish now or schedule a post for the selected connected X account by passing its account ID.

  3. kavenio.webhooks.create(...)

    Stop polling publish jobs or guessing final state. Trigger your automation when a post publishes, fails, or needs attention.

Formats

Publish the X formats your product needs

Send the post shape your customer picked and avoid building a separate publishing path for every X format.
Text posts
Reply posts
Quote posts
Simple threads
Images
GIFs
Videos
Polls
Developer workflow

Build X publishing without provider plumbing

Keep your application focused on product workflow instead of provider mechanics.

OAuth and token refresh

Send users through the X OAuth flow once, then let Kavenio store, refresh, and use the credential for publishing.

Threads with media

Create connected reply chains and attach root or reply media through `threadItems`.

Provider media upload

Pass Kavenio media URLs and Kavenio uploads images, GIFs, and videos to X at publish time.

Queue and webhooks

Schedule posts, publish now, and trigger automation from status events instead of polling provider APIs.

App keys

Bring your own X app when you need control

Use the Kavenio-managed X app to get started, or connect through your own X app when your team owns approvals, branding, and policy setup.

Use the Kavenio-managed X app

Start testing X connection and publishing without configuring your own X app first.

Bring your own X app

Use your X app credentials when your team owns approvals, branding, and policy setup.

X costs

X API usage passes through at cost

If you use the managed X app, paid X API operations are passed through at provider rates with no markup on top.

Provider rates

Paid X API usage is tracked and passed through at provider cost instead of hidden in a bundled platform fee.

No markup on top

No margin is added to X API usage. You pay the connected-account plan plus X provider costs when they apply.

Build the X publishing workflow once

Create a workspace, connect an X account, and reuse the same API pattern as you add more supported platforms.

Reuse the same connect and publishing workflow for the next supported platform.

X API questions

Practical details for building X publishing into your product

Can I publish X posts through Kavenio?

Yes. Kavenio connects X accounts and publishes posts through the same posts API used for every supported social platform.

Can I publish X threads?

Yes. Kavenio can publish connected reply chains and process each item in order.

Can Kavenio upload media to X?

Yes. Send public image, GIF, or video URLs in your post request and keep your own product flow simple.

Does Kavenio avoid X API costs?

No. Kavenio does not claim to bypass provider requirements. Paid X API usage is tracked and passed through at provider rates where required.