Developer & Agents•
11 min read
•
2026-11-25 · Updated 2026-11-25

Bluesky API Guide: Authentication, Posting, Video Uploads, Rate Limits and Scheduling

TL;DR — Direct Answer

The Bluesky API needs no API key: sign in with a handle and app password (com.atproto.server.createSession), or use OAuth for apps acting for other users, then post with com.atproto.repo.createRecord. Writes are capped at 5,000 points an hour and 35,000 a day per account, and a future createdAt does not schedule a post.

By Reeling Team. Examples describe the documented implementation; no live publishing test is implied.

Do you need an API key to use the Bluesky API?

No. Bluesky's Get Started guide has you sign in with a handle and an app password, then call createSession and createRecord; no API key, fee or approval step is documented (checked 25 November 2026).

Posts are records in your repository, so every write goes to your account's PDS (personal data server). The table lists the calls a posting script makes.

StepEndpointAuthWhat you get
Sign incom.atproto.server.createSessionHandle and app passwordaccessJwt (short-lived) and refreshJwt
Renewcom.atproto.server.refreshSessionBearer refreshJwtA new accessJwt and refreshJwt
Upload an imagecom.atproto.repo.uploadBlobBearer accessJwtA blob reference for the post
Create the postcom.atproto.repo.createRecordBearer accessJwtThe post uri and cid
Get a video tokencom.atproto.server.getServiceAuthBearer accessJwtA token for the video service
Upload a videoapp.bsky.video.uploadVideo, getJobStatusService token; none to pollA job ID, then the video blob

App password or OAuth for a new Bluesky integration?

Use an app password for a bot, script or command-line tool that posts to your own account, and OAuth for an app with its own end-user login. Bluesky's OAuth docs say the same: applications with their own end-user login flow should implement OAuth, while single-purpose applications such as bots or command-line tools may use app password authentication instead.

The direction is toward OAuth. Bluesky's September 25, 2024 announcement expected it to be the primary authentication system, "replacing the current flow using App Passwords and createSession over time", and encouraged developers to "stop using the legacy App Password system for new projects". The @bsky/sdk 1.5.3 README also recommends OAuth over password sessions.

QuestionApp passwordOAuth
Best forYour own bot, script or command-line toolApps with their own end-user login, or any app acting for other users
How you sign inHandle and app password sent to createSessionThe user approves your app in their browser; an SDK handles DPoP, PKCE, PAR and token refresh
What your code holdsThe app password, then accessJwt and refreshJwtTokens for the user who approved the app, not their password
PermissionsAccount-wide, with an optional direct-message settingScopes the app requests; the 2024 launch scope transition:generic matched app password access
Setup workCreate an app password in Bluesky settingsPublish client metadata, run the authorization flow, store sessions; tutorials cover Next.js, Node and Go

How do you post to Bluesky with curl?

Two requests are enough: createSession returns the tokens and createRecord writes the post. The record needs text and createdAt plus the $type that names it, and text is capped at 300 graphemes (a family emoji counts as 1) and 3,000 bytes.

The response holds the post's uri and cid. Keep both if you will reply to the post or quote it later.

# Needs curl and jq. Sign in with an app password from Bluesky settings, not your main password.
PDSHOST=https://bsky.social   # bsky.social for Bluesky-hosted accounts, or your own PDS host

SESSION=$(curl -s -X POST "$PDSHOST/xrpc/com.atproto.server.createSession" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg id "$BLUESKY_HANDLE" --arg pw "$BLUESKY_APP_PASSWORD" '{identifier: $id, password: $pw}')")
ACCESS_JWT=$(echo "$SESSION" | jq -r .accessJwt)   # expires after a few minutes
REFRESH_JWT=$(echo "$SESSION" | jq -r .refreshJwt) # keep it to renew the session without a new login
DID=$(echo "$SESSION" | jq -r .did)

# text and createdAt are the only required fields of a post record
curl -s -X POST "$PDSHOST/xrpc/com.atproto.repo.createRecord" \
  -H "Authorization: Bearer $ACCESS_JWT" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg repo "$DID" --arg now "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '{
    repo: $repo,
    collection: "app.bsky.feed.post",
    record: {"$type": "app.bsky.feed.post", text: "Hello world! I posted this via the API.", createdAt: $now}
  }')"
# {"uri":"at://did:plc:.../app.bsky.feed.post/...","cid":"..."}

How do you post text and images with the Bluesky API in Python?

Bluesky's docs use the atproto package: login signs in, send_post writes text, and send_image uploads one image and attaches it. A post holds up to 4 images of 2,000,000 bytes each, and the lexicon requires an alt field for every image.

In atproto 0.0.75, send_post tags the post as English unless you pass langs, for example langs=['th', 'en-US'].

# pip install atproto
import os
from atproto import Client

client = Client()  # https://bsky.social unless you pass a PDS URL
client.login(os.environ['BLUESKY_HANDLE'], os.environ['BLUESKY_APP_PASSWORD'])

post = client.send_post('Hello world! I posted this via the API.')
print(post.uri, post.cid)

with open('my_cat.png', 'rb') as f:
    img_data = f.read()  # up to 2,000,000 bytes per image, up to 4 images per post

client.send_image(text='I love my cat', image=img_data, image_alt='My cat mittens')

How do you post text and images with the Bluesky API in TypeScript?

The current Bluesky docs use @atproto/lex for the client, @atproto/lex-password-session for sign-in and @bsky/sdk for the post action, which fills in createdAt when you omit it.

Upload the image first with client.uploadBlob, then reference the returned blob in an app.bsky.embed.images embed; the aspect ratio is a hint to clients. Mentions, links, replies and quote posts need facets and strong references, which Bluesky's creating-a-post guide covers.

// npm install @bsky/sdk @atproto/lex @atproto/lex-password-session
import { readFileSync } from 'node:fs'
import { Client } from '@atproto/lex'
import { PasswordSession } from '@atproto/lex-password-session'
import { post } from '@bsky/sdk'

const session = await PasswordSession.login({
  service: 'https://bsky.social',
  identifier: process.env.BLUESKY_HANDLE!,
  password: process.env.BLUESKY_APP_PASSWORD!, // an app password
})
const client = new Client(session)

const created = await client.call(post, { text: 'Hello world! I posted this via the API.' })
console.log(created.uri, created.cid)

// Upload the image first, then reference the returned blob in the post
const { body } = await client.uploadBlob(readFileSync('my_cat.png'), { encoding: 'image/png' })
await client.call(post, {
  text: 'I love my cat',
  embed: {
    $type: 'app.bsky.embed.images',
    images: [{ alt: 'My cat mittens', image: body.blob, aspectRatio: { width: 1000, height: 500 } }],
  },
})

How do you upload a video through the Bluesky API?

Get a service token with getServiceAuth, upload the MP4 to the video service, poll getJobStatus until it returns the video blob, then attach that blob to the post. Bluesky's video guide recommends this over a plain uploadBlob, which starts processing only after the post exists and can leave viewers looking at a missing video for several seconds.

The docs sample reads the upload response as the job status itself, while the lexicon nests it under jobStatus, so the code accepts both. The docs also say an already-processed video returns an already_exists error that still carries the blob, so the code reads the blob whether or not the job succeeded.

// npm install @bsky/sdk @atproto/lex @atproto/lex-password-session   (ffprobe must be on your PATH)
import { execFileSync } from 'node:child_process'
import { readFileSync, statSync } from 'node:fs'
import { basename } from 'node:path'
import { Client, type BlobRef } from '@atproto/lex'
import { PasswordSession } from '@atproto/lex-password-session'
import { post } from '@bsky/sdk'
import { app, com } from '@bsky/sdk/lexicons'

const videoPath = process.argv[2] // an .mp4 file

const session = await PasswordSession.login({
  service: 'https://bsky.social',
  identifier: process.env.BLUESKY_HANDLE!,
  password: process.env.BLUESKY_APP_PASSWORD!,
})
const client = new Client(session)

// 1. Service token: audience is your PDS, scope is uploadBlob, 30 minutes
const didDoc = session.session.didDoc as { service: { id: string; serviceEndpoint: string }[] }
const pdsHost = new URL(didDoc.service.find((s) => s.id.endsWith('#atproto_pds'))!.serviceEndpoint).host
const { token } = await client.call(com.atproto.server.getServiceAuth, {
  aud: `did:web:${pdsHost}`,
  lxm: 'com.atproto.repo.uploadBlob',
  exp: Math.floor(Date.now() / 1000) + 60 * 30,
})

// 2. Upload the MP4 to the video service
const uploadUrl = new URL('https://video.bsky.app/xrpc/app.bsky.video.uploadVideo')
uploadUrl.searchParams.append('did', client.assertDid)
uploadUrl.searchParams.append('name', basename(videoPath))
const uploadResponse = await fetch(uploadUrl, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'video/mp4',
    'Content-Length': String(statSync(videoPath).size),
  },
  body: readFileSync(videoPath),
})
const uploaded = (await uploadResponse.json()) as any
const job = uploaded.jobStatus ?? uploaded // the docs sample reads it unwrapped, the lexicon nests it
let blob: BlobRef | undefined = job.blob // already_exists responses carry the blob

// 3. Poll the job until the service returns the blob
const videoClient = new Client('https://video.bsky.app')
while (!blob) {
  const { jobStatus: status } = await videoClient.call(app.bsky.video.getJobStatus, { jobId: job.jobId })
  console.log('Status:', status.state, status.progress ?? '')
  if (status.state === 'JOB_STATE_FAILED') throw new Error(`Video job failed: ${status.error ?? status.failureCode}`)
  blob = status.blob
  if (!blob) await new Promise((resolve) => setTimeout(resolve, 1000))
}

// 4. Attach the blob to the post, with the aspect ratio from ffprobe
const probe = execFileSync('ffprobe', ['-v', 'error', '-select_streams', 'v:0', '-show_entries', 'stream=width,height', '-of', 'json', videoPath])
const { width, height } = JSON.parse(probe.toString()).streams[0]
await client.call(post, {
  text: 'This post should have a video attached',
  langs: ['en'],
  embed: { $type: 'app.bsky.embed.video', video: blob, aspectRatio: { width, height } },
})
StepCallNotes
1. Service tokencom.atproto.server.getServiceAuth on your PDSaud is did:web: plus your PDS host, lxm is com.atproto.repo.uploadBlob, 30 minutes recommended
2. UploadPOST app.bsky.video.uploadVideo on video.bsky.app, with did and nameBearer service token, Content-Type video/mp4
3. PollGET app.bsky.video.getJobStatus with the jobIdRepeat until a blob appears; stop on JOB_STATE_FAILED
4. Postcom.atproto.repo.createRecordAn app.bsky.embed.video embed with the blob and an aspectRatio

What limits apply to Bluesky video uploads?

Bluesky-hosted accounts must verify their email before uploading video, and a daily limit on video posts applies. The video guide gives no number, but the lexicons define app.bsky.video.getUploadLimits, which returns canUpload, remainingDailyVideos and remainingDailyBytes, so test the sign-in it needs on a throwaway account and read your own allowance.

Two size numbers apply: the embed.video lexicon allows 300,000,000 bytes, but the rate-limits page says the PDS caps each blob at 52,428,800 bytes (50 MiB). Plan for the smaller number until you have uploaded a larger file on your own account.

LimitValueSource
Formatvideo/mp4 onlyapp.bsky.embed.video lexicon
Maximum size in the lexicon300,000,000 bytes, formerly 100 MBapp.bsky.embed.video lexicon
PDS blob cap52,428,800 bytes (50 MiB)Rate-limits page
CaptionsUp to 20 text/vtt files of 20,000 bytes eachapp.bsky.embed.video lexicon
Large filesstartUpload, uploadPart, finishUpload, abortUpload and getUploadStatus are defined; the video guide covers none of themapp.bsky.video lexicons

What are the Bluesky API rate limits?

Writes are budgeted in points per account: 5,000 an hour and 35,000 a day, where a create costs 3 points, an update 2 and a delete 1. That allows at most 1,666 creates an hour and 11,666 a day, and every record you create costs the same, including likes and follows.

Requests that cross a limit usually get HTTP 429, and Bluesky says all of these limits are likely to evolve. Many Bluesky services return rate-limit headers, so read them rather than hard-coding the numbers.

Staying under a limit does not make bulk interaction acceptable: Bluesky's developer guidelines define spam to include automated or bulk interactions that notify users, such as follows, likes and replies.

LimitValueApplies to
Record writes per hour5,000 pointsEach account
Record writes per day35,000 pointsEach account
Points per operationCreate 3, update 2, delete 1Each account
createSession30 per 5 minutes and 300 per dayEach account
All PDS API requests3,000 per 5 minutesEach IP address

How many posts can a Bluesky scheduler send before hitting a limit?

The write budget rarely binds a scheduler; the sign-in limit does. At 3 points a post, 5,000 points an hour allows 1,666 posts, but createSession allows only 300 logins a day per account, so a job that signs in every time runs out first.

Sign in once, keep the refreshJwt and renew the session instead of logging in again. The rate-limits page lists a cap for createSession and none for refreshSession, and refreshSession returns a new accessJwt and refreshJwt, so save both after every refresh.

# Run this at each due time (cron, a queue worker). It signs in only once, then reuses and renews the session.
import os
import pathlib
from atproto import Client, SessionEvent

STORE = pathlib.Path('bsky-session.txt')  # treat this file like a password

client = Client()

def save_session(event, session):
    if event in (SessionEvent.CREATE, SessionEvent.REFRESH):
        STORE.write_text(client.export_session_string())

client.on_session_change(save_session)

if STORE.exists():
    client.login(session_string=STORE.read_text())  # no createSession call
else:
    client.login(os.environ['BLUESKY_HANDLE'], os.environ['BLUESKY_APP_PASSWORD'])

client.send_post('Posted by my own job at its due time')
Posting ratePosts a dayWrite points a dayShare of 35,000Logins a day if every post signs in
10 posts a day10300.09%10 (3% of the 300 cap)
A post every 30 minutes481440.4%48 (16% of the cap)
A post every 5 minutes2888642.5%288 (96% of the cap)
A post every minute1,4404,32012.3%1,440 (4.8 times the cap)

Can you schedule Bluesky posts through the API?

No. The Bluesky API has no field, endpoint or setting that publishes a post later, so scheduling means your own job calls createRecord when the post is due. In the atproto lexicons (main, 24 November 2026), the only scheduling endpoints are tools.ozone.moderation actions for moderators.

A future createdAt is the usual guess, and it fails. Bluesky's timestamps guide says the App View sorts a post by the earlier of createdAt and indexedAt, so a post dated next week sorts at the time it was indexed, which is now.

OptionWhat it isSchedules a post?
Future createdAtA timestamp the client declares on the recordNo. The record exists once createRecord returns, and it sorts by indexedAt
app.bsky.draft endpointsDrafts in private storage, with device-bound media and no publish timeNo. A draft never posts by itself
tools.ozone.moderation.scheduleActionA timed moderation action, currently a takedownNo. It is for moderation services
Your own job runnerCron or a queue worker that calls createRecord at the due timeYes. This is how every scheduler works
A scheduling toolA service that runs that worker for youYes, within its own limits

Should you build on the AT Protocol or use a scheduler?

Build it yourself when Bluesky is your only target or you need post types a scheduler does not publish. Use a scheduler when the job is queued video across several networks and you would rather not own sessions, retries and status checks.

Reeling signs in to Bluesky with your handle and an app password, so everything above about app passwords still applies. Its limits are its own: 300 characters of text, video up to 50 MiB in MP4, MOV or WebM, a composer check of 60 seconds per video, and a verified Bluesky email for video.

# Schedule one Bluesky video through the Reeling REST API (IDs and URL are placeholders)
curl -s -X POST https://api.reeling.app/api/v1/publish \
  -H "X-API-Key: $REELING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "YOUR_PROJECT_UUID",
    "channel_ids": ["YOUR_BLUESKY_CHANNEL_UUID"],
    "platforms": ["bluesky"],
    "video_url": "https://example.com/clip.mp4",
    "caption": "A 30-second walkthrough of the new export flow",
    "scheduled_for": "2026-12-01T15:00:00Z"
  }'
JobChoose DIY AT Protocol when...Choose Reeling when...
Post typesYou need text-only posts, images, replies, quote posts, link cards or mentionsYour Bluesky posts are short videos (60 seconds in the composer) with up to 300 characters of text
SchedulingYou will run and monitor your own job runner and session storageYou want a queue with a due time: scheduled_for in the REST API or scheduled_at over MCP
CredentialsYou can keep an app password or OAuth tokens on every machine that runs your codeYou want the app password stored once in Reeling and a Reeling API key in your scripts
Other networksBluesky is the only network you post toOne request should also reach other networks: the publish endpoint accepts 15, Bluesky included
ReadingYou read feeds, search or notifications through the full APIYou only need replies to your own posts through the inbox, not feeds
CostNo Bluesky fee is documented; you pay for hosting and your own timeStarter $9 a month (60 scheduled posts, no API or MCP); Creator $19 (API, MCP, 5,000 API requests a month); Agency $39 (50,000)

How was this Bluesky API guide checked?

Every Bluesky figure was read on 25 November 2026 from Bluesky's rendered docs at bsky.network/docs or from the bluesky-social/atproto lexicons (main, commit b642ec4 of 24 November). The older docs.bsky.app addresses now redirect to bsky.network, and some pages moved, such as the video guide.

We ran the curl, Python and TypeScript samples against a local mock server that enforces the lexicon limits (atproto 0.0.75, @bsky/sdk 1.5.3), not against live Bluesky, so try them on a throwaway account first. Reeling's prices are monthly list prices from its plans data (changed 24 November 2026), and its Bluesky limits come from its platform data (reviewed 15 October 2026) and the dashboard composer checks (read 25 November 2026).

Frequently Asked Questions

Is the Bluesky API free?

Bluesky documents no API key, fee or approval step: you sign in with a handle and an app password, then call createSession and createRecord. The cost is the work around it, such as hosting a scheduler, and the limits: 5,000 write points an hour and 35,000 a day per account (checked 25 November 2026).

Do you need an API key for Bluesky?

No. The documented flow has no key: create an app password in Bluesky settings, then send it with your handle to com.atproto.server.createSession to get an accessJwt and a refreshJwt. Apps that act for other users use OAuth, which identifies the app with published client metadata rather than a key you request.

Should a new Bluesky integration use an app password or OAuth?

Use an app password for a bot, script or command-line tool on your own account, which Bluesky's docs allow. Use OAuth when your app has its own end-user login flow, so users approve it in their browser and you never hold their password. Bluesky's 2024 announcement also told developers to stop using the legacy App Password system for new projects.

What are the Bluesky API rate limits?

Per account, writes are limited to 5,000 points an hour and 35,000 a day; a create costs 3 points, an update 2 and a delete 1, so about 1,666 posts an hour. createSession allows 30 per 5 minutes and 300 a day, and the PDS allows 3,000 API requests per 5 minutes per IP address. Excess requests usually get HTTP 429.

Can you schedule posts on Bluesky through the API?

No. The post record has no publish-time field, and a future createdAt does not delay the post, because the App View sorts by the earlier of createdAt and indexedAt. Drafts in app.bsky.draft are private storage, and scheduleAction is for moderators. To schedule, run your own job that calls createRecord at the due time, or use a scheduling tool.

How do you upload a video through the Bluesky API?

Request a service token with getServiceAuth (audience your PDS, lxm com.atproto.repo.uploadBlob, 30 minutes), upload the MP4 to the video service with app.bsky.video.uploadVideo, poll getJobStatus until it returns a blob, then put that blob in an app.bsky.embed.video post. Bluesky-hosted accounts need a verified email, and a daily video limit applies.

Sources and related documentation

Schedule Bluesky video posts without writing a job runner

Connect Bluesky in Reeling with your handle and an app password, then schedule a video from the dashboard, the REST API or MCP. The API and MCP need the Creator or Agency plan.

See the Bluesky integration
Account requirements apply
Tags:#Bluesky#Bluesky API#AT Protocol#Video Upload#Rate Limits