# Bluesky API Guide: Authentication, Posting, Video Uploads, Rate Limits and Scheduling | Reeling Blog

> Bluesky API guide with curl, Python and TypeScript: sign in with an app password or OAuth, post text, images and video, plan for rate limits and scheduling.

Canonical: https://reeling.app/blog/bluesky-api-guide
Last updated: 2026-11-25

## Summary

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.

- **Author**: Reeling Team
- **Published**: 2026-11-25
- **Last reviewed**: 2026-11-25
- **Category**: Developer & Agents

## 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.

| Step | Endpoint | Auth | What you get |
| --- | --- | --- | --- |
| Sign in | com.atproto.server.createSession | Handle and app password | accessJwt (short-lived) and refreshJwt |
| Renew | com.atproto.server.refreshSession | Bearer refreshJwt | A new accessJwt and refreshJwt |
| Upload an image | com.atproto.repo.uploadBlob | Bearer accessJwt | A blob reference for the post |
| Create the post | com.atproto.repo.createRecord | Bearer accessJwt | The post uri and cid |
| Get a video token | com.atproto.server.getServiceAuth | Bearer accessJwt | A token for the video service |
| Upload a video | app.bsky.video.uploadVideo, getJobStatus | Service token; none to poll | A job ID, then the video blob |

- [Which social networks allow API posting in 2026](https://reeling.app/developers/social-media-api)

## 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.

| Question | App password | OAuth |
| --- | --- | --- |
| Best for | Your own bot, script or command-line tool | Apps with their own end-user login, or any app acting for other users |
| How you sign in | Handle and app password sent to createSession | The user approves your app in their browser; an SDK handles DPoP, PKCE, PAR and token refresh |
| What your code holds | The app password, then accessJwt and refreshJwt | Tokens for the user who approved the app, not their password |
| Permissions | Account-wide, with an optional direct-message setting | Scopes the app requests; the 2024 launch scope transition:generic matched app password access |
| Setup work | Create an app password in Bluesky settings | Publish client metadata, run the authorization flow, store sessions; tutorials cover Next.js, Node and Go |

- [Bluesky docs: OAuth for Bluesky apps](https://bsky.network/docs/oauth-client)
- [Create an app password in Bluesky settings](https://bsky.app/settings/app-passwords)
- [Is an app password safe to give an AI agent?](https://reeling.app/blog/bluesky-mcp-server-setup-app-password)

## 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 } }],
  },
})
```

- [Bluesky docs: creating a post with facets, replies and link cards](https://bsky.network/docs/bluesky-api/creating-a-post)

## 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 } },
})
```

| Step | Call | Notes |
| --- | --- | --- |
| 1. Service token | com.atproto.server.getServiceAuth on your PDS | aud is did:web: plus your PDS host, lxm is com.atproto.repo.uploadBlob, 30 minutes recommended |
| 2. Upload | POST app.bsky.video.uploadVideo on video.bsky.app, with did and name | Bearer service token, Content-Type video/mp4 |
| 3. Poll | GET app.bsky.video.getJobStatus with the jobId | Repeat until a blob appears; stop on JOB_STATE_FAILED |
| 4. Post | com.atproto.repo.createRecord | An app.bsky.embed.video embed with the blob and an aspectRatio |

- [Bluesky docs: uploading video](https://bsky.network/docs/about-bluesky-content/video)
- [Video aspect ratio calculator for the aspectRatio field](https://reeling.app/tools/video-aspect-ratio-calculator)
- [Video file size calculator for the upload cap](https://reeling.app/tools/video-file-size-calculator)

## 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.

| Limit | Value | Source |
| --- | --- | --- |
| Format | video/mp4 only | app.bsky.embed.video lexicon |
| Maximum size in the lexicon | 300,000,000 bytes, formerly 100 MB | app.bsky.embed.video lexicon |
| PDS blob cap | 52,428,800 bytes (50 MiB) | Rate-limits page |
| Captions | Up to 20 text/vtt files of 20,000 bytes each | app.bsky.embed.video lexicon |
| Large files | startUpload, uploadPart, finishUpload, abortUpload and getUploadStatus are defined; the video guide covers none of them | app.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.

| Limit | Value | Applies to |
| --- | --- | --- |
| Record writes per hour | 5,000 points | Each account |
| Record writes per day | 35,000 points | Each account |
| Points per operation | Create 3, update 2, delete 1 | Each account |
| createSession | 30 per 5 minutes and 300 per day | Each account |
| All PDS API requests | 3,000 per 5 minutes | Each IP address |

- [Bluesky docs: rate limits](https://bsky.network/docs/rate-limits)

## 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 rate | Posts a day | Write points a day | Share of 35,000 | Logins a day if every post signs in |
| --- | --- | --- | --- | --- |
| 10 posts a day | 10 | 30 | 0.09% | 10 (3% of the 300 cap) |
| A post every 30 minutes | 48 | 144 | 0.4% | 48 (16% of the cap) |
| A post every 5 minutes | 288 | 864 | 2.5% | 288 (96% of the cap) |
| A post every minute | 1,440 | 4,320 | 12.3% | 1,440 (4.8 times the cap) |

- [Threads API limits and scheduling, for comparison](https://reeling.app/blog/threads-api-guide-post-tokens-rate-limits)

## 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.

| Option | What it is | Schedules a post? |
| --- | --- | --- |
| Future createdAt | A timestamp the client declares on the record | No. The record exists once createRecord returns, and it sorts by indexedAt |
| app.bsky.draft endpoints | Drafts in private storage, with device-bound media and no publish time | No. A draft never posts by itself |
| tools.ozone.moderation.scheduleAction | A timed moderation action, currently a takedown | No. It is for moderation services |
| Your own job runner | Cron or a queue worker that calls createRecord at the due time | Yes. This is how every scheduler works |
| A scheduling tool | A service that runs that worker for you | Yes, within its own limits |

- [Bluesky docs: timestamps](https://bsky.network/docs/about-bluesky-content/timestamps)

## 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"
  }'
```

| Job | Choose DIY AT Protocol when... | Choose Reeling when... |
| --- | --- | --- |
| Post types | You need text-only posts, images, replies, quote posts, link cards or mentions | Your Bluesky posts are short videos (60 seconds in the composer) with up to 300 characters of text |
| Scheduling | You will run and monitor your own job runner and session storage | You want a queue with a due time: scheduled_for in the REST API or scheduled_at over MCP |
| Credentials | You can keep an app password or OAuth tokens on every machine that runs your code | You want the app password stored once in Reeling and a Reeling API key in your scripts |
| Other networks | Bluesky is the only network you post to | One request should also reach other networks: the publish endpoint accepts 15, Bluesky included |
| Reading | You read feeds, search or notifications through the full API | You only need replies to your own posts through the inbox, not feeds |
| Cost | No Bluesky fee is documented; you pay for hosting and your own time | Starter $9 a month (60 scheduled posts, no API or MCP); Creator $19 (API, MCP, 5,000 API requests a month); Agency $39 (50,000) |

- [Reeling Bluesky integration: limits, auth and inbox support](https://reeling.app/integrations/bluesky)
- [Reeling REST API reference for scheduled publishing](https://reeling.app/developers/api)
- [Compare Reeling plans and API limits](https://reeling.app/pricing)
- [Prepare one video for Threads and Bluesky](https://reeling.app/blog/cross-posting-to-threads-and-bluesky)
- [Compare Reeling with Ayrshare](https://reeling.app/vs/ayrshare)
- [Compare Reeling with Blotato](https://reeling.app/vs/blotato)
- [Compare Reeling with Zernio](https://reeling.app/vs/zernio)

## 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.

## Primary Sources & Documentation

- [Bluesky docs: Bluesky API, create a session and a post](https://bsky.network/docs/bluesky-api)
- [Bluesky docs: API hosts and auth](https://bsky.network/docs/api-directory)
- [Bluesky docs: developer guidelines](https://bsky.network/docs/developer-guidelines)
- [AT Protocol blog: OAuth for AT Protocol, September 25, 2024](https://atproto.com/blog/oauth-atproto)
- [atproto lexicons: app.bsky feed, embed, video and draft definitions](https://github.com/bluesky-social/atproto/tree/main/packages/api/lexicons/app/bsky)
- [atproto lexicons: com.atproto server and repo definitions](https://github.com/bluesky-social/atproto/tree/main/lexicons/com/atproto)

## Related

- [All Publishing Guides](https://reeling.app/blog)
- [Bluesky MCP Setup: Post to AT Protocol with App Passwords and AI Agents](https://reeling.app/blog/bluesky-mcp-server-setup-app-password)
- [Prepare a video for Threads and Bluesky in Reeling](https://reeling.app/blog/cross-posting-to-threads-and-bluesky)
- [Threads API Guide (2026): Post, Tokens, Rate Limits and Scheduling](https://reeling.app/blog/threads-api-guide-post-tokens-rate-limits)
- [Free Creator Tools](https://reeling.app/tools)
- [Plans & Pricing](https://reeling.app/pricing)

---
Need the interactive version? Visit https://reeling.app/blog/bluesky-api-guide
Full site index for AI agents: https://reeling.app/llms.txt
