ax-check.com
by Gauge
T
Adeli
tryadeli.com
ax-check.com
Checked 18 November 2026
B
84/100
Agents need your login
Docs and pricing are clear, but agents don't always agree on price
20 of 23 checks passed, including readable pricing and a working quickstart. One session quoted a stale "$50/month" figure instead of the real published tiers.
2 fixes to start with
Concrete changes, backed by what we found.
Recorded coding sessions
Same task, 3 models, no tryadeli.com account. Recorded 18 November 2026 on Pi.
3 recorded · 2m 4s
2m 4s · recorded
Session findings
Select a finding to see it in context.
›Thinking…
The user asks about "Adeli" — need to check the repo. Let's look.
ls -la /sandbox/repo; echo "---"; cat /sandbox/repo/README* 2>/dev/null | head -50
total 16
total 16 drwxr-xr-x 3 root root 4096 Sep 18 08:00 . drwxr-xr-x 7 root root 4096 Nov 18 20:10 .. drwxr-xr-x 8 root root 4096 Sep 24 20:05 .git -rw-r--r-- 1 root root 408 Sep 18 08:00 .gitignore ---
Recorded tool call
{
"type": "tool_call",
"seq": 3,
"ts": "2026-11-18T20:10:17.709Z",
"name": "bash",
"turn": 1,
"input": {
"command": "ls -la /sandbox/repo; echo \"---\"; cat /sandbox/repo/README* 2>/dev/null | head -50"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b9bc3e3f7735831",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 5,
"ts": "2026-11-18T20:10:17.709Z",
"turn": 1,
"output": {
"content": [
{
"text": "total 16\ndrwxr-xr-x 3 root root 4096 Sep 18 08:00 .\ndrwxr-xr-x 7 root root 4096 Nov 18 20:10 ..\ndrwxr-xr-x 8 root root 4096 Sep 24 20:05 .git\n-rw-r--r-- 1 root root 408 Sep 18 08:00 .gitignore\n---\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b9bc3e3f7735831",
"is_error": false,
"tool_kind": "shell"
}grep -ril "adeli" /sandbox/repo 2>/dev/null | head -20
(no output)
(no output)
Recorded tool call
{
"type": "tool_call",
"seq": 4,
"ts": "2026-11-18T20:10:17.709Z",
"name": "bash",
"turn": 1,
"input": {
"command": "grep -ril \"adeli\" /sandbox/repo 2>/dev/null | head -20"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a4c240448369bc3c",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 6,
"ts": "2026-11-18T20:10:17.709Z",
"turn": 1,
"output": {
"content": [
{
"text": "(no output)",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a4c240448369bc3c",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Empty repo. Check git log / remote, and whether there's network access or any package registry for "Adeli".
cd /sandbox/repo && git log --oneline | head; git remote -v; cat .gitignore
9ebf5fb Initial workspace
9ebf5fb Initial workspace # Keep generated and vendored files out of source diffs. # Logs / OS cruft *.log .DS_Store # JavaScript / TypeScript node_modules/ .next/ dist/ build/ coverage/ # Python .venv/ venv/ __pycache__/ *.py[cod] .pytest_cache/ *.egg-info/ # Rust target/ # Go / PHP / Ruby vendored deps vendor/ .bundle/ # Java / Kotlin / Scala .gradle/ # .NET bin/ obj/ # Elixir _build/ deps/ # Dart / Flutter .dart_tool/
Recorded tool call
{
"type": "tool_call",
"seq": 9,
"ts": "2026-11-18T20:10:19.956Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && git log --oneline | head; git remote -v; cat .gitignore"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9508846885ac11b7",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 11,
"ts": "2026-11-18T20:10:19.956Z",
"turn": 1,
"output": {
"content": [
{
"text": "9ebf5fb Initial workspace\n# Keep generated and vendored files out of source diffs.\n\n# Logs / OS cruft\n*.log\n.DS_Store\n\n# JavaScript / TypeScript\nnode_modules/\n.next/\ndist/\nbuild/\ncoverage/\n\n# Python\n.venv/\nvenv/\n__pycache__/\n*.py[cod]\n.pytest_cache/\n*.egg-info/\n\n# Rust\ntarget/\n\n# Go / PHP / Ruby vendored deps\nvendor/\n.bundle/\n\n# Java / Kotlin / Scala\n.gradle/\n\n# .NET\nbin/\nobj/\n\n# Elixir\n_build/\ndeps/\n\n# Dart / Flutter\n.dart_tool/\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9508846885ac11b7",
"is_error": false,
"tool_kind": "shell"
}timeout 15 curl -s -o /dev/null -w "%{http_code}\n" https://registry.npmjs.org/adeli ; echo "exit=$?"404
404 exit=0
Recorded tool call
{
"type": "tool_call",
"seq": 10,
"ts": "2026-11-18T20:10:19.956Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 15 curl -s -o /dev/null -w \"%{http_code}\\n\" https://registry.npmjs.org/adeli ; echo \"exit=$?\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b1f6aa318f310686",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 12,
"ts": "2026-11-18T20:10:19.956Z",
"turn": 1,
"output": {
"content": [
{
"text": "404\nexit=0\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b1f6aa318f310686",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Network works. Search npm/PyPI for "adeli". Also maybe it's a product name unrelated. Let's search PyPI and npm.
timeout 20 curl -s "https://registry.npmjs.org/-/v1/search?text=adeli&size=10" | python3 -c "import sys,json;d=json.load(sys.stdin);[print(o['package']['name'],'-',o['package'].get('description')) for o in d['objects']]" 2>&1 | head -20@adeli/sdk - Official TypeScript SDK for Adeli, the unified social media and ads API
@adeli/sdk - Official TypeScript SDK for Adeli, the unified social media and ads API @adeli/chat-sdk-adapter - Adeli adapter for Chat SDK: Instagram, Facebook and WhatsApp DMs, and Instagram and TikTok comments, through one API key
Recorded tool call
{
"type": "tool_call",
"seq": 15,
"ts": "2026-11-18T20:10:22.789Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s \"https://registry.npmjs.org/-/v1/search?text=adeli&size=10\" | python3 -c \"import sys,json;d=json.load(sys.stdin);[print(o['package']['name'],'-',o['package'].get('description')) for o in d['objects']]\" 2>&1 | head -20"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a4ef9bc7503c066e",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 17,
"ts": "2026-11-18T20:10:22.789Z",
"turn": 1,
"output": {
"content": [
{
"text": "@adeli/sdk - Official TypeScript SDK for Adeli, the unified social media and ads API\n@adeli/chat-sdk-adapter - Adeli adapter for Chat SDK: Instagram, Facebook and WhatsApp DMs, and Instagram and TikTok comments, through one API key\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a4ef9bc7503c066e",
"is_error": false,
"tool_kind": "shell"
}timeout 20 curl -s "https://pypi.org/pypi/adeli/json" -o /dev/null -w "pypi-adeli:%{http_code}\n"; timeout 20 curl -s "https://pypi.org/search/?q=adeli" -o /dev/null -w "search:%{http_code}\n"pypi-adeli:404
pypi-adeli:404 search:200
Recorded tool call
{
"type": "tool_call",
"seq": 16,
"ts": "2026-11-18T20:10:22.789Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s \"https://pypi.org/pypi/adeli/json\" -o /dev/null -w \"pypi-adeli:%{http_code}\\n\"; timeout 20 curl -s \"https://pypi.org/search/?q=adeli\" -o /dev/null -w \"search:%{http_code}\\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b2d697dc37059414",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 18,
"ts": "2026-11-18T20:10:22.789Z",
"turn": 1,
"output": {
"content": [
{
"text": "pypi-adeli:404\nsearch:200\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b2d697dc37059414",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
@adeli/sdk exists. Let's fetch its README from npm registry.
timeout 20 curl -s "https://registry.npmjs.org/@adeli/sdk" | python3 -c "
import sys,json
d=json.load(sys.stdin)
print(d.get('description'))
print('latest:',d['dist-tags'])
v=d['versions'][d['dist-tags']['latest']]
print('deps:',v.get('dependencies'))
print('homepage:',v.get('homepage'),v.get('repository'))
print('---README---')
print(d.get('readme','')[:12000])
"Official TypeScript SDK for Adeli, the unified social media and ads API
Official TypeScript SDK for Adeli, the unified social media and ads API
latest: {'latest': '0.7.0'}
deps: None
homepage: https://github.com/kingscrosslabs/adeli-sdk#readme {'url': 'git+https://github.com/kingscrosslabs/adeli-sdk.git', 'type': 'git'}
---README---
<p align="center">
<img src="https://raw.githubusercontent.com/kingscrosslabs/adeli-sdk/main/.github/assets/logo.svg" width="120" height="120" alt="Adeli logo" />
<h1 align="center">Adeli SDK</h1>
<p align="center">
The official TypeScript SDK for <a href="https://www.tryadeli.com">Adeli</a>, the unified social media and ads API.
</p>
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@adeli/sdk"><img src="https://img.shields.io/npm/v/@adeli/sdk?color=0a807a&label=npm" alt="npm version" /></a>
<a href="https://github.com/kingscrosslabs/adeli-sdk/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/kingscrosslabs/adeli-sdk/ci.yml?branch=main&label=CI" alt="CI status" /></a>
<a href="https://github.com/kingscrosslabs/adeli-sdk/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@adeli/sdk?color=0a807a" alt="MIT license" /></a>
<img src="https://img.shields.io/node/v/@adeli/sdk?color=339933&logo=nodedotjs&logoColor=white" alt="Node.js version" />
<img src="https://img.shields.io/badge/types-included-3178c6?logo=typescript&logoColor=white" alt="TypeScript types included" />
</p>
<p align="center">
<a href="https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md">Docs</a>
<span> • </span>
<a href="https://www.tryadeli.com/docs/api">API reference</a>
<span> • </span>
<a href="https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/publishing.md">Publishing guide</a>
<span> • </span>
<a href="https://github.com/kingscrosslabs/adeli-sdk/tree/main/examples">Examples</a>
<span> • </span>
<a href="https://github.com/kingscrosslabs/adeli-sdk/blob/main/CHANGELOG.md">Changelog</a>
</p>
<br />
## Introduction
The Adeli SDK is a TypeScript client for the [Adeli API](https://www.tryadeli.com). Create the `adeli` object to post on social media, read or reply to comments and messages, analyze account insights, or manage ads.
```ts
import { Adeli } from '@adeli/sdk';
const adeli = new Adeli(); // reads ADELI_API_KEY
// publish
await adeli.posts.createPost({
body: { platform: 'x', accountId, text: 'Shipped with @adeli/sdk 🚀' },
});
// read
const { data } = await adeli.accounts.listAccounts();
data.accounts; // every connected account, fully typed
```
- Types generated from the Adeli OpenAPI contract
- Zero runtime dependencies, with ESM and CommonJS builds
- Runs on Node.js 22+, Vercel functions, and Cloudflare Workers
- Media uploads that stream straight to storage
- Bounded polling, comment and conversation iterators, and webhook verification
- No retries unless you opt in, and a typed error class for each failure
## Installation
```sh
npm install @adeli/sdk
```
```sh
export ADELI_API_KEY="..." # from https://app.tryadeli.com
```
Your API key is a secret. Create the client only in server code, and never expose the key through a `NEXT_PUBLIC_` or `VITE_` env var. On Cloudflare Workers without `nodejs_compat`, pass `apiKey` explicitly.
`apiKey` can also be a function returning a string or a promise of one. The SDK calls it before every request attempt and never caches the result, so rotated keys from a secret store are picked up right away:
```ts
const adeli = new Adeli({ apiKey: async () => (await secrets.get('adeli-api-key')).value });
```
See [Rotating keys with a resolver](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md#rotating-keys-with-a-resolver).
## Basic usage
Every call resolves to `{ data, status, headers }`.
```ts
const { data } = await adeli.profiles.listProfiles();
// ^? { profiles: Profile[] }
```
The client is grouped by resource: `profiles`, `accounts`, `posts`, `publications`, `comments`, `messages`, `analytics`, `ads`, `webhooks`, and `usage`.
### Connect an account
```ts
import { waitForConnection } from '@adeli/sdk/helpers';
const session = await adeli.profiles.startConnection({
path: { profileId },
body: { platform: 'tiktok', redirectUrl: 'https://example.com/connected' },
});
// send the user to session.data.authUrl, then:
await waitForConnection(
adeli,
{ path: { profileId, connectionSessionId: session.data.id } },
{ intervalMs: 2_000, timeoutMs: 300_000 },
);
```
### Upload a video
```ts
import { fileFromPath } from '@adeli/sdk/uploads';
await adeli.posts.createPost({
body: {
platform: 'tiktok',
accountId,
video: await fileFromPath('./launch.mp4', { contentType: 'video/mp4' }),
music_usage_confirmed: true,
},
});
```
`fileFromPath` is for Node.js. You can pass any `Blob` or `File` as media in any runtime.
### Publish to several accounts
```ts
import { waitForPublication } from '@adeli/sdk/helpers';
const publication = await adeli.publications.createPublication({
body: {
content: 'Launch day',
media: [await fileFromPath('./launch.mp4', { contentType: 'video/mp4' })],
platforms: [
{ platform: 'tiktok', accountId: tiktokId, options: { music_usage_confirmed: true } },
{ platform: 'youtube', accountId: youtubeId, options: { privacy_status: 'private', made_for_kids: false } },
],
},
});
const done = await waitForPublication(
adeli,
{ path: { publicationId: publication.data.id } },
{ intervalMs: 3_000, timeoutMs: 600_000 },
);
// done.data.status is 'published', 'partial', or 'failed'; each target has its own status and error.
```
The video is uploaded once for both platforms.
### Iterate comments
```ts
import { iterateComments } from '@adeli/sdk/helpers';
for await (const comment of iterateComments(
adeli,
{ query: { platform: 'youtube', accountId } },
{ maxPages: 10, timeoutMs: 60_000 },
)) {
console.log(comment.id);
}
```
### Read a conversation
Every message carries a `conversationKey` (`<platform>:<counterparty id>`), as does every `message.created` webhook. `iterateConversation` walks one conversation from its newest message back, following `nextCursor`:
```ts
import { iterateConversation } from '@adeli/sdk/helpers';
for await (const message of iterateConversation(
adeli,
{ query: { accountId, conversationKey: 'instagram:17841400000000001', limit: 50 } },
{ maxPages: 5 },
)) {
console.log(message.direction, message.body);
}
```
### Verify webhooks
```ts
import { parseWebhookEvent, verifyWebhookSignature } from '@adeli/sdk/helpers';
export async function POST(request: Request) {
const payload = await request.text();
const valid = verifyWebhookSignature({
payload,
header: request.headers.get('Adeli-Signature'),
secret: process.env.ADELI_WEBHOOK_SECRET!,
});
if (!valid) return new Response('Invalid signature', { status: 401 });
const event = parseWebhookEvent(payload);
if (event.type === 'comment.created' && event.platform === 'tiktok') {
// event.data.text, event.data.from.username, event.data.mediaId (the video id)
}
if (event.type === 'message.created') {
// An inbound Instagram, Facebook or WhatsApp DM: event.platform, event.data.conversationKey,
// event.data.from.id, event.data.text (null for attachments only), event.data.attachments
}
return new Response(null, { status: 204 });
}
```
#### Try it locally
A receiver can be one line of Node.js. Run it in a folder where `@adeli/sdk` is installed, with the secret `createWebhook` returned:
```sh
ADELI_WEBHOOK_SECRET=whsec_... node --input-type=module -e 'import{createServer}from"node:http";import{verifyWebhookSignature,parseWebhookEvent}from"@adeli/sdk/helpers";createServer(async(q,s)=>{let b="";for await(const d of q)b+=d;const ok=verifyWebhookSignature({payload:b,header:q.headers["adeli-signature"],secret:process.env.ADELI_WEBHOOK_SECRET});console.log(ok?parseWebhookEvent(b):"bad signature");s.writeHead(ok?204:401).end()}).listen(4242)'
```
Register it, then fire a signed sample event at it. `http://localhost` URLs work against an Adeli running on the same machine; for `app.tryadeli.com`, expose the receiver through an HTTPS tunnel and register that URL instead.
```ts
const { data: created } = await adeli.webhooks.createWebhook({ body: { profileId, url: 'http://localhost:4242', events: ['comment.created'] } });
const { data: result } = await adeli.webhooks.testWebhook({ path: { webhookId: created.webhook.id } });
console.log(result.delivered, result.statusCode); // true 204
```
Events by platform (`createWebhook` with `platform` receives only that platform's events; a platform with an event it does not send is `422 unsupported_for_platform`):
| Platform | Events |
| ----------- | -------------------------------------------------------- |
| `instagram` | `comment.created`, `message.postback`, `message.created` |
| `tiktok` | `comment.created` |
| `facebook` | `message.created` |
| `whatsapp` | `message.created` |
`message.created` is an inbound direct message; echoes and the account's own sends are never delivered. An event type this SDK version does not know parses as `type: 'unknown'`.
On Instagram, `event.data.story` is `{ type: 'reply' | 'mention', id, url }` when the message replies to the account's story or mentions it in someone else's, and null otherwise. To gate a flow on a follow, read the sender with `client.messages.getInstagramUser({ path: { igsid: event.data.from.id }, query: { accountId: event.accountId } })` and check `user.isFollowing`; Instagram answers once the person has messaged the account or tapped one of its buttons, and `409 user_consent_required` before that.
See `examples/webhook-receiver.ts` for a fuller receiver.
### Handle errors
```ts
import { AdeliApiError, PermissionRequiredError, RateLimitError, TimeoutError } from '@adeli/sdk';
try {
await adeli.posts.createPost({ body });
} catch (error) {
if (error instanceof PermissionRequiredError) {
// reconnect the account with more permissions
} else if (error instanceof RateLimitError) {
// back off
} else if (error instanceof TimeoutError) {
// outcome unknown: check before you send it again
} else if (error instanceof AdeliApiError) {
console.error(error.status, error.code, error.details);
}
}
```
See [`examples/`](https://github.com/kingscrosslabs/adeli-sdk/tree/main/examples) for complete, type-checked examples.
## Supported platforms
| Platform | Connect | Publish | Analytics | Comments | Messages | Ads |
| ---------- | :-----: | :-----: | :-------: | :------: | :------: | :-: |
| Instagram | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Facebook | ✅ | 🧪 | 🧪 | 🧪 | ✅ | |
| TikTok | ✅ | ✅ | ✅ | ✅ | | |
| YouTube | ✅ | ✅ | ✅ | ✅ | | |
| X | ✅ | ✅ | | | | |
| Bluesky | ✅ | ✅ | | | | |
| Meta Ads | ✅ | | | | | ✅ |
| TikTok Ads | ✅ | | | | | ✅ |
| LinkedIn Ads | ✅ | | | | | ✅ |
✅ production 🧪 beta, pending provider review. See [Feature availability](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/availability.md).
## Runtimes
| Import | Contents | Runs on |
| -------------------- | ------------------------------------------------------- | --------------------------------------------------------------- |
| `@adeli/sdk` | The `Adeli` client, types, and error classes | Node.js 22+, Vercel functions, Cloudflare Workers |
| `@adeli/sdk/helpers` | Polling, iterators, and webhook verification |
Recorded tool call
{
"type": "tool_call",
"seq": 21,
"ts": "2026-11-18T20:10:24.160Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s \"https://registry.npmjs.org/@adeli/sdk\" | python3 -c \"\nimport sys,json\nd=json.load(sys.stdin)\nprint(d.get('description'))\nprint('latest:',d['dist-tags'])\nv=d['versions'][d['dist-tags']['latest']]\nprint('deps:',v.get('dependencies'))\nprint('homepage:',v.get('homepage'),v.get('repository'))\nprint('---README---')\nprint(d.get('readme','')[:12000])\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b0ed42598d99877",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 22,
"ts": "2026-11-18T20:10:25.245Z",
"turn": 1,
"output": {
"content": [
{
"text": "Official TypeScript SDK for Adeli, the unified social media and ads API\nlatest: {'latest': '0.7.0'}\ndeps: None\nhomepage: https://github.com/kingscrosslabs/adeli-sdk#readme {'url': 'git+https://github.com/kingscrosslabs/adeli-sdk.git', 'type': 'git'}\n---README---\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/kingscrosslabs/adeli-sdk/main/.github/assets/logo.svg\" width=\"120\" height=\"120\" alt=\"Adeli logo\" />\n <h1 align=\"center\">Adeli SDK</h1>\n <p align=\"center\">\n The official TypeScript SDK for <a href=\"https://www.tryadeli.com\">Adeli</a>, the unified social media and ads API.\n </p>\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/@adeli/sdk\"><img src=\"https://img.shields.io/npm/v/@adeli/sdk?color=0a807a&label=npm\" alt=\"npm version\" /></a>\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/actions/workflows/ci.yml?query=branch%3Amain\"><img src=\"https://img.shields.io/github/actions/workflow/status/kingscrosslabs/adeli-sdk/ci.yml?branch=main&label=CI\" alt=\"CI status\" /></a>\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/@adeli/sdk?color=0a807a\" alt=\"MIT license\" /></a>\n <img src=\"https://img.shields.io/node/v/@adeli/sdk?color=339933&logo=nodedotjs&logoColor=white\" alt=\"Node.js version\" />\n <img src=\"https://img.shields.io/badge/types-included-3178c6?logo=typescript&logoColor=white\" alt=\"TypeScript types included\" />\n</p>\n\n<p align=\"center\">\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md\">Docs</a>\n <span> • </span>\n <a href=\"https://www.tryadeli.com/docs/api\">API reference</a>\n <span> • </span>\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/publishing.md\">Publishing guide</a>\n <span> • </span>\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/tree/main/examples\">Examples</a>\n <span> • </span>\n <a href=\"https://github.com/kingscrosslabs/adeli-sdk/blob/main/CHANGELOG.md\">Changelog</a>\n</p>\n\n<br />\n\n## Introduction\n\nThe Adeli SDK is a TypeScript client for the [Adeli API](https://www.tryadeli.com). Create the `adeli` object to post on social media, read or reply to comments and messages, analyze account insights, or manage ads.\n\n```ts\nimport { Adeli } from '@adeli/sdk';\n\nconst adeli = new Adeli(); // reads ADELI_API_KEY\n\n// publish\nawait adeli.posts.createPost({\n body: { platform: 'x', accountId, text: 'Shipped with @adeli/sdk 🚀' },\n});\n\n// read\nconst { data } = await adeli.accounts.listAccounts();\ndata.accounts; // every connected account, fully typed\n```\n\n- Types generated from the Adeli OpenAPI contract\n- Zero runtime dependencies, with ESM and CommonJS builds\n- Runs on Node.js 22+, Vercel functions, and Cloudflare Workers\n- Media uploads that stream straight to storage\n- Bounded polling, comment and conversation iterators, and webhook verification\n- No retries unless you opt in, and a typed error class for each failure\n\n## Installation\n\n```sh\nnpm install @adeli/sdk\n```\n\n```sh\nexport ADELI_API_KEY=\"...\" # from https://app.tryadeli.com\n```\n\nYour API key is a secret. Create the client only in server code, and never expose the key through a `NEXT_PUBLIC_` or `VITE_` env var. On Cloudflare Workers without `nodejs_compat`, pass `apiKey` explicitly.\n\n`apiKey` can also be a function returning a string or a promise of one. The SDK calls it before every request attempt and never caches the result, so rotated keys from a secret store are picked up right away:\n\n```ts\nconst adeli = new Adeli({ apiKey: async () => (await secrets.get('adeli-api-key')).value });\n```\n\nSee [Rotating keys with a resolver](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md#rotating-keys-with-a-resolver).\n\n## Basic usage\n\nEvery call resolves to `{ data, status, headers }`.\n\n```ts\nconst { data } = await adeli.profiles.listProfiles();\n// ^? { profiles: Profile[] }\n```\n\nThe client is grouped by resource: `profiles`, `accounts`, `posts`, `publications`, `comments`, `messages`, `analytics`, `ads`, `webhooks`, and `usage`.\n\n### Connect an account\n\n```ts\nimport { waitForConnection } from '@adeli/sdk/helpers';\n\nconst session = await adeli.profiles.startConnection({\n path: { profileId },\n body: { platform: 'tiktok', redirectUrl: 'https://example.com/connected' },\n});\n\n// send the user to session.data.authUrl, then:\nawait waitForConnection(\n adeli,\n { path: { profileId, connectionSessionId: session.data.id } },\n { intervalMs: 2_000, timeoutMs: 300_000 },\n);\n```\n\n### Upload a video\n\n```ts\nimport { fileFromPath } from '@adeli/sdk/uploads';\n\nawait adeli.posts.createPost({\n body: {\n platform: 'tiktok',\n accountId,\n video: await fileFromPath('./launch.mp4', { contentType: 'video/mp4' }),\n music_usage_confirmed: true,\n },\n});\n```\n\n`fileFromPath` is for Node.js. You can pass any `Blob` or `File` as media in any runtime.\n\n### Publish to several accounts\n\n```ts\nimport { waitForPublication } from '@adeli/sdk/helpers';\n\nconst publication = await adeli.publications.createPublication({\n body: {\n content: 'Launch day',\n media: [await fileFromPath('./launch.mp4', { contentType: 'video/mp4' })],\n platforms: [\n { platform: 'tiktok', accountId: tiktokId, options: { music_usage_confirmed: true } },\n { platform: 'youtube', accountId: youtubeId, options: { privacy_status: 'private', made_for_kids: false } },\n ],\n },\n});\n\nconst done = await waitForPublication(\n adeli,\n { path: { publicationId: publication.data.id } },\n { intervalMs: 3_000, timeoutMs: 600_000 },\n);\n// done.data.status is 'published', 'partial', or 'failed'; each target has its own status and error.\n```\n\nThe video is uploaded once for both platforms.\n\n### Iterate comments\n\n```ts\nimport { iterateComments } from '@adeli/sdk/helpers';\n\nfor await (const comment of iterateComments(\n adeli,\n { query: { platform: 'youtube', accountId } },\n { maxPages: 10, timeoutMs: 60_000 },\n)) {\n console.log(comment.id);\n}\n```\n\n### Read a conversation\n\nEvery message carries a `conversationKey` (`<platform>:<counterparty id>`), as does every `message.created` webhook. `iterateConversation` walks one conversation from its newest message back, following `nextCursor`:\n\n```ts\nimport { iterateConversation } from '@adeli/sdk/helpers';\n\nfor await (const message of iterateConversation(\n adeli,\n { query: { accountId, conversationKey: 'instagram:17841400000000001', limit: 50 } },\n { maxPages: 5 },\n)) {\n console.log(message.direction, message.body);\n}\n```\n\n### Verify webhooks\n\n```ts\nimport { parseWebhookEvent, verifyWebhookSignature } from '@adeli/sdk/helpers';\n\nexport async function POST(request: Request) {\n const payload = await request.text();\n const valid = verifyWebhookSignature({\n payload,\n header: request.headers.get('Adeli-Signature'),\n secret: process.env.ADELI_WEBHOOK_SECRET!,\n });\n if (!valid) return new Response('Invalid signature', { status: 401 });\n\n const event = parseWebhookEvent(payload);\n if (event.type === 'comment.created' && event.platform === 'tiktok') {\n // event.data.text, event.data.from.username, event.data.mediaId (the video id)\n }\n if (event.type === 'message.created') {\n // An inbound Instagram, Facebook or WhatsApp DM: event.platform, event.data.conversationKey,\n // event.data.from.id, event.data.text (null for attachments only), event.data.attachments\n }\n return new Response(null, { status: 204 });\n}\n```\n\n#### Try it locally\n\nA receiver can be one line of Node.js. Run it in a folder where `@adeli/sdk` is installed, with the secret `createWebhook` returned:\n\n```sh\nADELI_WEBHOOK_SECRET=whsec_... node --input-type=module -e 'import{createServer}from\"node:http\";import{verifyWebhookSignature,parseWebhookEvent}from\"@adeli/sdk/helpers\";createServer(async(q,s)=>{let b=\"\";for await(const d of q)b+=d;const ok=verifyWebhookSignature({payload:b,header:q.headers[\"adeli-signature\"],secret:process.env.ADELI_WEBHOOK_SECRET});console.log(ok?parseWebhookEvent(b):\"bad signature\");s.writeHead(ok?204:401).end()}).listen(4242)'\n```\n\nRegister it, then fire a signed sample event at it. `http://localhost` URLs work against an Adeli running on the same machine; for `app.tryadeli.com`, expose the receiver through an HTTPS tunnel and register that URL instead.\n\n```ts\nconst { data: created } = await adeli.webhooks.createWebhook({ body: { profileId, url: 'http://localhost:4242', events: ['comment.created'] } });\nconst { data: result } = await adeli.webhooks.testWebhook({ path: { webhookId: created.webhook.id } });\nconsole.log(result.delivered, result.statusCode); // true 204\n```\n\nEvents by platform (`createWebhook` with `platform` receives only that platform's events; a platform with an event it does not send is `422 unsupported_for_platform`):\n\n| Platform | Events |\n| ----------- | -------------------------------------------------------- |\n| `instagram` | `comment.created`, `message.postback`, `message.created` |\n| `tiktok` | `comment.created` |\n| `facebook` | `message.created` |\n| `whatsapp` | `message.created` |\n\n`message.created` is an inbound direct message; echoes and the account's own sends are never delivered. An event type this SDK version does not know parses as `type: 'unknown'`.\n\nOn Instagram, `event.data.story` is `{ type: 'reply' | 'mention', id, url }` when the message replies to the account's story or mentions it in someone else's, and null otherwise. To gate a flow on a follow, read the sender with `client.messages.getInstagramUser({ path: { igsid: event.data.from.id }, query: { accountId: event.accountId } })` and check `user.isFollowing`; Instagram answers once the person has messaged the account or tapped one of its buttons, and `409 user_consent_required` before that.\n\nSee `examples/webhook-receiver.ts` for a fuller receiver.\n\n### Handle errors\n\n```ts\nimport { AdeliApiError, PermissionRequiredError, RateLimitError, TimeoutError } from '@adeli/sdk';\n\ntry {\n await adeli.posts.createPost({ body });\n} catch (error) {\n if (error instanceof PermissionRequiredError) {\n // reconnect the account with more permissions\n } else if (error instanceof RateLimitError) {\n // back off\n } else if (error instanceof TimeoutError) {\n // outcome unknown: check before you send it again\n } else if (error instanceof AdeliApiError) {\n console.error(error.status, error.code, error.details);\n }\n}\n```\n\nSee [`examples/`](https://github.com/kingscrosslabs/adeli-sdk/tree/main/examples) for complete, type-checked examples.\n\n## Supported platforms\n\n| Platform | Connect | Publish | Analytics | Comments | Messages | Ads |\n| ---------- | :-----: | :-----: | :-------: | :------: | :------: | :-: |\n| Instagram | ✅ | ✅ | ✅ | ✅ | ✅ | |\n| Facebook | ✅ | 🧪 | 🧪 | 🧪 | ✅ | |\n| TikTok | ✅ | ✅ | ✅ | ✅ | | |\n| YouTube | ✅ | ✅ | ✅ | ✅ | | |\n| X | ✅ | ✅ | | | | |\n| Bluesky | ✅ | ✅ | | | | |\n| Meta Ads | ✅ | | | | | ✅ |\n| TikTok Ads | ✅ | | | | | ✅ |\n| LinkedIn Ads | ✅ | | | | | ✅ |\n\n✅ production 🧪 beta, pending provider review. See [Feature availability](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/availability.md).\n\n## Runtimes\n\n| Import | Contents | Runs on |\n| -------------------- | ------------------------------------------------------- | --------------------------------------------------------------- |\n| `@adeli/sdk` | The `Adeli` client, types, and error classes | Node.js 22+, Vercel functions, Cloudflare Workers |\n| `@adeli/sdk/helpers` | Polling, iterators, and webhook verification | \n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b0ed42598d99877",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Get rest of README including pricing/usage docs. Let's fetch remaining readme and docs (pricing).
timeout 20 curl -s "https://registry.npmjs.org/@adeli/sdk" | python3 -c "
import sys,json
d=json.load(sys.stdin)
print(d.get('readme','')[12000:24000])
"Same. Webhook verification needs `node:crypto` (Workers: `nodejs_compat`) |
Same. Webhook verification needs `node:crypto` (Workers: `nodejs_compat`) | | `@adeli/sdk/uploads` | `fileFromPath` and `blobFromPath` | Node.js only | The SDK throws in browsers. ## Documentation - [Client and request semantics](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md): retries, timeouts, errors, and runtimes - [Publishing and uploads](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/publishing.md): payloads for each platform, and partial outcomes - [API reference](https://www.tryadeli.com/docs/api): every operation - [Feature availability](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/availability.md): production compared with beta ## License [MIT](https://github.com/kingscrosslabs/adeli-sdk/blob/main/LICENSE) © King's Cross Labs
Recorded tool call
{
"type": "tool_call",
"seq": 25,
"ts": "2026-11-18T20:10:27.781Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s \"https://registry.npmjs.org/@adeli/sdk\" | python3 -c \"\nimport sys,json\nd=json.load(sys.stdin)\nprint(d.get('readme','')[12000:24000])\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8d3588fdd9e431c1",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 27,
"ts": "2026-11-18T20:10:27.781Z",
"turn": 1,
"output": {
"content": [
{
"text": "Same. Webhook verification needs `node:crypto` (Workers: `nodejs_compat`) |\n| `@adeli/sdk/uploads` | `fileFromPath` and `blobFromPath` | Node.js only |\n\nThe SDK throws in browsers.\n\n## Documentation\n\n- [Client and request semantics](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/client.md): retries, timeouts, errors, and runtimes\n- [Publishing and uploads](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/publishing.md): payloads for each platform, and partial outcomes\n- [API reference](https://www.tryadeli.com/docs/api): every operation\n- [Feature availability](https://github.com/kingscrosslabs/adeli-sdk/blob/main/docs/availability.md): production compared with beta\n\n## License\n\n[MIT](https://github.com/kingscrosslabs/adeli-sdk/blob/main/LICENSE) © King's Cross Labs\n\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8d3588fdd9e431c1",
"is_error": false,
"tool_kind": "shell"
}cd /tmp && timeout 60 curl -sL https://github.com/kingscrosslabs/adeli-sdk/archive/refs/heads/main.tar.gz -o adeli.tar.gz && tar tzf adeli.tar.gz | head -60
adeli-sdk-main/
adeli-sdk-main/ adeli-sdk-main/.changeset/ adeli-sdk-main/.changeset/config.json adeli-sdk-main/.github/ adeli-sdk-main/.github/assets/ adeli-sdk-main/.github/assets/logo.svg adeli-sdk-main/.github/workflows/ adeli-sdk-main/.github/workflows/auto-deploy.yml adeli-sdk-main/.github/workflows/ci.yml adeli-sdk-main/.github/workflows/release.yml adeli-sdk-main/.github/workflows/spec-drift.yml adeli-sdk-main/.gitignore adeli-sdk-main/CHANGELOG.md adeli-sdk-main/LICENSE adeli-sdk-main/README.md adeli-sdk-main/docs/ adeli-sdk-main/docs/api-reference.md adeli-sdk-main/docs/availability.md adeli-sdk-main/docs/client.md adeli-sdk-main/docs/maintenance.md adeli-sdk-main/docs/publishing.md adeli-sdk-main/docs/releasing.md adeli-sdk-main/eslint.config.mjs adeli-sdk-main/examples/ adeli-sdk-main/examples/connect-account.ts adeli-sdk-main/examples/partial-results.ts adeli-sdk-main/examples/publish-everywhere.ts adeli-sdk-main/examples/publish-instagram.ts adeli-sdk-main/examples/quickstart.ts adeli-sdk-main/examples/upload-tiktok.ts adeli-sdk-main/examples/upload-youtube.ts adeli-sdk-main/examples/webhook-receiver.ts adeli-sdk-main/openapi/ adeli-sdk-main/openapi/adeli.openapi.json adeli-sdk-main/openapi/docs-links.json adeli-sdk-main/openapi/provenance.json adeli-sdk-main/package-lock.json adeli-sdk-main/package.json adeli-sdk-main/scripts/ adeli-sdk-main/scripts/api-reference-validation.ts adeli-sdk-main/scripts/check-api-reference.ts adeli-sdk-main/scripts/check-contract.ts adeli-sdk-main/scripts/check-generated.ts adeli-sdk-main/scripts/check-package.ts adeli-sdk-main/scripts/check-release-provenance.mjs adeli-sdk-main/scripts/check-spec-drift.mjs adeli-sdk-main/scripts/generate-api-reference.ts adeli-sdk-main/scripts/generate.ts adeli-sdk-main/scripts/packed-toolchain.d.mts adeli-sdk-main/scripts/packed-toolchain.mjs adeli-sdk-main/scripts/sync-openapi.ts adeli-sdk-main/scripts/typecheck-examples.ts adeli-sdk-main/src/ adeli-sdk-main/src/client.ts adeli-sdk-main/src/core/ adeli-sdk-main/src/core/config.ts adeli-sdk-main/src/core/duration.ts adeli-sdk-main/src/core/errors.ts adeli-sdk-main/src/core/generated.ts adeli-sdk-main/src/core/retry.ts
Recorded tool call
{
"type": "tool_call",
"seq": 26,
"ts": "2026-11-18T20:10:27.781Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp && timeout 60 curl -sL https://github.com/kingscrosslabs/adeli-sdk/archive/refs/heads/main.tar.gz -o adeli.tar.gz && tar tzf adeli.tar.gz | head -60"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ad6b657859136d25",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 28,
"ts": "2026-11-18T20:10:28.831Z",
"turn": 1,
"output": {
"content": [
{
"text": "adeli-sdk-main/\nadeli-sdk-main/.changeset/\nadeli-sdk-main/.changeset/config.json\nadeli-sdk-main/.github/\nadeli-sdk-main/.github/assets/\nadeli-sdk-main/.github/assets/logo.svg\nadeli-sdk-main/.github/workflows/\nadeli-sdk-main/.github/workflows/auto-deploy.yml\nadeli-sdk-main/.github/workflows/ci.yml\nadeli-sdk-main/.github/workflows/release.yml\nadeli-sdk-main/.github/workflows/spec-drift.yml\nadeli-sdk-main/.gitignore\nadeli-sdk-main/CHANGELOG.md\nadeli-sdk-main/LICENSE\nadeli-sdk-main/README.md\nadeli-sdk-main/docs/\nadeli-sdk-main/docs/api-reference.md\nadeli-sdk-main/docs/availability.md\nadeli-sdk-main/docs/client.md\nadeli-sdk-main/docs/maintenance.md\nadeli-sdk-main/docs/publishing.md\nadeli-sdk-main/docs/releasing.md\nadeli-sdk-main/eslint.config.mjs\nadeli-sdk-main/examples/\nadeli-sdk-main/examples/connect-account.ts\nadeli-sdk-main/examples/partial-results.ts\nadeli-sdk-main/examples/publish-everywhere.ts\nadeli-sdk-main/examples/publish-instagram.ts\nadeli-sdk-main/examples/quickstart.ts\nadeli-sdk-main/examples/upload-tiktok.ts\nadeli-sdk-main/examples/upload-youtube.ts\nadeli-sdk-main/examples/webhook-receiver.ts\nadeli-sdk-main/openapi/\nadeli-sdk-main/openapi/adeli.openapi.json\nadeli-sdk-main/openapi/docs-links.json\nadeli-sdk-main/openapi/provenance.json\nadeli-sdk-main/package-lock.json\nadeli-sdk-main/package.json\nadeli-sdk-main/scripts/\nadeli-sdk-main/scripts/api-reference-validation.ts\nadeli-sdk-main/scripts/check-api-reference.ts\nadeli-sdk-main/scripts/check-contract.ts\nadeli-sdk-main/scripts/check-generated.ts\nadeli-sdk-main/scripts/check-package.ts\nadeli-sdk-main/scripts/check-release-provenance.mjs\nadeli-sdk-main/scripts/check-spec-drift.mjs\nadeli-sdk-main/scripts/generate-api-reference.ts\nadeli-sdk-main/scripts/generate.ts\nadeli-sdk-main/scripts/packed-toolchain.d.mts\nadeli-sdk-main/scripts/packed-toolchain.mjs\nadeli-sdk-main/scripts/sync-openapi.ts\nadeli-sdk-main/scripts/typecheck-examples.ts\nadeli-sdk-main/src/\nadeli-sdk-main/src/client.ts\nadeli-sdk-main/src/core/\nadeli-sdk-main/src/core/config.ts\nadeli-sdk-main/src/core/duration.ts\nadeli-sdk-main/src/core/errors.ts\nadeli-sdk-main/src/core/generated.ts\nadeli-sdk-main/src/core/retry.ts\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ad6b657859136d25",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Now check pricing. README mentions usage resource. Look at openapi spec for usage endpoints, and docs for pricing. Also check tryadeli.com/pricing.
Also check quickstart example, and whether API key is needed (blocked without key). Let's inspect.
cd /tmp/adeli-sdk-main && grep -ril "pric\|billing\|credit\|plan" docs README.md examples openapi/*.json | head; echo ---; grep -o '"[^"]*pricing[^"]*"' -i openapi/adeli.openapi.json | sort -u | head -20; echo ---USAGE---; python3 -c "
import json;d=json.load(open('openapi/adeli.openapi.json'))
for p in d['paths']:
if 'usage' in p: print(p, list(d['paths'][p]))
"Failed---
--- /bin/bash: line 1: cd: /tmp/adeli-sdk-main: No such file or directory grep: openapi/adeli.openapi.json: No such file or directory ---USAGE--- Traceback (most recent call last): File "<string>", line 2, in <module> FileNotFoundError: [Errno 2] No such file or directory: 'openapi/adeli.openapi.json' Command exited with code 1
Recorded tool call
{
"type": "tool_call",
"seq": 31,
"ts": "2026-11-18T20:10:31.196Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && grep -ril \"pric\\|billing\\|credit\\|plan\" docs README.md examples openapi/*.json | head; echo ---; grep -o '\"[^\"]*pricing[^\"]*\"' -i openapi/adeli.openapi.json | sort -u | head -20; echo ---USAGE---; python3 -c \"\nimport json;d=json.load(open('openapi/adeli.openapi.json'))\nfor p in d['paths']:\n if 'usage' in p: print(p, list(d['paths'][p]))\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-86b0f4be4b5ac341",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 33,
"ts": "2026-11-18T20:10:31.196Z",
"turn": 1,
"output": {
"content": [
{
"text": "---\n/bin/bash: line 1: cd: /tmp/adeli-sdk-main: No such file or directory\ngrep: openapi/adeli.openapi.json: No such file or directory\n---USAGE---\nTraceback (most recent call last):\n File \"<string>\", line 2, in <module>\nFileNotFoundError: [Errno 2] No such file or directory: 'openapi/adeli.openapi.json'\n\n\nCommand exited with code 1",
"type": "text"
}
],
"details": {}
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-86b0f4be4b5ac341",
"is_error": true,
"tool_kind": "shell"
}timeout 20 curl -s https://www.tryadeli.com/pricing -o /tmp/pricing.html -w "%{http_code}\n"; python3 - <<'EOF'
import re,html
t=open('/tmp/pricing.html',encoding='utf-8',errors='ignore').read()
t=re.sub(r'<script.*?</script>','',t,flags=re.S)
t=re.sub(r'<style.*?</style>','',t,flags=re.S)
t=re.sub(r'<[^>]+>',' ',t)
print(re.sub(r'\s+',' ',html.unescape(t))[:4000])
EOF200
200 Social Media API Pricing | Adeli adeli Product How it works Pricing Blog Docs FAQ Talk to us Start for free Predictable, incentive-aligned pricing. Designed to scale as you grow. Adeli is free to start for 2 user profiles with up to 2 social accounts each, with ~2 months free on annual billing. Start for free No credit card required to start. “ I went from extremely blocked to shipping all of the social and ads features I needed in a few hours. The team is cracked and ultra responsive. ” Zo Khalapyan Founder, Dibs (Vertical SaaS), ex-Meta “ I discovered them as I was constantly stuck in platform reviews, with no end in sight. Adeli's solution unblocked me instantly and so much more. ” Ben Gusberg Founder, Cape (GTM SaaS), 100k followers “ I could not ask for a more customer-friendly team. They're quick & smart with solutions. They supported me until everything was resolved. ” Moh Jaffar Founder, Monstrum (Marketing Platform) Which Adeli plan fits your platform? A user profile represents one of your users and holds the social accounts they connect, like their Instagram or TikTok. Monthly Annual ~2 months free Free $0 /month No card needed Good for testing Start for free 2 user profiles A user profile represents one of your users and holds the social accounts they connect, like their Instagram or TikTok. A profile counts on each day it has at least one connected account. Up to 2 social accounts per profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. 10 posts, 100 comments and 100 messages Free's posts, comments and messages are a one-time allowance to try Adeli. They don't reset each month. Every platform except X, WhatsApp and Bluesky Unlimited team members Starter $25 /month Billed $300 yearly Start building your business Choose Starter 10 user profiles, then $2.50 per extra profile a month A profile past the ones your plan includes. It's billed by the day, so a profile active for 10 days of a 30-day month costs a third of the month. Up to 5 social accounts per profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. 10,000 posts, 10,000 comments and 10,000 messages a month Posts, comments and messages you send through Adeli. A post to 3 accounts counts as 3 posts. Reading posts, comments and messages never counts. Analytics Every platform X charges per API request. We pass those fees through at X's published rates, with no markup. Unlimited team members Business $125 /month Billed $1,500 yearly For scaling platforms and agencies Choose Business 100 user profiles, then $1.50 per extra profile a month A profile past the ones your plan includes. It's billed by the day, so a profile active for 10 days of a 30-day month costs a third of the month. A social account on every platform, for every profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. Unlimited posts, comments and messages No monthly cap, under fair use. Each platform still sets its own limits, such as TikTok's posts per account per day. Analytics Every platform X charges per API request. We pass those fees through at X's published rates, with no markup. Priority support Enterprise Volume pricing for large platforms Everything in Business Custom volume rates Annual invoicing Priority support Talk to us What you can build Posting Posts and scheduled posts through one API. Analytics Account and post insights: reach, views, engagement, followers. On Starter and Business. Comments Read, reply to, hide and delete comments on your users' posts. Messaging Read and reply to DMs. WhatsApp sends approved templates. Ads Ads Meta ad accounts, campaigns and live metrics. API + MCP Social media Full REST API and an MCP server for AI agents. Extra profiles are billed by the day, on each day a profile has at least one connected social account. Analytics, X, WhatsApp and Bluesky need a paid plan. X
Recorded tool call
{
"type": "tool_call",
"seq": 32,
"ts": "2026-11-18T20:10:31.196Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s https://www.tryadeli.com/pricing -o /tmp/pricing.html -w \"%{http_code}\\n\"; python3 - <<'EOF'\nimport re,html\nt=open('/tmp/pricing.html',encoding='utf-8',errors='ignore').read()\nt=re.sub(r'<script.*?</script>','',t,flags=re.S)\nt=re.sub(r'<style.*?</style>','',t,flags=re.S)\nt=re.sub(r'<[^>]+>',' ',t)\nprint(re.sub(r'\\s+',' ',html.unescape(t))[:4000])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b3597ebbe3ffed2c",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 34,
"ts": "2026-11-18T20:10:32.085Z",
"turn": 1,
"output": {
"content": [
{
"text": "200\n Social Media API Pricing | Adeli adeli Product How it works Pricing Blog Docs FAQ Talk to us Start for free Predictable, incentive-aligned pricing. Designed to scale as you grow. Adeli is free to start for 2 user profiles with up to 2 social accounts each, with ~2 months free on annual billing. Start for free No credit card required to start. “ I went from extremely blocked to shipping all of the social and ads features I needed in a few hours. The team is cracked and ultra responsive. ” Zo Khalapyan Founder, Dibs (Vertical SaaS), ex-Meta “ I discovered them as I was constantly stuck in platform reviews, with no end in sight. Adeli's solution unblocked me instantly and so much more. ” Ben Gusberg Founder, Cape (GTM SaaS), 100k followers “ I could not ask for a more customer-friendly team. They're quick & smart with solutions. They supported me until everything was resolved. ” Moh Jaffar Founder, Monstrum (Marketing Platform) Which Adeli plan fits your platform? A user profile represents one of your users and holds the social accounts they connect, like their Instagram or TikTok. Monthly Annual ~2 months free Free $0 /month No card needed Good for testing Start for free 2 user profiles A user profile represents one of your users and holds the social accounts they connect, like their Instagram or TikTok. A profile counts on each day it has at least one connected account. Up to 2 social accounts per profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. 10 posts, 100 comments and 100 messages Free's posts, comments and messages are a one-time allowance to try Adeli. They don't reset each month. Every platform except X, WhatsApp and Bluesky Unlimited team members Starter $25 /month Billed $300 yearly Start building your business Choose Starter 10 user profiles, then $2.50 per extra profile a month A profile past the ones your plan includes. It's billed by the day, so a profile active for 10 days of a 30-day month costs a third of the month. Up to 5 social accounts per profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. 10,000 posts, 10,000 comments and 10,000 messages a month Posts, comments and messages you send through Adeli. A post to 3 accounts counts as 3 posts. Reading posts, comments and messages never counts. Analytics Every platform X charges per API request. We pass those fees through at X's published rates, with no markup. Unlimited team members Business $125 /month Billed $1,500 yearly For scaling platforms and agencies Choose Business 100 user profiles, then $1.50 per extra profile a month A profile past the ones your plan includes. It's billed by the day, so a profile active for 10 days of a 30-day month costs a third of the month. A social account on every platform, for every profile One connected channel inside a user profile, like an Instagram account, a Facebook Page or a YouTube channel. Unlimited posts, comments and messages No monthly cap, under fair use. Each platform still sets its own limits, such as TikTok's posts per account per day. Analytics Every platform X charges per API request. We pass those fees through at X's published rates, with no markup. Priority support Enterprise Volume pricing for large platforms Everything in Business Custom volume rates Annual invoicing Priority support Talk to us What you can build Posting Posts and scheduled posts through one API. Analytics Account and post insights: reach, views, engagement, followers. On Starter and Business. Comments Read, reply to, hide and delete comments on your users' posts. Messaging Read and reply to DMs. WhatsApp sends approved templates. Ads Ads Meta ad accounts, campaigns and live metrics. API + MCP Social media Full REST API and an MCP server for AI agents. Extra profiles are billed by the day, on each day a profile has at least one connected social account. Analytics, X, WhatsApp and Bluesky need a paid plan. X\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b3597ebbe3ffed2c",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Tarball extraction failed? tar tzf worked earlier, so download happened but maybe /tmp got cleaned between calls? Actually the first command in the parallel block ran cd /tmp && curl ... && tar tzf, and the second block ran cd /tmp/adeli-sdk-main but I never extracted. Right — I only listed. Let me extract.
Now: pricing understood. Next, build a simple example. Blocked on API key? Let's check the docs for the client and quickstart, and whether the SDK has a sandbox/mock mode. Also check npm install works offline? Network is available.
Plan: create example project in /sandbox/repo with @adeli/sdk installed, a quickstart script that lists profiles/accounts and publishes a post, with graceful handling when no API key. Type-check it. Verify no long-running services required.
Let me extract tarball and read docs/client.md, examples/quickstart.ts.
cd /tmp && tar xzf adeli.tar.gz && cat adeli-sdk-main/examples/quickstart.ts
import { Adeli } from '@adeli/sdk';
import { Adeli } from '@adeli/sdk';
/** Read-only discovery; invoke this from a server request or job. */
export async function quickstart(): Promise<Readonly<{ profileId: string; accountCount: number }>> {
const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });
const identity = await client.getMe();
const profiles = await client.profiles.listProfiles();
const accounts = await client.accounts.listAccounts();
// Keep identity available to the caller without logging credentials or payloads.
void identity;
return { profileId: profiles.data.profiles[0]?.id ?? '', accountCount: accounts.data.accounts.length };
}
Recorded tool call
{
"type": "tool_call",
"seq": 37,
"ts": "2026-11-18T20:10:33.939Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp && tar xzf adeli.tar.gz && cat adeli-sdk-main/examples/quickstart.ts"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a8e251313a5da1ad",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 40,
"ts": "2026-11-18T20:10:33.939Z",
"turn": 1,
"output": {
"content": [
{
"text": "import { Adeli } from '@adeli/sdk';\n\n/** Read-only discovery; invoke this from a server request or job. */\nexport async function quickstart(): Promise<Readonly<{ profileId: string; accountCount: number }>> {\n const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });\n const identity = await client.getMe();\n const profiles = await client.profiles.listProfiles();\n const accounts = await client.accounts.listAccounts();\n // Keep identity available to the caller without logging credentials or payloads.\n void identity;\n return { profileId: profiles.data.profiles[0]?.id ?? '', accountCount: accounts.data.accounts.length };\n}\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a8e251313a5da1ad",
"is_error": false,
"tool_kind": "shell"
}cd /tmp/adeli-sdk-main && head -120 docs/client.md; echo "=== PKG ==="; cat package.json
Failed/bin/bash: line 1: cd: /tmp/adeli-sdk-main: No such file or directory
/bin/bash: line 1: cd: /tmp/adeli-sdk-main: No such file or directory === PKG === cat: package.json: No such file or directory Command exited with code 1
Recorded tool call
{
"type": "tool_call",
"seq": 38,
"ts": "2026-11-18T20:10:33.939Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && head -120 docs/client.md; echo \"=== PKG ===\"; cat package.json"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b09bc5a6ebfce69",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 39,
"ts": "2026-11-18T20:10:33.939Z",
"turn": 1,
"output": {
"content": [
{
"text": "/bin/bash: line 1: cd: /tmp/adeli-sdk-main: No such file or directory\n=== PKG ===\ncat: package.json: No such file or directory\n\n\nCommand exited with code 1",
"type": "text"
}
],
"details": {}
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9b09bc5a6ebfce69",
"is_error": true,
"tool_kind": "shell"
}›Thinking…
Parallel calls: second ran before extraction? They ran concurrently. Now re-read.
cd /tmp/adeli-sdk-main && sed -n 1,140p docs/client.md
# Client and request semantics
# Client and request semantics
`@adeli/sdk` supports Node.js 22+ and the server runtimes listed in the [README](../README.md); it throws in browsers. Construct `Adeli` only in a caller-invoked server function; module import does not read environment variables or make requests.
```ts
import { Adeli } from '@adeli/sdk';
const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });
```
`apiKey` wins over `ADELI_API_KEY`. `baseURL` is an origin (not an origin plus `/api/v1`); production origins must use HTTPS, while HTTP is reserved for explicit local development. `timeoutMs` is a total local deadline and `maxRetries` is opt-in. Timer values must be positive, finite, and no greater than `2_147_483_647` milliseconds (about 24.8 days); larger values are rejected before a request rather than being clamped by Node. The default retry count is zero. With opt-in retries, audited safe reads, and profile and publication creation with a stable idempotency key, qualify. Daily quota exhaustion, permission/billing/semantic conflicts, and other known non-transient failures are never retried. `listPosts` is conservatively excluded because an X read can be billed; `getXUsage` is a safe read of Adeli's stored usage ledger and does not call X itself, so it is eligible for the ordinary transient-read policy.
### Rotating keys with a resolver
`apiKey` also accepts a function, typed `ApiKeyResolver` (`() => string | Promise<string>`), for keys that come from a secret store or rotate:
```ts
import { Adeli, type ApiKeyResolver } from '@adeli/sdk';
const apiKey: ApiKeyResolver = async () => (await secrets.get('adeli-api-key')).value;
const client = new Adeli({ apiKey });
```
The SDK calls the resolver before every request attempt, retries included, and never caches the result, so a rotated key is used on the next attempt. Cache inside the resolver if your secret store is slow or rate-limited. A static string is validated when the client is constructed; a resolver is not called then, and each value it returns is validated before it is sent. An empty or blank string, a non-string, or a value that isn't a valid HTTP header throws `ConfigurationError` without echoing the value. A resolver that throws or rejects surfaces as `ConfigurationError` with the original error as `cause`. Neither is retried. The resolver runs inside the request's `timeoutMs` deadline and honours its `signal`. The value sent on an attempt is redacted from that attempt's error messages and details, and neither the resolver nor a key appears in a serialized client.
## Runtimes
The root entry needs only `fetch` and loads no Node builtin at import, so it runs on Node.js 22+, Vercel functions, and Cloudflare Workers. In a Worker without `nodejs_compat`, pass `apiKey` explicitly. The subpaths have narrower requirements:
- `@adeli/sdk/helpers`: `verifyWebhookSignature` uses `node:crypto`, available on Node.js and on Workers with `nodejs_compat`. On Vercel, serve webhook routes from the default Node.js runtime, not `runtime = 'edge'`.
- `@adeli/sdk/uploads`: `fileFromPath` and `blobFromPath` read a local file and work on Node.js only; they load `node:fs` when called, not at import. Passing any other `Blob` or `File` as post media works everywhere.
## Requests and responses
Resource methods use named `{ path, query, body }` arguments. Paths and query values are encoded by the transport. The SDK preserves the wire body: provider-specific casing such as `contentType` and `content_type`, `null`, privacy/visibility, warnings, and partial records remain unchanged. Every successful call returns `{ data, status, headers }`; `202`, `207`, and `204` are valid success statuses (`204` has `data: undefined`). Collection `status: partial` is still a successful response and contains usable records plus per-account errors.
Most operations require a profile or connected account scope. Organization-wide account listing is distinct from profile-scoped listing. Permissions/capabilities can be partial or nullable; inspect `missingPermissions`, `missingResources`, `capabilities`, and reconnect guidance rather than assuming a connected account can perform every operation. Public connection starts the typed flow but does not replace Facebook or Meta Ads Page selection or WhatsApp dashboard Embedded Signup. `client.ads` operations take a Meta Ads account (`platform: 'meta_ads'`), which is connected separately from the profile's Facebook account; a Facebook `accountId` returns `account_not_found`.
## Polling and comment iteration
Polling helpers are explicit bounded workflows: pass both a positive `intervalMs` and positive total `timeoutMs` (each no greater than `2_147_483_647` milliseconds), and optionally an `AbortSignal`. `waitForConnection`, `waitForInstagramPost`, `waitForTikTokPost`, `waitForFacebookPost`, `waitForYouTubeVideo`, and `waitForPublication` return the terminal API response, including provider failure states; they throw only for local timeout, cancellation, or an unfamiliar provider status. Facebook video `READY`/`ERROR` is separate from a connection's `pending_page_selection` dashboard handoff.
```ts
import { waitForYouTubeVideo } from '@adeli/sdk/helpers';
const status = await waitForYouTubeVideo(
client,
{ query: { accountId, videoId } },
{ intervalMs: 2_000, timeoutMs: 300_000, signal },
);
if (status.data.status === 'failed') throw new Error(status.data.failureReason ?? 'YouTube processing failed');
```
`iterateCommentPages` and `iterateComments` support TikTok and YouTube only. They accept `maxPages` (default `100`, always finite), optional total `timeoutMs` no greater than `2_147_483_647` milliseconds, and optional `signal`; they stop on no cursor, an empty/repeated cursor, or the page limit.
```ts
import { iterateCommentPages } from '@adeli/sdk/helpers';
for await (const page of iterateCommentPages(
client,
{ query: { platform: 'youtube', accountId } },
{ maxPages: 100, timeoutMs: 60_000, signal },
)) {
for (const comment of page.data.comments) console.log(comment.id);
// page.data.complete/syncedAt describe cache freshness, not pagination.
}
```
The iterator pins the first authoritative `postId` when the initial query omitted one and preserves page cache metadata such as `complete`/`syncedAt`; that metadata describes freshness/completeness of the returned page, not whether `nextCursor` exists.
`iterateConversationPages` and `iterateConversation` read one direct-message conversation: `accountId` and a message's `conversationKey` are required, and `limit` (1–100, default 50) and a starting `cursor` are optional. Pages come newest first, following `nextCursor` toward older messages; within a page messages are oldest first, as the API returns them, while `iterateConversation` yields each message newest first. They take the same `maxPages`, `timeoutMs`, and `signal` options and stop on a null, empty, or repeated cursor, or the page limit. A page whose messages belong to another account or conversation throws `MalformedResponseError`.
```ts
import { iterateConversation } from '@adeli/sdk/helpers';
const recent = [];
for await (const message of iterateConversation(client, { query: { accountId, conversationKey } }, { maxPages: 2 })) recent.push(message);
```
## Deadlines, cancellation, and errors
Pass an `AbortSignal` and/or per-call `timeoutMs` in the second argument. Cancellation stops this client request; it cannot undo work already accepted by Adeli. Polling helpers have a separate total deadline and never fetch a returned OAuth/status URL directly. Treat an aborted write as an ambiguous remote outcome and inspect the provider before resubmitting.
Catch `AdeliApiError` for an HTTP/API response. Its `status`, `code`, `details`, and `headers` are preserved; subclasses include `AuthenticationError`, `ValidationError`, `PermissionRequiredError`, and `RateLimitError`. `ConfigurationError`, `NetworkError`, `TimeoutError`, `CancellationError`, and `MalformedResponseError` represent local/client failures. Do not log API keys, OAuth URLs, media, message bodies, or provider payloads by default.
Error `details` remain `unknown`: validation arrays and provider-specific objects are not interchangeable. Use the exported `isPermissionRequiredDetails(error.details)` guard before reading known permission fields. It accepts sparse reconnect guidance, validates known fields, and leaves unknown extensions untouched. A false result does not invalidate the API error. Even recognized `reconnect.href` values are advisory data, not URLs the SDK will automatically fetch; restart authorization through the typed connection methods with explicit scope.
## Scope and safety
Profile and publication creation accept an optional idempotency key. Ad-account and campaign creation require keys and do not auto-retry. `createPost` has no idempotency guarantee; use `createPublication` with a key when a publish must be safe to repeat. The X usage response is a stored Adeli ledger: `totalCostMicros` and each `operations[].costMicros` are millionths of a US dollar. Preserve these integer values precisely; the SDK does not implicitly convert or round them to dollars. Actual X post/analytics provider calls can incur charges; Ads and destructive calls require separate approval and cleanup planning. The SDK does not claim to enforce every evolving provider-side semantic rule; the API remains authoritative.
## Ads on Meta and TikTok
`client.ads` serves Meta Ads, TikTok Ads and LinkedIn Ads. Pass the ads connection's `accountId` (a Meta Ads, `tiktok_ads` or `linkedin_ads` account); with only `profileId`, a profile holding more than one network answers `400 ambiguous_account` unless the query also names `platform`. Each response reports its `platform`. TikTok advertiser ids are digits only, and TikTok ad groups arrive under the tree's `adSets`. `createCampaign` takes a Meta body (with `objective`: a full campaign with budget, schedule, bid, targeting and a new image, video or carousel creative, or a boosted Page or Instagram post, optionally inside an existing campaign or ad set, and `validateOnly: true` for a dry run; without `objective`: a Page-post boost) or the TikTok body (video creative, targeting, identity); every Meta object is created paused, TikTok objects are created disabled, and `setAdStatus` needs `level` for TikTok. On Meta, `updateAdGroup` changes an ad set's name, budget, bid, dates or targeting, `updateCampaign` a campaign's name, CBO budget, bid strategy or spend cap, `deleteAdGroup` and `deleteAd` delete one ad set or ad, `listAdTargeting` searches interests, behaviors, demographics, locations and languages, `estimateAdReach` sizes an audience, `listAdInstagramAccounts` lists the Instagram accounts an ad can run as, and `getAdInsights` takes `breakdown`, `attributionWindows` and `resultActionType` and returns actions, values, ROAS and cost per result. `listAdIdentities` and `createAdIdentity` are TikTok-only; Meta-only operations on a TikTok account, and the reverse, answer `400 unsupported_for_platform`. On LinkedIn, `campaigns` are campaign groups, `adSets` are campaigns and `ads` are creatives; `createCampaign` takes the LinkedIn body (a `postUrn` by the ad account's Page, goal, budget, targeting URNs, `politicalIntent: 'NOT_POLITICAL'`) and creates every object as a draft; `setAdStatus` needs `level`, and activating the campaign group activates its campaign and ad; `getAdInsights` takes a professional-demographic `breakdown`; `updateAdGroup` and `listAdTargeting` work for LinkedIn too. A member whose role on the ad account is Viewer gets `403 ad_account_read_only` on writes.
## Publish to several accounts
`client.publications.createPublication` publishes one post to up to 20 connected accounts. Shared `content` and `media` go to every target in `platforms`. A target's own `content`, `media`, and `options` (that platform's `createPost` fields, such as TikTok's `music_usage_confirmed` or YouTube's `privacy_status`) override them. Adeli validates every target as `createPost` would before anything is written, so one invalid target rejects the whole request with `400`. The `202` response is the publication, which then publishes in the background.
```ts
import { waitForPublication } from '@adeli/sdk/helpers';
import { fileFromPath } from '@adeli/sdk/uploads';
const created = await client.publications.createPublication({ body: {
content: 'Launch day',
media: [await fileFromPath('./launch.mp4', { contentType: 'video/mp4' })],
platforms: [
{ platform: 'instagram', accountId: instagramId, kind: 'reel' },
{ platform: 'tiktok', accountId: tiktokId, options: { music_usage_confirmed: true } },
{ platform: 'youtube', accountId: youtubeId, options: { privacy_status: 'private', made_for_kids: false } },
],
} }, { idempotencyKey: launchId });
const done = await waitForPublication(
client,
{ path: { publicationId: created.data.id } },
{ intervalMs: 3_000, timeoutMs: 600_000, onProgress: (p) => console.log(p.progress) },
);
if (done.data.status !== 'published') await client.publications.retryPublication({ path: { publicationId: done.data.id } });
```
A publication is `queued` or `processing` until it is `published` (every target succeeded), `partial`, or `failed`. `waitForPublication` returns that terminal response rather than throwing, and calls `onProgress` with every snapshot. Each target reports its own `status`, `attempts`, `result` (that platform's `createPost` response), and `error`. A target in `outcome_unknown` may already be live, so `retryPublication` never re-runs it. `retryPublication` re-runs only `failed` targets and answers `409` while the publication is running or when nothing failed. Stopping a wait does not stop the publication.
A shared `Blob`/`File` is uploaded once, with `createMediaUploads({ platforms })` naming every platform that uses it. A file in a target's own `media` or `options` is uploaded for that platform only. With an `idempotencyKey`, the same key and body return the original publication with `200`, and a different body answers `409 idempotency_conflict`. Files are uploaded again on every call, so a repeated file-backed create produces a different body. To repeat one safely, stage the files yourself with `createMediaUploads` and pass their `upload_id`s.
### Scheduling and drafts
```ts
const scheduled = await client.publications.createPublication({ body: {
content: 'Launch day',
platforms: [{ platform: 'instagram', accountId: instagramId, media: [{ upload_id: stagedImageId }] }],
scheduledFor: '2026-11-13T07:30:00-05:00',
timeZone: 'America/New_York',
} });
const upcoming = await client.publications.listPublications({ query: { status: 'scheduled', profileId } });
await client.publications.updatePublication({ path: { publicationId: scheduled.data.id }, body: { scheduledFor: '2026-11-14T08:00:00-05:00' } });
await client.publications.publishPublication({ path: { publicationId: scheduled.data.id } });
```
With `scheduledFor` (ISO 8601 with an offset, one minute to 365 days ahead) a publication is stored as `scheduled` and answered with `201`; Adeli publishes it within about a minute of that time. `draft: true` stores it as a `draft` instead. `listPublications` lists a profile's publications, soonest first for `status: 'scheduled'`, with `nextCursor` for the next page. `updatePublication` reschedules (a draft becomes scheduled) or replaces the post, `publishPublication` starts it now, and `cancelPublication` cancels it (`canceled`); all three answer `409` once it has started. None of them is retried automatically. Staged media is kept until the publication is published or canceled; `{ url }` media is fetched at publish time. `listPosts` lists each scheduled post first with `status: 'scheduled'` and `scheduledFor`. `waitForPublication` keeps waiting through `scheduled` and `draft`, and stops on `canceled`.
Recorded tool call
{
"type": "tool_call",
"seq": 43,
"ts": "2026-11-18T20:10:36.029Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && sed -n 1,140p docs/client.md"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-861c38956de48356",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 45,
"ts": "2026-11-18T20:10:36.029Z",
"turn": 1,
"output": {
"content": [
{
"text": "# Client and request semantics\n\n`@adeli/sdk` supports Node.js 22+ and the server runtimes listed in the [README](../README.md); it throws in browsers. Construct `Adeli` only in a caller-invoked server function; module import does not read environment variables or make requests.\n\n```ts\nimport { Adeli } from '@adeli/sdk';\nconst client = new Adeli({ apiKey: process.env.ADELI_API_KEY });\n```\n\n`apiKey` wins over `ADELI_API_KEY`. `baseURL` is an origin (not an origin plus `/api/v1`); production origins must use HTTPS, while HTTP is reserved for explicit local development. `timeoutMs` is a total local deadline and `maxRetries` is opt-in. Timer values must be positive, finite, and no greater than `2_147_483_647` milliseconds (about 24.8 days); larger values are rejected before a request rather than being clamped by Node. The default retry count is zero. With opt-in retries, audited safe reads, and profile and publication creation with a stable idempotency key, qualify. Daily quota exhaustion, permission/billing/semantic conflicts, and other known non-transient failures are never retried. `listPosts` is conservatively excluded because an X read can be billed; `getXUsage` is a safe read of Adeli's stored usage ledger and does not call X itself, so it is eligible for the ordinary transient-read policy.\n\n### Rotating keys with a resolver\n\n`apiKey` also accepts a function, typed `ApiKeyResolver` (`() => string | Promise<string>`), for keys that come from a secret store or rotate:\n\n```ts\nimport { Adeli, type ApiKeyResolver } from '@adeli/sdk';\nconst apiKey: ApiKeyResolver = async () => (await secrets.get('adeli-api-key')).value;\nconst client = new Adeli({ apiKey });\n```\n\nThe SDK calls the resolver before every request attempt, retries included, and never caches the result, so a rotated key is used on the next attempt. Cache inside the resolver if your secret store is slow or rate-limited. A static string is validated when the client is constructed; a resolver is not called then, and each value it returns is validated before it is sent. An empty or blank string, a non-string, or a value that isn't a valid HTTP header throws `ConfigurationError` without echoing the value. A resolver that throws or rejects surfaces as `ConfigurationError` with the original error as `cause`. Neither is retried. The resolver runs inside the request's `timeoutMs` deadline and honours its `signal`. The value sent on an attempt is redacted from that attempt's error messages and details, and neither the resolver nor a key appears in a serialized client.\n\n## Runtimes\n\nThe root entry needs only `fetch` and loads no Node builtin at import, so it runs on Node.js 22+, Vercel functions, and Cloudflare Workers. In a Worker without `nodejs_compat`, pass `apiKey` explicitly. The subpaths have narrower requirements:\n\n- `@adeli/sdk/helpers`: `verifyWebhookSignature` uses `node:crypto`, available on Node.js and on Workers with `nodejs_compat`. On Vercel, serve webhook routes from the default Node.js runtime, not `runtime = 'edge'`.\n- `@adeli/sdk/uploads`: `fileFromPath` and `blobFromPath` read a local file and work on Node.js only; they load `node:fs` when called, not at import. Passing any other `Blob` or `File` as post media works everywhere.\n\n## Requests and responses\n\nResource methods use named `{ path, query, body }` arguments. Paths and query values are encoded by the transport. The SDK preserves the wire body: provider-specific casing such as `contentType` and `content_type`, `null`, privacy/visibility, warnings, and partial records remain unchanged. Every successful call returns `{ data, status, headers }`; `202`, `207`, and `204` are valid success statuses (`204` has `data: undefined`). Collection `status: partial` is still a successful response and contains usable records plus per-account errors.\n\nMost operations require a profile or connected account scope. Organization-wide account listing is distinct from profile-scoped listing. Permissions/capabilities can be partial or nullable; inspect `missingPermissions`, `missingResources`, `capabilities`, and reconnect guidance rather than assuming a connected account can perform every operation. Public connection starts the typed flow but does not replace Facebook or Meta Ads Page selection or WhatsApp dashboard Embedded Signup. `client.ads` operations take a Meta Ads account (`platform: 'meta_ads'`), which is connected separately from the profile's Facebook account; a Facebook `accountId` returns `account_not_found`.\n\n## Polling and comment iteration\n\nPolling helpers are explicit bounded workflows: pass both a positive `intervalMs` and positive total `timeoutMs` (each no greater than `2_147_483_647` milliseconds), and optionally an `AbortSignal`. `waitForConnection`, `waitForInstagramPost`, `waitForTikTokPost`, `waitForFacebookPost`, `waitForYouTubeVideo`, and `waitForPublication` return the terminal API response, including provider failure states; they throw only for local timeout, cancellation, or an unfamiliar provider status. Facebook video `READY`/`ERROR` is separate from a connection's `pending_page_selection` dashboard handoff.\n\n```ts\nimport { waitForYouTubeVideo } from '@adeli/sdk/helpers';\n\nconst status = await waitForYouTubeVideo(\n client,\n { query: { accountId, videoId } },\n { intervalMs: 2_000, timeoutMs: 300_000, signal },\n);\nif (status.data.status === 'failed') throw new Error(status.data.failureReason ?? 'YouTube processing failed');\n```\n\n`iterateCommentPages` and `iterateComments` support TikTok and YouTube only. They accept `maxPages` (default `100`, always finite), optional total `timeoutMs` no greater than `2_147_483_647` milliseconds, and optional `signal`; they stop on no cursor, an empty/repeated cursor, or the page limit.\n\n```ts\nimport { iterateCommentPages } from '@adeli/sdk/helpers';\n\nfor await (const page of iterateCommentPages(\n client,\n { query: { platform: 'youtube', accountId } },\n { maxPages: 100, timeoutMs: 60_000, signal },\n)) {\n for (const comment of page.data.comments) console.log(comment.id);\n // page.data.complete/syncedAt describe cache freshness, not pagination.\n}\n```\n\nThe iterator pins the first authoritative `postId` when the initial query omitted one and preserves page cache metadata such as `complete`/`syncedAt`; that metadata describes freshness/completeness of the returned page, not whether `nextCursor` exists.\n\n`iterateConversationPages` and `iterateConversation` read one direct-message conversation: `accountId` and a message's `conversationKey` are required, and `limit` (1–100, default 50) and a starting `cursor` are optional. Pages come newest first, following `nextCursor` toward older messages; within a page messages are oldest first, as the API returns them, while `iterateConversation` yields each message newest first. They take the same `maxPages`, `timeoutMs`, and `signal` options and stop on a null, empty, or repeated cursor, or the page limit. A page whose messages belong to another account or conversation throws `MalformedResponseError`.\n\n```ts\nimport { iterateConversation } from '@adeli/sdk/helpers';\n\nconst recent = [];\nfor await (const message of iterateConversation(client, { query: { accountId, conversationKey } }, { maxPages: 2 })) recent.push(message);\n```\n\n## Deadlines, cancellation, and errors\n\nPass an `AbortSignal` and/or per-call `timeoutMs` in the second argument. Cancellation stops this client request; it cannot undo work already accepted by Adeli. Polling helpers have a separate total deadline and never fetch a returned OAuth/status URL directly. Treat an aborted write as an ambiguous remote outcome and inspect the provider before resubmitting.\n\nCatch `AdeliApiError` for an HTTP/API response. Its `status`, `code`, `details`, and `headers` are preserved; subclasses include `AuthenticationError`, `ValidationError`, `PermissionRequiredError`, and `RateLimitError`. `ConfigurationError`, `NetworkError`, `TimeoutError`, `CancellationError`, and `MalformedResponseError` represent local/client failures. Do not log API keys, OAuth URLs, media, message bodies, or provider payloads by default.\n\nError `details` remain `unknown`: validation arrays and provider-specific objects are not interchangeable. Use the exported `isPermissionRequiredDetails(error.details)` guard before reading known permission fields. It accepts sparse reconnect guidance, validates known fields, and leaves unknown extensions untouched. A false result does not invalidate the API error. Even recognized `reconnect.href` values are advisory data, not URLs the SDK will automatically fetch; restart authorization through the typed connection methods with explicit scope.\n\n## Scope and safety\n\nProfile and publication creation accept an optional idempotency key. Ad-account and campaign creation require keys and do not auto-retry. `createPost` has no idempotency guarantee; use `createPublication` with a key when a publish must be safe to repeat. The X usage response is a stored Adeli ledger: `totalCostMicros` and each `operations[].costMicros` are millionths of a US dollar. Preserve these integer values precisely; the SDK does not implicitly convert or round them to dollars. Actual X post/analytics provider calls can incur charges; Ads and destructive calls require separate approval and cleanup planning. The SDK does not claim to enforce every evolving provider-side semantic rule; the API remains authoritative.\n\n## Ads on Meta and TikTok\n\n`client.ads` serves Meta Ads, TikTok Ads and LinkedIn Ads. Pass the ads connection's `accountId` (a Meta Ads, `tiktok_ads` or `linkedin_ads` account); with only `profileId`, a profile holding more than one network answers `400 ambiguous_account` unless the query also names `platform`. Each response reports its `platform`. TikTok advertiser ids are digits only, and TikTok ad groups arrive under the tree's `adSets`. `createCampaign` takes a Meta body (with `objective`: a full campaign with budget, schedule, bid, targeting and a new image, video or carousel creative, or a boosted Page or Instagram post, optionally inside an existing campaign or ad set, and `validateOnly: true` for a dry run; without `objective`: a Page-post boost) or the TikTok body (video creative, targeting, identity); every Meta object is created paused, TikTok objects are created disabled, and `setAdStatus` needs `level` for TikTok. On Meta, `updateAdGroup` changes an ad set's name, budget, bid, dates or targeting, `updateCampaign` a campaign's name, CBO budget, bid strategy or spend cap, `deleteAdGroup` and `deleteAd` delete one ad set or ad, `listAdTargeting` searches interests, behaviors, demographics, locations and languages, `estimateAdReach` sizes an audience, `listAdInstagramAccounts` lists the Instagram accounts an ad can run as, and `getAdInsights` takes `breakdown`, `attributionWindows` and `resultActionType` and returns actions, values, ROAS and cost per result. `listAdIdentities` and `createAdIdentity` are TikTok-only; Meta-only operations on a TikTok account, and the reverse, answer `400 unsupported_for_platform`. On LinkedIn, `campaigns` are campaign groups, `adSets` are campaigns and `ads` are creatives; `createCampaign` takes the LinkedIn body (a `postUrn` by the ad account's Page, goal, budget, targeting URNs, `politicalIntent: 'NOT_POLITICAL'`) and creates every object as a draft; `setAdStatus` needs `level`, and activating the campaign group activates its campaign and ad; `getAdInsights` takes a professional-demographic `breakdown`; `updateAdGroup` and `listAdTargeting` work for LinkedIn too. A member whose role on the ad account is Viewer gets `403 ad_account_read_only` on writes.\n\n## Publish to several accounts\n\n`client.publications.createPublication` publishes one post to up to 20 connected accounts. Shared `content` and `media` go to every target in `platforms`. A target's own `content`, `media`, and `options` (that platform's `createPost` fields, such as TikTok's `music_usage_confirmed` or YouTube's `privacy_status`) override them. Adeli validates every target as `createPost` would before anything is written, so one invalid target rejects the whole request with `400`. The `202` response is the publication, which then publishes in the background.\n\n```ts\nimport { waitForPublication } from '@adeli/sdk/helpers';\nimport { fileFromPath } from '@adeli/sdk/uploads';\n\nconst created = await client.publications.createPublication({ body: {\n content: 'Launch day',\n media: [await fileFromPath('./launch.mp4', { contentType: 'video/mp4' })],\n platforms: [\n { platform: 'instagram', accountId: instagramId, kind: 'reel' },\n { platform: 'tiktok', accountId: tiktokId, options: { music_usage_confirmed: true } },\n { platform: 'youtube', accountId: youtubeId, options: { privacy_status: 'private', made_for_kids: false } },\n ],\n} }, { idempotencyKey: launchId });\n\nconst done = await waitForPublication(\n client,\n { path: { publicationId: created.data.id } },\n { intervalMs: 3_000, timeoutMs: 600_000, onProgress: (p) => console.log(p.progress) },\n);\nif (done.data.status !== 'published') await client.publications.retryPublication({ path: { publicationId: done.data.id } });\n```\n\nA publication is `queued` or `processing` until it is `published` (every target succeeded), `partial`, or `failed`. `waitForPublication` returns that terminal response rather than throwing, and calls `onProgress` with every snapshot. Each target reports its own `status`, `attempts`, `result` (that platform's `createPost` response), and `error`. A target in `outcome_unknown` may already be live, so `retryPublication` never re-runs it. `retryPublication` re-runs only `failed` targets and answers `409` while the publication is running or when nothing failed. Stopping a wait does not stop the publication.\n\nA shared `Blob`/`File` is uploaded once, with `createMediaUploads({ platforms })` naming every platform that uses it. A file in a target's own `media` or `options` is uploaded for that platform only. With an `idempotencyKey`, the same key and body return the original publication with `200`, and a different body answers `409 idempotency_conflict`. Files are uploaded again on every call, so a repeated file-backed create produces a different body. To repeat one safely, stage the files yourself with `createMediaUploads` and pass their `upload_id`s.\n\n### Scheduling and drafts\n\n```ts\nconst scheduled = await client.publications.createPublication({ body: {\n content: 'Launch day',\n platforms: [{ platform: 'instagram', accountId: instagramId, media: [{ upload_id: stagedImageId }] }],\n scheduledFor: '2026-11-13T07:30:00-05:00',\n timeZone: 'America/New_York',\n} });\n\nconst upcoming = await client.publications.listPublications({ query: { status: 'scheduled', profileId } });\nawait client.publications.updatePublication({ path: { publicationId: scheduled.data.id }, body: { scheduledFor: '2026-11-14T08:00:00-05:00' } });\nawait client.publications.publishPublication({ path: { publicationId: scheduled.data.id } });\n```\n\nWith `scheduledFor` (ISO 8601 with an offset, one minute to 365 days ahead) a publication is stored as `scheduled` and answered with `201`; Adeli publishes it within about a minute of that time. `draft: true` stores it as a `draft` instead. `listPublications` lists a profile's publications, soonest first for `status: 'scheduled'`, with `nextCursor` for the next page. `updatePublication` reschedules (a draft becomes scheduled) or replaces the post, `publishPublication` starts it now, and `cancelPublication` cancels it (`canceled`); all three answer `409` once it has started. None of them is retried automatically. Staged media is kept until the publication is published or canceled; `{ url }` media is fetched at publish time. `listPosts` lists each scheduled post first with `status: 'scheduled'` and `scheduledFor`. `waitForPublication` keeps waiting through `scheduled` and `draft`, and stops on `canceled`.\n\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-861c38956de48356",
"is_error": false,
"tool_kind": "shell"
}cd /tmp/adeli-sdk-main && cat package.json && ls src src/core && grep -n "getMe\|baseUrl\|ADELI_API_KEY\|throw" src/client.ts | head -40
{
{
"name": "@adeli/sdk",
"version": "0.7.0",
"description": "Official TypeScript SDK for Adeli, the unified social media and ads API",
"keywords": [
"adeli",
"sdk",
"social-media",
"instagram",
"tiktok",
"youtube",
"facebook",
"x",
"twitter",
"bluesky",
"meta-ads",
"tiktok-ads",
"publishing",
"typescript"
],
"homepage": "https://github.com/kingscrosslabs/adeli-sdk#readme",
"bugs": {
"url": "https://github.com/kingscrosslabs/adeli-sdk/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/kingscrosslabs/adeli-sdk.git"
},
"license": "MIT",
"type": "module",
"engines": {
"node": ">=22"
},
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./helpers": {
"import": {
"types": "./dist/helpers/index.d.ts",
"default": "./dist/helpers/index.js"
},
"require": {
"types": "./dist/helpers/index.d.cts",
"default": "./dist/helpers/index.cjs"
}
},
"./uploads": {
"import": {
"types": "./dist/uploads.d.ts",
"default": "./dist/uploads.js"
},
"require": {
"types": "./dist/uploads.d.cts",
"default": "./dist/uploads.cjs"
}
}
},
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"openapi/*.json",
"README.md",
"docs/*.md"
],
"sideEffects": false,
"scripts": {
"sync:openapi": "tsx scripts/sync-openapi.ts",
"generate": "tsx scripts/generate.ts",
"generate:api-reference": "tsx scripts/generate-api-reference.ts",
"check:api-reference": "tsx scripts/check-api-reference.ts",
"check:generated": "tsx scripts/check-generated.ts && npm run check:api-reference",
"check:contract": "tsx scripts/check-contract.ts",
"lint": "eslint . --cache --cache-location .eslintcache",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"build": "tsup",
"check:package": "npm run build && npm pack --dry-run && tsx scripts/check-package.ts",
"test:package": "node test/package-smoke.mjs",
"typecheck:examples": "tsx scripts/typecheck-examples.ts",
"release:check": "tsx scripts/check-package.ts --release"
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.5",
"@changesets/cli": "3.0.3",
"@redocly/ajv": "8.11.2",
"@types/node": "22.20.5",
"@typescript-eslint/eslint-plugin": "8.72.0",
"@typescript-eslint/parser": "8.72.0",
"eslint": "9.39.5",
"openapi-typescript": "7.9.1",
"publint": "0.3.25",
"tsup": "8.5.0",
"tsx": "4.19.4",
"typescript": "5.8.3",
"vitest": "5.0.5"
}
}
src:
client.ts
core
generated
helpers
index.ts
operations.ts
resources
uploads.ts
src/core:
config.ts
duration.ts
errors.ts
generated.ts
retry.ts
transport.ts
types.ts
57: getMe(args: { readonly query?: GetMeQuery } = {}, options: RequestOptions = {}): Promise<ApiResponse<Identity>> {
58: return this.transport.request({ operation: operations.getMe, query: args.query, signal: options.signal, timeoutMs: options.timeoutMs });
Recorded tool call
{
"type": "tool_call",
"seq": 44,
"ts": "2026-11-18T20:10:36.029Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && cat package.json && ls src src/core && grep -n \"getMe\\|baseUrl\\|ADELI_API_KEY\\|throw\" src/client.ts | head -40"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-acc4cd53436eadf4",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 46,
"ts": "2026-11-18T20:10:36.029Z",
"turn": 1,
"output": {
"content": [
{
"text": "{\n \"name\": \"@adeli/sdk\",\n \"version\": \"0.7.0\",\n \"description\": \"Official TypeScript SDK for Adeli, the unified social media and ads API\",\n \"keywords\": [\n \"adeli\",\n \"sdk\",\n \"social-media\",\n \"instagram\",\n \"tiktok\",\n \"youtube\",\n \"facebook\",\n \"x\",\n \"twitter\",\n \"bluesky\",\n \"meta-ads\",\n \"tiktok-ads\",\n \"publishing\",\n \"typescript\"\n ],\n \"homepage\": \"https://github.com/kingscrosslabs/adeli-sdk#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/kingscrosslabs/adeli-sdk/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/kingscrosslabs/adeli-sdk.git\"\n },\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=22\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n },\n \"./helpers\": {\n \"import\": {\n \"types\": \"./dist/helpers/index.d.ts\",\n \"default\": \"./dist/helpers/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/helpers/index.d.cts\",\n \"default\": \"./dist/helpers/index.cjs\"\n }\n },\n \"./uploads\": {\n \"import\": {\n \"types\": \"./dist/uploads.d.ts\",\n \"default\": \"./dist/uploads.js\"\n },\n \"require\": {\n \"types\": \"./dist/uploads.d.cts\",\n \"default\": \"./dist/uploads.cjs\"\n }\n }\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"dist\",\n \"openapi/*.json\",\n \"README.md\",\n \"docs/*.md\"\n ],\n \"sideEffects\": false,\n \"scripts\": {\n \"sync:openapi\": \"tsx scripts/sync-openapi.ts\",\n \"generate\": \"tsx scripts/generate.ts\",\n \"generate:api-reference\": \"tsx scripts/generate-api-reference.ts\",\n \"check:api-reference\": \"tsx scripts/check-api-reference.ts\",\n \"check:generated\": \"tsx scripts/check-generated.ts && npm run check:api-reference\",\n \"check:contract\": \"tsx scripts/check-contract.ts\",\n \"lint\": \"eslint . --cache --cache-location .eslintcache\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"build\": \"tsup\",\n \"check:package\": \"npm run build && npm pack --dry-run && tsx scripts/check-package.ts\",\n \"test:package\": \"node test/package-smoke.mjs\",\n \"typecheck:examples\": \"tsx scripts/typecheck-examples.ts\",\n \"release:check\": \"tsx scripts/check-package.ts --release\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"0.18.5\",\n \"@changesets/cli\": \"3.0.3\",\n \"@redocly/ajv\": \"8.11.2\",\n \"@types/node\": \"22.20.5\",\n \"@typescript-eslint/eslint-plugin\": \"8.72.0\",\n \"@typescript-eslint/parser\": \"8.72.0\",\n \"eslint\": \"9.39.5\",\n \"openapi-typescript\": \"7.9.1\",\n \"publint\": \"0.3.25\",\n \"tsup\": \"8.5.0\",\n \"tsx\": \"4.19.4\",\n \"typescript\": \"5.8.3\",\n \"vitest\": \"5.0.5\"\n }\n}\nsrc:\nclient.ts\ncore\ngenerated\nhelpers\nindex.ts\noperations.ts\nresources\nuploads.ts\n\nsrc/core:\nconfig.ts\nduration.ts\nerrors.ts\ngenerated.ts\nretry.ts\ntransport.ts\ntypes.ts\n57: getMe(args: { readonly query?: GetMeQuery } = {}, options: RequestOptions = {}): Promise<ApiResponse<Identity>> {\n58: return this.transport.request({ operation: operations.getMe, query: args.query, signal: options.signal, timeoutMs: options.timeoutMs });\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-acc4cd53436eadf4",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Good. Now build the example in /sandbox/repo. Need node version >=22. Check node.
Also check whether an API key exists in env (probably not) — the example will be blocked at runtime without a key, but I can still write and type-check it. Let's check env vars and whether the API is reachable without a key (401). I could also test the SDK against the hosted API with a bogus key to show error handling — that's a light request, fine.
Let me check node/npm.
node -v; npm -v; env | grep -i adeli; echo "keys:none"
v22.23.4
v22.23.4 10.9.8 keys:none
Recorded tool call
{
"type": "tool_call",
"seq": 49,
"ts": "2026-11-18T20:10:37.794Z",
"name": "bash",
"turn": 1,
"input": {
"command": "node -v; npm -v; env | grep -i adeli; echo \"keys:none\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-825d9938e490a8a3",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 51,
"ts": "2026-11-18T20:10:37.794Z",
"turn": 1,
"output": {
"content": [
{
"text": "v22.23.4\n10.9.8\nkeys:none\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-825d9938e490a8a3",
"is_error": false,
"tool_kind": "shell"
}timeout 20 curl -s -o /dev/null -w "%{http_code}\n" https://api.tryadeli.com/api/v1/me; timeout 20 curl -s https://www.tryadeli.com/docs/api -o /dev/null -w "%{http_code}\n"000
000 200
Recorded tool call
{
"type": "tool_call",
"seq": 50,
"ts": "2026-11-18T20:10:37.794Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s -o /dev/null -w \"%{http_code}\\n\" https://api.tryadeli.com/api/v1/me; timeout 20 curl -s https://www.tryadeli.com/docs/api -o /dev/null -w \"%{http_code}\\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-88e16292320a713b",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 52,
"ts": "2026-11-18T20:10:39.212Z",
"turn": 1,
"output": {
"content": [
{
"text": "000\n200\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-88e16292320a713b",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
api.tryadeli.com not resolving (000). Find actual base URL from SDK source (config.ts).
cd /tmp/adeli-sdk-main && grep -n "https\|baseURL\|DEFAULT" src/core/config.ts | head -30
7:export interface ResolvedConfig { readonly apiKey: ApiKeySource; readonly baseURL: string; /** Undefined means use the operation's default, then 60 seconds. *
7:export interface ResolvedConfig { readonly apiKey: ApiKeySource; readonly baseURL: string; /** Undefined means use the operation's default, then 60 seconds. */ readonly timeoutMs: number | undefined; readonly maxRetries: number; readonly fetch: Fetch; }
8:const DEFAULT_BASE_URL = 'https://app.tryadeli.com';
20: const baseURL = validateBaseURL(options.baseURL ?? DEFAULT_BASE_URL);
27: return { apiKey, baseURL, timeoutMs, maxRetries, fetch: fetchImpl };
51: try { url = new URL(input); } catch { throw new ConfigurationError('baseURL must be an absolute URL origin'); }
52: if (!['http:', 'https:'].includes(url.protocol)) throw new ConfigurationError('baseURL must use http or https');
53: if (url.protocol !== 'https:' && !LOCAL_HOSTS.has(url.hostname)) throw new ConfigurationError('HTTPS is required except for local development');
54: if (url.username || url.password || url.search || url.hash || (url.pathname !== '/' && url.pathname !== '')) throw new ConfigurationError('baseURL must be an origin without a path, query, fragment, or credentials');
Recorded tool call
{
"type": "tool_call",
"seq": 55,
"ts": "2026-11-18T20:10:40.185Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && grep -n \"https\\|baseURL\\|DEFAULT\" src/core/config.ts | head -30"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-917d89c7f068bc80",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 56,
"ts": "2026-11-18T20:10:40.185Z",
"turn": 1,
"output": {
"content": [
{
"text": "7:export interface ResolvedConfig { readonly apiKey: ApiKeySource; readonly baseURL: string; /** Undefined means use the operation's default, then 60 seconds. */ readonly timeoutMs: number | undefined; readonly maxRetries: number; readonly fetch: Fetch; }\n8:const DEFAULT_BASE_URL = 'https://app.tryadeli.com';\n20: const baseURL = validateBaseURL(options.baseURL ?? DEFAULT_BASE_URL);\n27: return { apiKey, baseURL, timeoutMs, maxRetries, fetch: fetchImpl };\n51: try { url = new URL(input); } catch { throw new ConfigurationError('baseURL must be an absolute URL origin'); }\n52: if (!['http:', 'https:'].includes(url.protocol)) throw new ConfigurationError('baseURL must use http or https');\n53: if (url.protocol !== 'https:' && !LOCAL_HOSTS.has(url.hostname)) throw new ConfigurationError('HTTPS is required except for local development');\n54: if (url.username || url.password || url.search || url.hash || (url.pathname !== '/' && url.pathname !== '')) throw new ConfigurationError('baseURL must be an origin without a path, query, fragment, or credentials');\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-917d89c7f068bc80",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Base URL is app.tryadeli.com. Test reachability of an endpoint without key (expect 401).
Now build example in /sandbox/repo: npm install @adeli/sdk, typescript, write src example scripts: quickstart discovery + publish, plus a README. Keep it simple — maybe one example file: examples/adeli-quickstart.ts doing read-only discovery, and optionally a post. Then typecheck with tsc --noEmit and run without key to show graceful failure.
Let's do npm init + install.
timeout 20 curl -s -o /tmp/me.json -w "%{http_code}\n" https://app.tryadeli.com/api/v1/me; head -c 300 /tmp/me.json401
401
{"error":{"code":"unauthorized","message":"A valid Bearer API key is required"}}Recorded tool call
{
"type": "tool_call",
"seq": 59,
"ts": "2026-11-18T20:10:42.986Z",
"name": "bash",
"turn": 1,
"input": {
"command": "timeout 20 curl -s -o /tmp/me.json -w \"%{http_code}\\n\" https://app.tryadeli.com/api/v1/me; head -c 300 /tmp/me.json"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8f64aaef6e2c06bf",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 61,
"ts": "2026-11-18T20:10:42.986Z",
"turn": 1,
"output": {
"content": [
{
"text": "401\n{\"error\":{\"code\":\"unauthorized\",\"message\":\"A valid Bearer API key is required\"}}",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8f64aaef6e2c06bf",
"is_error": false,
"tool_kind": "shell"
}cd /sandbox/repo && npm init -y >/dev/null && timeout 180 npm install @adeli/sdk 2>&1 | tail -3 && timeout 180 npm install -D typescript @types/node tsx 2>&1 | tail -3
added 1 package, and audited 2 packages in 2s
added 1 package, and audited 2 packages in 2s found 0 vulnerabilities added 7 packages, and audited 9 packages in 6s found 0 vulnerabilities
Recorded tool call
{
"type": "tool_call",
"seq": 60,
"ts": "2026-11-18T20:10:42.986Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && npm init -y >/dev/null && timeout 180 npm install @adeli/sdk 2>&1 | tail -3 && timeout 180 npm install -D typescript @types/node tsx 2>&1 | tail -3"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-81efbf2498340962",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 62,
"ts": "2026-11-18T20:10:52.341Z",
"turn": 1,
"output": {
"content": [
{
"text": "added 1 package, and audited 2 packages in 2s\n\nfound 0 vulnerabilities\nadded 7 packages, and audited 9 packages in 6s\n\nfound 0 vulnerabilities\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-81efbf2498340962",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
API is reachable and returns 401 without key — good, confirms hosted product, no local stack.
Now write the example. Files:
- package.json tweaks (type module, scripts)
- tsconfig.json
- src/adeli-quickstart.ts — read-only discovery: getMe, listProfiles, listAccounts
- src/publish-post.ts — publish a text post to X (or chosen platform), guarded by env
- .env.example
- README.md with pricing notes
Keep simple: one quickstart file plus one publish file. Typecheck. Run quickstart without key → should throw ConfigurationError; handle gracefully with message.
Let me check the SDK types for createPost body and profiles/accounts to write correct code. Look at examples/publish-everywhere.ts and connect-account.ts.
cd /tmp/adeli-sdk-main && cat examples/publish-instagram.ts; echo ===; cat examples/partial-results.ts
import { Adeli, type CreatePostBody } from '@adeli/sdk';
import { Adeli, type CreatePostBody } from '@adeli/sdk';
export async function publishInstagramImage(input: { accountId: string; imageBase64: string }) {
const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });
const body: CreatePostBody = {
platform: 'instagram',
accountId: input.accountId,
caption: 'An explicitly requested example',
image: { contentType: 'image/jpeg', base64: input.imageBase64 },
};
return client.posts.createPost({ body });
}
export async function publishInstagramReel(input: { accountId: string; videoUrl: string }) {
const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });
const body: CreatePostBody = {
platform: 'instagram',
accountId: input.accountId,
reel: { url: input.videoUrl },
shareToFeed: true,
};
return client.posts.createPost({ body });
}
===
import { Adeli } from '@adeli/sdk';
/** Read a partial aggregate without hiding provider-specific failures. */
export async function listAccountsWithOutcomes() {
const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });
const response = await client.accounts.listAccounts();
return {
accounts: response.data.accounts,
errors: response.data.errors,
partial: response.data.status === 'partial',
};
}
Recorded tool call
{
"type": "tool_call",
"seq": 65,
"ts": "2026-11-18T20:10:55.021Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && cat examples/publish-instagram.ts; echo ===; cat examples/partial-results.ts"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ae19904df5e1532b",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 67,
"ts": "2026-11-18T20:10:55.021Z",
"turn": 1,
"output": {
"content": [
{
"text": "import { Adeli, type CreatePostBody } from '@adeli/sdk';\n\nexport async function publishInstagramImage(input: { accountId: string; imageBase64: string }) {\n const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });\n const body: CreatePostBody = {\n platform: 'instagram',\n accountId: input.accountId,\n caption: 'An explicitly requested example',\n image: { contentType: 'image/jpeg', base64: input.imageBase64 },\n };\n return client.posts.createPost({ body });\n}\n\nexport async function publishInstagramReel(input: { accountId: string; videoUrl: string }) {\n const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });\n const body: CreatePostBody = {\n platform: 'instagram',\n accountId: input.accountId,\n reel: { url: input.videoUrl },\n shareToFeed: true,\n };\n return client.posts.createPost({ body });\n}\n===\nimport { Adeli } from '@adeli/sdk';\n\n/** Read a partial aggregate without hiding provider-specific failures. */\nexport async function listAccountsWithOutcomes() {\n const client = new Adeli({ apiKey: process.env.ADELI_API_KEY });\n const response = await client.accounts.listAccounts();\n return {\n accounts: response.data.accounts,\n errors: response.data.errors,\n partial: response.data.status === 'partial',\n };\n}\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ae19904df5e1532b",
"is_error": false,
"tool_kind": "shell"
}cd /tmp/adeli-sdk-main && grep -n "listAccounts\|listProfiles\|Account =\|interface Profile\b" src/resources/*.ts | head -20; ls src/resources
src/resources/accounts.ts:15:export type Account = AccountSchema;
src/resources/accounts.ts:15:export type Account = AccountSchema;
src/resources/accounts.ts:20:export type AccountsAggregateResponse = OperationSuccessBody<'listAccounts'>;
src/resources/accounts.ts:22:export type RefreshAccount = RefreshAccountsResponse extends { accounts: readonly (infer A)[] } ? A : never;
src/resources/accounts.ts:28:export type ListAccountsQuery = OperationQuery<'listAccounts'>;
src/resources/accounts.ts:34: listAccounts(args: { readonly query?: ListAccountsQuery } = {}, options: RequestOptions = {}): Promise<ApiResponse<AccountsAggregateResponse>> {
src/resources/accounts.ts:35: return this.transport.request({ operation: operations.listAccounts, query: args.query, signal: options.signal, timeoutMs: options.timeoutMs });
src/resources/media-staging.ts:39: const response = await transport.request<SuccessBody<'listAccounts'>>({ operation: operations.listAccounts, query: { accountId }, signal: options.signal, timeoutMs: options.timeoutMs });
src/resources/profiles.ts:21:export type ListProfilesResponse = OperationSuccessBody<'listProfiles'>;
src/resources/profiles.ts:27: listProfiles(_args: EmptyArgs = {}, options: RequestOptions = {}): Promise<ApiResponse<ListProfilesResponse>> {
src/resources/profiles.ts:28: return this.transport.request({ operation: operations.listProfiles, signal: options.signal, timeoutMs: options.timeoutMs });
accounts.ts
ads.ts
analytics.ts
comments.ts
media-staging.ts
messages.ts
posts.ts
profiles.ts
publications.ts
usage.ts
webhooks.ts
Recorded tool call
{
"type": "tool_call",
"seq": 66,
"ts": "2026-11-18T20:10:55.021Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && grep -n \"listAccounts\\|listProfiles\\|Account =\\|interface Profile\\b\" src/resources/*.ts | head -20; ls src/resources"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8d91f627ef6c7e97",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 68,
"ts": "2026-11-18T20:10:55.021Z",
"turn": 1,
"output": {
"content": [
{
"text": "src/resources/accounts.ts:15:export type Account = AccountSchema;\nsrc/resources/accounts.ts:20:export type AccountsAggregateResponse = OperationSuccessBody<'listAccounts'>;\nsrc/resources/accounts.ts:22:export type RefreshAccount = RefreshAccountsResponse extends { accounts: readonly (infer A)[] } ? A : never;\nsrc/resources/accounts.ts:28:export type ListAccountsQuery = OperationQuery<'listAccounts'>;\nsrc/resources/accounts.ts:34: listAccounts(args: { readonly query?: ListAccountsQuery } = {}, options: RequestOptions = {}): Promise<ApiResponse<AccountsAggregateResponse>> {\nsrc/resources/accounts.ts:35: return this.transport.request({ operation: operations.listAccounts, query: args.query, signal: options.signal, timeoutMs: options.timeoutMs });\nsrc/resources/media-staging.ts:39: const response = await transport.request<SuccessBody<'listAccounts'>>({ operation: operations.listAccounts, query: { accountId }, signal: options.signal, timeoutMs: options.timeoutMs });\nsrc/resources/profiles.ts:21:export type ListProfilesResponse = OperationSuccessBody<'listProfiles'>;\nsrc/resources/profiles.ts:27: listProfiles(_args: EmptyArgs = {}, options: RequestOptions = {}): Promise<ApiResponse<ListProfilesResponse>> {\nsrc/resources/profiles.ts:28: return this.transport.request({ operation: operations.listProfiles, signal: options.signal, timeoutMs: options.timeoutMs });\naccounts.ts\nads.ts\nanalytics.ts\ncomments.ts\nmedia-staging.ts\nmessages.ts\nposts.ts\nprofiles.ts\npublications.ts\nusage.ts\nwebhooks.ts\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8d91f627ef6c7e97",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Check account schema fields (id, platform, profileId, username?) and usage resource (getXUsage) — useful for pricing/usage example. Let me inspect openapi for Account schema and usage paths.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
s=d['components']['schemas']
names=[n for n in s if 'ccount' in n or 'rofile' in n]
print(names[:20])
for n in names[:4]:
print(n, json.dumps(s[n].get('properties',{}), indent=0)[:1200])
print('USAGE PATHS', [p for p in d['paths'] if 'usage' in p])
EOF['Profile', 'Account', 'AccountsAggregate']
['Profile', 'Account', 'AccountsAggregate']
Profile {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"externalId": {
"type": [
"string",
"null"
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"isDefault": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
}
Account {
"id": {
"type": "string",
"format": "uuid"
},
"accountId": {
"type": "string",
"format": "uuid"
},
"profileId": {
"type": "string",
"format": "uuid"
},
"platform": {
"type": "string",
"enum": [
"instagram",
"tiktok",
"tiktok_ads",
"facebook",
"meta_ads",
"whatsapp",
"youtube",
"x",
"bluesky",
"linkedin",
"linkedin_ads"
]
},
"providerId": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
},
"displayIdentifier": {
"type": [
"string",
"null"
]
},
"authMethod": {
"type": "string",
"enum": [
"unified_login",
"instagram_login",
"facebook_login"
]
},
"connectionStatus": {
"type": "string",
"enum": [
"connected",
"expired",
"reconnect_required",
"pending_page_selection",
"setup_incomplete"
]
},
"grantedPermissions": {
"type": "array",
"items": {
"type": "string"
}
},
"recommendedPermissions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"code",
"label"
]
}
},
"missingRecommendedPermissions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"code",
"label"
]
}
},
"capabiliti
AccountsAggregate {
"status": {
"type": "string",
"enum": [
"complete",
"partial"
]
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"accountId": {
"type": "string",
"format": "uuid"
},
"profileId": {
"type": "string",
"format": "uuid"
},
"platform": {
"type": "string",
"enum": [
"instagram",
"tiktok",
"tiktok_ads",
"facebook",
"meta_ads",
"whatsapp",
"youtube",
"x",
"bluesky",
"linkedin",
"linkedin_ads"
]
},
"providerId": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
},
"displayIdentifier": {
"type": [
"string",
"null"
]
},
"authMethod": {
"type": "string",
"enum": [
"unified_login",
"instagram_login",
"facebook_login"
]
},
"connectionStatus": {
"type": "string",
"enum": [
"connected",
"expired",
"reconnect_required",
"pending_page_selection",
"setup_incomplete"
]
},
"grantedPermissions": {
"type": "array",
"items": {
"type": "string"
}
},
"recommendedPermissions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"code",
"label"
]
}
},
"missingRecommendedPermissions": {
"type": "array",
"items": {
"t
USAGE PATHS ['/api/v1/usage', '/api/v1/usage/x']
Recorded tool call
{
"type": "tool_call",
"seq": 71,
"ts": "2026-11-18T20:10:57.668Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\ns=d['components']['schemas']\nnames=[n for n in s if 'ccount' in n or 'rofile' in n]\nprint(names[:20])\nfor n in names[:4]:\n print(n, json.dumps(s[n].get('properties',{}), indent=0)[:1200])\nprint('USAGE PATHS', [p for p in d['paths'] if 'usage' in p])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-befc456f35091735",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 74,
"ts": "2026-11-18T20:10:58.334Z",
"turn": 1,
"output": {
"content": [
{
"text": "['Profile', 'Account', 'AccountsAggregate']\nProfile {\n\"id\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"name\": {\n\"type\": \"string\"\n},\n\"externalId\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"metadata\": {\n\"anyOf\": [\n{\n\"type\": \"object\",\n\"propertyNames\": {\n\"type\": \"string\"\n},\n\"additionalProperties\": {}\n},\n{\n\"type\": \"null\"\n}\n]\n},\n\"isDefault\": {\n\"type\": \"boolean\"\n},\n\"createdAt\": {\n\"type\": \"string\",\n\"format\": \"date-time\",\n\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d(?:\\\\.\\\\d+)?(?:Z|([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)))$\"\n},\n\"updatedAt\": {\n\"type\": \"string\",\n\"format\": \"date-time\",\n\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d(?:\\\\.\\\\d+)?(?:Z|([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)))$\"\n}\n}\nAccount {\n\"id\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"accountId\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"profileId\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"platform\": {\n\"type\": \"string\",\n\"enum\": [\n\"instagram\",\n\"tiktok\",\n\"tiktok_ads\",\n\"facebook\",\n\"meta_ads\",\n\"whatsapp\",\n\"youtube\",\n\"x\",\n\"bluesky\",\n\"linkedin\",\n\"linkedin_ads\"\n]\n},\n\"providerId\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"displayName\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"displayIdentifier\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"authMethod\": {\n\"type\": \"string\",\n\"enum\": [\n\"unified_login\",\n\"instagram_login\",\n\"facebook_login\"\n]\n},\n\"connectionStatus\": {\n\"type\": \"string\",\n\"enum\": [\n\"connected\",\n\"expired\",\n\"reconnect_required\",\n\"pending_page_selection\",\n\"setup_incomplete\"\n]\n},\n\"grantedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"string\"\n}\n},\n\"recommendedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"object\",\n\"properties\": {\n\"code\": {\n\"type\": \"string\"\n},\n\"label\": {\n\"type\": \"string\"\n}\n},\n\"required\": [\n\"code\",\n\"label\"\n]\n}\n},\n\"missingRecommendedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"object\",\n\"properties\": {\n\"code\": {\n\"type\": \"string\"\n},\n\"label\": {\n\"type\": \"string\"\n}\n},\n\"required\": [\n\"code\",\n\"label\"\n]\n}\n},\n\"capabiliti\nAccountsAggregate {\n\"status\": {\n\"type\": \"string\",\n\"enum\": [\n\"complete\",\n\"partial\"\n]\n},\n\"accounts\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"object\",\n\"properties\": {\n\"id\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"accountId\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"profileId\": {\n\"type\": \"string\",\n\"format\": \"uuid\"\n},\n\"platform\": {\n\"type\": \"string\",\n\"enum\": [\n\"instagram\",\n\"tiktok\",\n\"tiktok_ads\",\n\"facebook\",\n\"meta_ads\",\n\"whatsapp\",\n\"youtube\",\n\"x\",\n\"bluesky\",\n\"linkedin\",\n\"linkedin_ads\"\n]\n},\n\"providerId\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"displayName\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"displayIdentifier\": {\n\"type\": [\n\"string\",\n\"null\"\n]\n},\n\"authMethod\": {\n\"type\": \"string\",\n\"enum\": [\n\"unified_login\",\n\"instagram_login\",\n\"facebook_login\"\n]\n},\n\"connectionStatus\": {\n\"type\": \"string\",\n\"enum\": [\n\"connected\",\n\"expired\",\n\"reconnect_required\",\n\"pending_page_selection\",\n\"setup_incomplete\"\n]\n},\n\"grantedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"string\"\n}\n},\n\"recommendedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"type\": \"object\",\n\"properties\": {\n\"code\": {\n\"type\": \"string\"\n},\n\"label\": {\n\"type\": \"string\"\n}\n},\n\"required\": [\n\"code\",\n\"label\"\n]\n}\n},\n\"missingRecommendedPermissions\": {\n\"type\": \"array\",\n\"items\": {\n\"t\nUSAGE PATHS ['/api/v1/usage', '/api/v1/usage/x']\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-befc456f35091735",
"is_error": false,
"tool_kind": "shell"
}cd /tmp/adeli-sdk-main && cat src/resources/usage.ts | head -40
import type { ApiResponse, RequestOptions } from '../core/types.js';
import type { ApiResponse, RequestOptions } from '../core/types.js';
import type { OperationSuccessBody as SuccessBody } from '../core/generated.js';
import type { Transport } from '../core/transport.js';
import { operations } from '../operations.js';
export type XUsageResponse = SuccessBody<'getXUsage'>;
/** A profile's posts, messages and comments sent this UTC month; `limit` is null when the workspace has billing. */
export type UsageResponse = SuccessBody<'getUsage'>;
export class UsageResource {
constructor(private readonly transport: Transport) {}
/** This month's sends for a profile (the default profile unless `query.profileId` is given), against the free plan's limits. Past a limit, sends fail with `402 usage_limit_reached`. */
getUsage(_args: Record<never, never> = {}, options: RequestOptions = {}): Promise<ApiResponse<UsageResponse>> {
return this.transport.request({ operation: operations.getUsage, signal: options.signal, timeoutMs: options.timeoutMs });
}
getXUsage(_args: Record<never, never> = {}, options: RequestOptions = {}): Promise<ApiResponse<XUsageResponse>> {
return this.transport.request({ operation: operations.getXUsage, signal: options.signal, timeoutMs: options.timeoutMs });
}
}
Recorded tool call
{
"type": "tool_call",
"seq": 72,
"ts": "2026-11-18T20:10:57.668Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && cat src/resources/usage.ts | head -40"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b56c2add7c8c2cbf",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 73,
"ts": "2026-11-18T20:10:57.668Z",
"turn": 1,
"output": {
"content": [
{
"text": "import type { ApiResponse, RequestOptions } from '../core/types.js';\nimport type { OperationSuccessBody as SuccessBody } from '../core/generated.js';\nimport type { Transport } from '../core/transport.js';\nimport { operations } from '../operations.js';\nexport type XUsageResponse = SuccessBody<'getXUsage'>;\n/** A profile's posts, messages and comments sent this UTC month; `limit` is null when the workspace has billing. */\nexport type UsageResponse = SuccessBody<'getUsage'>;\n\nexport class UsageResource {\n constructor(private readonly transport: Transport) {}\n /** This month's sends for a profile (the default profile unless `query.profileId` is given), against the free plan's limits. Past a limit, sends fail with `402 usage_limit_reached`. */\n getUsage(_args: Record<never, never> = {}, options: RequestOptions = {}): Promise<ApiResponse<UsageResponse>> {\n return this.transport.request({ operation: operations.getUsage, signal: options.signal, timeoutMs: options.timeoutMs });\n }\n getXUsage(_args: Record<never, never> = {}, options: RequestOptions = {}): Promise<ApiResponse<XUsageResponse>> {\n return this.transport.request({ operation: operations.getXUsage, signal: options.signal, timeoutMs: options.timeoutMs });\n }\n}\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b56c2add7c8c2cbf",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Great — client.usage.getUsage() maps directly to pricing (posts/comments/messages counts vs limits), and getXUsage for X pass-through cost in micros. That's a nice example tying pricing to code.
Now write the example project in /sandbox/repo:
Files:
- package.json (update name, type module, scripts)
- tsconfig.json
- .env.example
- src/client.ts (shared client factory)
- src/quickstart.ts (read-only: getMe, profiles, accounts, usage)
- src/publish.ts (optional write, guarded by --i-mean-it / env var, uses createPost for x/bluesky text)
- README.md (pricing + how to run + manageability notes)
Then typecheck and run quickstart without key to demonstrate graceful error.
Check CreatePostBody for x/bluesky text fields.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
s=d['components']['schemas']
n=[k for k in s if 'CreatePost' in k]
print(n)
cp=s.get('CreatePostBody') or s.get('CreatePostRequest')
print(json.dumps(cp,indent=1)[:3000])
EOF[]
[] null
Recorded tool call
{
"type": "tool_call",
"seq": 77,
"ts": "2026-11-18T20:11:01.984Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\ns=d['components']['schemas']\nn=[k for k in s if 'CreatePost' in k]\nprint(n)\ncp=s.get('CreatePostBody') or s.get('CreatePostRequest')\nprint(json.dumps(cp,indent=1)[:3000])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a433ea375d2c8957",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 79,
"ts": "2026-11-18T20:11:01.984Z",
"turn": 1,
"output": {
"content": [
{
"text": "[]\nnull\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a433ea375d2c8957",
"is_error": false,
"tool_kind": "shell"
}cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
print(json.dumps(d['components']['schemas'].get('UsageResponse') or {k:v for k,v in d['components']['schemas'].items() if 'Usage' in k}, indent=1)[:2500])
print([k for k in d['components']['schemas'] if 'Usage' in k])
EOF{}
{}
[]
Recorded tool call
{
"type": "tool_call",
"seq": 78,
"ts": "2026-11-18T20:11:01.984Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\nprint(json.dumps(d['components']['schemas'].get('UsageResponse') or {k:v for k,v in d['components']['schemas'].items() if 'Usage' in k}, indent=1)[:2500])\nprint([k for k in d['components']['schemas'] if 'Usage' in k])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8cccf072a6fa5ee5",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 80,
"ts": "2026-11-18T20:11:01.984Z",
"turn": 1,
"output": {
"content": [
{
"text": "{}\n[]\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8cccf072a6fa5ee5",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
I need to look at the request body definition for the createPost operation in the OpenAPI spec to understand what the requestBodies contain.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
p=d['paths']
for path in p:
if 'posts' in path or 'usage' in path: print(path, list(p[path].keys()))
op=p['/api/v1/posts']['post']
body=op['requestBody']['content']['application/json']['schema']
print(json.dumps(body,indent=1)[:4000])
EOF/api/v1/posts ['get', 'post']
/api/v1/posts ['get', 'post']
/api/v1/posts/youtube ['post']
/api/v1/posts/x/{postId} ['delete']
/api/v1/posts/bluesky/{postId} ['delete']
/api/v1/posts/instagram/status ['get']
/api/v1/posts/instagram/stories ['get']
/api/v1/posts/facebook/status ['get']
/api/v1/posts/tiktok/status ['get']
/api/v1/posts/tiktok/creator-info ['get']
/api/v1/posts/youtube/status ['get']
/api/v1/usage ['get']
/api/v1/usage/x ['get']
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"platform": {
"type": "string",
"const": "instagram"
},
"accountId": {
"type": "string",
"format": "uuid"
},
"profileId": {
"type": "string",
"format": "uuid"
},
"caption": {
"type": "string",
"maxLength": 2200
},
"collaborators": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string"
}
},
"isAiGenerated": {
"type": "boolean"
},
"image": {
"anyOf": [
{
"type": "object",
"properties": {
"contentType": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"image/webp"
]
},
"base64": {
"type": "string",
"minLength": 1
},
"altText": {
"type": "string",
"maxLength": 1000
},
"userTags": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"x": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"y": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"username",
"x",
"y"
],
"additionalProperties": false
}
}
},
"required": [
"contentType",
"base64"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"upload_id": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"altText": {
"type": "string",
"maxLength": 1000
},
"userTags": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"x": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"y": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"username",
"x",
"y"
],
"additionalProperties": false
}
}
},
"required": [
"upload_id"
],
"additionalProperties": false
}
]
}
},
"required": [
"platform",
"accountId",
"image"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"platform": {
"type": "string",
"const": "instagram"
},
"accountId": {
"type": "string",
"format": "uuid"
},
"profileId": {
"type": "string",
"format": "uuid"
},
"caption": {
"type": "string",
"maxLength": 2200
},
"collaborators": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string"
}
},
"isAiGenerated": {
"type": "boolean"
},
"images": {
"minItems": 2,
"maxItems": 10,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"contentType": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"image/webp"
]
},
Recorded tool call
{
"type": "tool_call",
"seq": 83,
"ts": "2026-11-18T20:11:03.338Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\np=d['paths']\nfor path in p:\n if 'posts' in path or 'usage' in path: print(path, list(p[path].keys()))\nop=p['/api/v1/posts']['post']\nbody=op['requestBody']['content']['application/json']['schema']\nprint(json.dumps(body,indent=1)[:4000])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9e8cd1db96bbf24a",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 84,
"ts": "2026-11-18T20:11:04.089Z",
"turn": 1,
"output": {
"content": [
{
"text": "/api/v1/posts ['get', 'post']\n/api/v1/posts/youtube ['post']\n/api/v1/posts/x/{postId} ['delete']\n/api/v1/posts/bluesky/{postId} ['delete']\n/api/v1/posts/instagram/status ['get']\n/api/v1/posts/instagram/stories ['get']\n/api/v1/posts/facebook/status ['get']\n/api/v1/posts/tiktok/status ['get']\n/api/v1/posts/tiktok/creator-info ['get']\n/api/v1/posts/youtube/status ['get']\n/api/v1/usage ['get']\n/api/v1/usage/x ['get']\n{\n \"anyOf\": [\n {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"platform\": {\n \"type\": \"string\",\n \"const\": \"instagram\"\n },\n \"accountId\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"profileId\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"caption\": {\n \"type\": \"string\",\n \"maxLength\": 2200\n },\n \"collaborators\": {\n \"maxItems\": 3,\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"isAiGenerated\": {\n \"type\": \"boolean\"\n },\n \"image\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"contentType\": {\n \"type\": \"string\",\n \"enum\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/webp\"\n ]\n },\n \"base64\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"altText\": {\n \"type\": \"string\",\n \"maxLength\": 1000\n },\n \"userTags\": {\n \"maxItems\": 20,\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"x\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"y\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n }\n },\n \"required\": [\n \"username\",\n \"x\",\n \"y\"\n ],\n \"additionalProperties\": false\n }\n }\n },\n \"required\": [\n \"contentType\",\n \"base64\"\n ],\n \"additionalProperties\": false\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"upload_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 300\n },\n \"altText\": {\n \"type\": \"string\",\n \"maxLength\": 1000\n },\n \"userTags\": {\n \"maxItems\": 20,\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"x\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"y\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n }\n },\n \"required\": [\n \"username\",\n \"x\",\n \"y\"\n ],\n \"additionalProperties\": false\n }\n }\n },\n \"required\": [\n \"upload_id\"\n ],\n \"additionalProperties\": false\n }\n ]\n }\n },\n \"required\": [\n \"platform\",\n \"accountId\",\n \"image\"\n ],\n \"additionalProperties\": false\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"platform\": {\n \"type\": \"string\",\n \"const\": \"instagram\"\n },\n \"accountId\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"profileId\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"caption\": {\n \"type\": \"string\",\n \"maxLength\": 2200\n },\n \"collaborators\": {\n \"maxItems\": 3,\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"isAiGenerated\": {\n \"type\": \"boolean\"\n },\n \"images\": {\n \"minItems\": 2,\n \"maxItems\": 10,\n \"type\": \"array\",\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"contentType\": {\n \"type\": \"string\",\n \"enum\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/webp\"\n ]\n },\n \n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9e8cd1db96bbf24a",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Enough. Check x/bluesky text post shape and usage response quickly.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
body=d['paths']['/api/v1/posts']['post']['requestBody']['content']['application/json']['schema']
def walk(node, out):
if isinstance(node,dict):
if node.get('properties',{}).get('platform',{}).get('const') in ('x','bluesky'):
c=node['properties']['platform']['const']
out.append((c, sorted(node['properties']), node.get('required')))
for v in node.values(): walk(v,out)
elif isinstance(node,list):
for v in node: walk(v,out)
out=[];walk(body,out)
for c,props,req in out: print(c, props, req)
print('--- usage ---')
u=d['paths']['/api/v1/usage']['get']['responses']
print(json.dumps(u,indent=1)[:1500])
EOFx ['accountId', 'media', 'platform', 'profileId', 'text', 'thread'] ['platform', 'accountId', 'text']
x ['accountId', 'media', 'platform', 'profileId', 'text', 'thread'] ['platform', 'accountId', 'text']
bluesky ['accountId', 'images', 'langs', 'platform', 'profileId', 'text', 'thread', 'video'] ['platform', 'accountId', 'text']
--- usage ---
{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"period": {
"type": "string"
},
"resetsAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"enforced": {
"type": "boolean"
},
"posts": {
"type": "object",
"properties": {
"used": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"limit": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"used",
"limit"
]
},
"messages": {
"type": "object",
"properties": {
"used": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"limit": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991
Recorded tool call
{
"type": "tool_call",
"seq": 87,
"ts": "2026-11-18T20:11:06.081Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\nbody=d['paths']['/api/v1/posts']['post']['requestBody']['content']['application/json']['schema']\ndef walk(node, out):\n if isinstance(node,dict):\n if node.get('properties',{}).get('platform',{}).get('const') in ('x','bluesky'):\n c=node['properties']['platform']['const']\n out.append((c, sorted(node['properties']), node.get('required')))\n for v in node.values(): walk(v,out)\n elif isinstance(node,list):\n for v in node: walk(v,out)\nout=[];walk(body,out)\nfor c,props,req in out: print(c, props, req)\nprint('--- usage ---')\nu=d['paths']['/api/v1/usage']['get']['responses']\nprint(json.dumps(u,indent=1)[:1500])\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8dda9371416d5b4a",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 88,
"ts": "2026-11-18T20:11:06.081Z",
"turn": 1,
"output": {
"content": [
{
"text": "x ['accountId', 'media', 'platform', 'profileId', 'text', 'thread'] ['platform', 'accountId', 'text']\nbluesky ['accountId', 'images', 'langs', 'platform', 'profileId', 'text', 'thread', 'video'] ['platform', 'accountId', 'text']\n--- usage ---\n{\n \"200\": {\n \"description\": \"Success\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"period\": {\n \"type\": \"string\"\n },\n \"resetsAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d(?:\\\\.\\\\d+)?(?:Z|([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)))$\"\n },\n \"enforced\": {\n \"type\": \"boolean\"\n },\n \"posts\": {\n \"type\": \"object\",\n \"properties\": {\n \"used\": {\n \"type\": \"integer\",\n \"minimum\": -9007199254740991,\n \"maximum\": 9007199254740991\n },\n \"limit\": {\n \"anyOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": -9007199254740991,\n \"maximum\": 9007199254740991\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"required\": [\n \"used\",\n \"limit\"\n ]\n },\n \"messages\": {\n \"type\": \"object\",\n \"properties\": {\n \"used\": {\n \"type\": \"integer\",\n \"minimum\": -9007199254740991,\n \"maximum\": 9007199254740991\n },\n \"limit\": {\n \"anyOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": -9007199254740991\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8dda9371416d5b4a",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
I'm setting up the project structure with TypeScript configuration, environment variables, and a package.json, then creating source files for the Adeli client, a quickstart module, and a publish utility with explicit confirmation requirements before writing documentation.
File edits
1 file
Writtentsconfig.jsonView changes
/sandbox/repo/tsconfig.json
Written content · previous contents were not recorded
{"compilerOptions": {"target": "ES2023","module": "NodeNext","moduleResolution": "NodeNext","lib": ["ES2023", "DOM"],"types": ["node"],"strict": true,"noUncheckedIndexedAccess": true,"exactOptionalPropertyTypes": true,"noEmit": true,"skipLibCheck": true,"esModuleInterop": true,"forceConsistentCasingInFileNames": true},"include": ["src"]}
Source: write · chatcmpl-tool-acce1cbfdb3aa98c
Recorded tool call
{
"type": "tool_call",
"seq": 91,
"ts": "2026-11-18T20:11:08.714Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/tsconfig.json",
"content": "{\n \"compilerOptions\": {\n \"target\": \"ES2023\",\n \"module\": \"NodeNext\",\n \"moduleResolution\": \"NodeNext\",\n \"lib\": [\"ES2023\", \"DOM\"],\n \"types\": [\"node\"],\n \"strict\": true,\n \"noUncheckedIndexedAccess\": true,\n \"exactOptionalPropertyTypes\": true,\n \"noEmit\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true\n },\n \"include\": [\"src\"]\n}\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-acce1cbfdb3aa98c",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 93,
"ts": "2026-11-18T20:11:08.714Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 410 bytes to /sandbox/repo/tsconfig.json",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-acce1cbfdb3aa98c",
"is_error": false,
"tool_kind": "file_edit"
}File edits
1 file
Written.env.exampleView changes
/sandbox/repo/.env.example
Written content · previous contents were not recorded
# Copy to .env (never commit .env) or export in your shell.# Get a key at https://app.tryadeli.comADELI_API_KEY=# Optional: send a real post with `npm run publish`.# Must be the id (uuid) of a connected `x` or `bluesky` account from `npm run quickstart`.ADELI_EXAMPLE_ACCOUNT_ID=
Source: write · chatcmpl-tool-b77f4b5da422db33
Recorded tool call
{
"type": "tool_call",
"seq": 92,
"ts": "2026-11-18T20:11:08.714Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/.env.example",
"content": "# Copy to .env (never commit .env) or export in your shell.\n# Get a key at https://app.tryadeli.com\nADELI_API_KEY=\n\n# Optional: send a real post with `npm run publish`.\n# Must be the id (uuid) of a connected `x` or `bluesky` account from `npm run quickstart`.\nADELI_EXAMPLE_ACCOUNT_ID=\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b77f4b5da422db33",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 94,
"ts": "2026-11-18T20:11:08.714Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 286 bytes to /sandbox/repo/.env.example",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b77f4b5da422db33",
"is_error": false,
"tool_kind": "file_edit"
}›Thinking…
Now src/client.ts, src/quickstart.ts, src/publish.ts, src/usage.ts.
Need to check how env loading works — Node 22 supports --env-file. Use node --env-file=.env but must not fail if .env absent. Node 22.23 supports --env-file-if-exists. Use tsx? Simpler: use node --experimental-strip-types? Node 22.23 supports type stripping (--experimental-strip-types) but our code imports TS with .ts extensions... Let's just use tsx (installed) for running: tsx src/quickstart.ts. For env, load with node --env-file-if-exists=.env? tsx passes node flags? We can do NODE_OPTIONS ... simpler: in client.ts, read .env manually? Better: script uses tsx and we document export ADELI_API_KEY=.... Also try --env-file-if-exists via tsx: tsx forwards node options if given before? Actually node --env-file-if-exists=.env --import tsx src/quickstart.ts works. Let's set package scripts as:
"quickstart": "node --env-file-if-exists=.env --import tsx src/quickstart.ts"
Check tsx supports being used via --import tsx (yes, tsx docs: node --import tsx ./file.ts).
Now write client.ts.
File edits
1 file
Writtensrc/client.tsView changes
/sandbox/repo/src/client.ts
Written content · previous contents were not recorded
import { Adeli, ConfigurationError } from '@adeli/sdk';/*** Single place that builds the Adeli client.** Only ever call this from server code (a request handler, a job, a CLI).* The API key is a secret: keep it out of browser bundles and out of logs.** Base URL defaults to https://app.tryadeli.com (the hosted API); nothing* local needs to be running.*/export function createAdeli(): Adeli {try {return new Adeli({ apiKey: process.env.ADELI_API_KEY });} catch (error) {if (error instanceof ConfigurationError) {throw new Error('ADELI_API_KEY is missing or invalid. Copy .env.example to .env and paste a key from https://app.tryadeli.com',{ cause: error },);}throw error;}}/** Human-readable summary of any Adeli failure, without echoing secrets. */export function describeError(error: unknown): string {if (error instanceof Error) {const detail = error as Error & { status?: number; code?: string };const parts = [error.name, detail.status ? `HTTP ${detail.status}` : null, detail.code ?? null, error.message];return parts.filter(Boolean).join(' | ');}return String(error);}
Source: write · chatcmpl-tool-b0084041efb4d0ab
Recorded tool call
{
"type": "tool_call",
"seq": 97,
"ts": "2026-11-18T20:11:16.656Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/src/client.ts",
"content": "import { Adeli, ConfigurationError } from '@adeli/sdk';\n\n/**\n * Single place that builds the Adeli client.\n *\n * Only ever call this from server code (a request handler, a job, a CLI).\n * The API key is a secret: keep it out of browser bundles and out of logs.\n *\n * Base URL defaults to https://app.tryadeli.com (the hosted API); nothing\n * local needs to be running.\n */\nexport function createAdeli(): Adeli {\n try {\n return new Adeli({ apiKey: process.env.ADELI_API_KEY });\n } catch (error) {\n if (error instanceof ConfigurationError) {\n throw new Error(\n 'ADELI_API_KEY is missing or invalid. Copy .env.example to .env and paste a key from https://app.tryadeli.com',\n { cause: error },\n );\n }\n throw error;\n }\n}\n\n/** Human-readable summary of any Adeli failure, without echoing secrets. */\nexport function describeError(error: unknown): string {\n if (error instanceof Error) {\n const detail = error as Error & { status?: number; code?: string };\n const parts = [error.name, detail.status ? `HTTP ${detail.status}` : null, detail.code ?? null, error.message];\n return parts.filter(Boolean).join(' | ');\n }\n return String(error);\n}\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b0084041efb4d0ab",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 99,
"ts": "2026-11-18T20:11:16.656Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 1185 bytes to /sandbox/repo/src/client.ts",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b0084041efb4d0ab",
"is_error": false,
"tool_kind": "file_edit"
}File edits
1 file
Writtensrc/quickstart.tsView changes
/sandbox/repo/src/quickstart.ts
Written content · previous contents were not recorded
import { createAdeli, describeError } from './client.js';/*** Read-only quickstart: who am I, which profiles exist, which social accounts* are connected, and how much of this month's allowance is used.** Costs nothing: reads are never metered on Adeli's paid plans, and the free* plan only meters posts, comments and messages you *send*.** Run: npm run quickstart*/async function main(): Promise<void> {const adeli = createAdeli();const me = await adeli.getMe();console.log(`workspace: ${JSON.stringify(me.data)}`);const { data: profiles } = await adeli.profiles.listProfiles();console.log(`\nprofiles (${profiles.profiles.length}):`);for (const profile of profiles.profiles) {console.log(` ${profile.id} ${profile.name}${profile.isDefault ? ' (default)' : ''}`);}const { data: accounts } = await adeli.accounts.listAccounts();console.log(`\naccounts (${accounts.accounts.length})${accounts.status === 'partial' ? ' [partial response]' : ''}:`);for (const account of accounts.accounts) {console.log(` ${account.platform.padEnd(12)} ${account.accountId} ${account.connectionStatus} ${account.displayName ?? account.displayIdentifier ?? ''}`,);}for (const error of accounts.errors ?? []) {console.warn(` account error: ${JSON.stringify(error)}`);}const { data: usage } = await adeli.usage.getUsage();const meter = (label: string, bucket: { used: number; limit: number | null }): string =>`${label}: ${bucket.used}${bucket.limit === null ? ' (unlimited)' : ` / ${bucket.limit}`}`;console.log(`\nusage for ${usage.period}${usage.enforced ? ' (enforced)' : ' (not enforced)'}`);console.log(` ${meter('posts', usage.posts)}`);console.log(` ${meter('comments', usage.comments)}`);console.log(` ${meter('messages', usage.messages)}`);console.log(` resets at ${usage.resetsAt}`);}main().catch((error: unknown) => {console.error(`quickstart failed: ${describeError(error)}`);process.exitCode = 1;});
Source: write · chatcmpl-tool-8e8f6d9d8c0318a7
Recorded tool call
{
"type": "tool_call",
"seq": 98,
"ts": "2026-11-18T20:11:16.656Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/src/quickstart.ts",
"content": "import { createAdeli, describeError } from './client.js';\n\n/**\n * Read-only quickstart: who am I, which profiles exist, which social accounts\n * are connected, and how much of this month's allowance is used.\n *\n * Costs nothing: reads are never metered on Adeli's paid plans, and the free\n * plan only meters posts, comments and messages you *send*.\n *\n * Run: npm run quickstart\n */\nasync function main(): Promise<void> {\n const adeli = createAdeli();\n\n const me = await adeli.getMe();\n console.log(`workspace: ${JSON.stringify(me.data)}`);\n\n const { data: profiles } = await adeli.profiles.listProfiles();\n console.log(`\\nprofiles (${profiles.profiles.length}):`);\n for (const profile of profiles.profiles) {\n console.log(` ${profile.id} ${profile.name}${profile.isDefault ? ' (default)' : ''}`);\n }\n\n const { data: accounts } = await adeli.accounts.listAccounts();\n console.log(`\\naccounts (${accounts.accounts.length})${accounts.status === 'partial' ? ' [partial response]' : ''}:`);\n for (const account of accounts.accounts) {\n console.log(\n ` ${account.platform.padEnd(12)} ${account.accountId} ${account.connectionStatus} ${account.displayName ?? account.displayIdentifier ?? ''}`,\n );\n }\n for (const error of accounts.errors ?? []) {\n console.warn(` account error: ${JSON.stringify(error)}`);\n }\n\n const { data: usage } = await adeli.usage.getUsage();\n const meter = (label: string, bucket: { used: number; limit: number | null }): string =>\n `${label}: ${bucket.used}${bucket.limit === null ? ' (unlimited)' : ` / ${bucket.limit}`}`;\n console.log(`\\nusage for ${usage.period}${usage.enforced ? ' (enforced)' : ' (not enforced)'}`);\n console.log(` ${meter('posts', usage.posts)}`);\n console.log(` ${meter('comments', usage.comments)}`);\n console.log(` ${meter('messages', usage.messages)}`);\n console.log(` resets at ${usage.resetsAt}`);\n}\n\nmain().catch((error: unknown) => {\n console.error(`quickstart failed: ${describeError(error)}`);\n process.exitCode = 1;\n});\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8e8f6d9d8c0318a7",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 100,
"ts": "2026-11-18T20:11:16.656Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 2027 bytes to /sandbox/repo/src/quickstart.ts",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8e8f6d9d8c0318a7",
"is_error": false,
"tool_kind": "file_edit"
}›Thinking…
Check getMe response shape (Identity) and usage fields names (comments?). Verify from openapi: /api/v1/me response, /api/v1/usage properties: period, resetsAt, enforced, posts, messages, comments? Earlier truncated. Also accounts aggregate has errors? Let's verify then write publish.ts.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
u=d['paths']['/api/v1/usage']['get']['responses']['200']['content']['application/json']['schema']
print('usage props:', list(u['properties']), 'required', u.get('required'))
me=d['paths']['/api/v1/me']['get']['responses']['200']['content']['application/json']['schema']
print('me:', json.dumps(me)[:800])
agg=d['paths']['/api/v1/accounts']['get']['responses']['200']['content']['application/json']['schema']
print('accounts agg props:', list(agg['properties']))
EOFusage props: ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments'] required ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments']
usage props: ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments'] required ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments']
me: {"type": "object", "properties": {"message": {"type": "string"}, "you": {"type": "object", "properties": {"name": {"type": ["string", "null"]}, "organization": {"type": ["string", "null"]}, "profile": {"type": "object", "properties": {"id": {"type": "string", "format": "uuid"}, "name": {"type": "string"}}, "required": ["id", "name"]}}, "required": ["name", "organization", "profile"]}, "apiKey": {"type": "object", "properties": {"label": {"type": ["string", "null"]}, "prefix": {"type": "string"}, "createdAt": {"type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3
accounts agg props: ['status', 'accounts', 'errors']
Recorded tool call
{
"type": "tool_call",
"seq": 103,
"ts": "2026-11-18T20:11:19.106Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\nu=d['paths']['/api/v1/usage']['get']['responses']['200']['content']['application/json']['schema']\nprint('usage props:', list(u['properties']), 'required', u.get('required'))\nme=d['paths']['/api/v1/me']['get']['responses']['200']['content']['application/json']['schema']\nprint('me:', json.dumps(me)[:800])\nagg=d['paths']['/api/v1/accounts']['get']['responses']['200']['content']['application/json']['schema']\nprint('accounts agg props:', list(agg['properties']))\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b810534f7380e28e",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 104,
"ts": "2026-11-18T20:11:19.106Z",
"turn": 1,
"output": {
"content": [
{
"text": "usage props: ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments'] required ['period', 'resetsAt', 'enforced', 'posts', 'messages', 'comments']\nme: {\"type\": \"object\", \"properties\": {\"message\": {\"type\": \"string\"}, \"you\": {\"type\": \"object\", \"properties\": {\"name\": {\"type\": [\"string\", \"null\"]}, \"organization\": {\"type\": [\"string\", \"null\"]}, \"profile\": {\"type\": \"object\", \"properties\": {\"id\": {\"type\": \"string\", \"format\": \"uuid\"}, \"name\": {\"type\": \"string\"}}, \"required\": [\"id\", \"name\"]}}, \"required\": [\"name\", \"organization\", \"profile\"]}, \"apiKey\": {\"type\": \"object\", \"properties\": {\"label\": {\"type\": [\"string\", \"null\"]}, \"prefix\": {\"type\": \"string\"}, \"createdAt\": {\"type\": \"string\", \"format\": \"date-time\", \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3\naccounts agg props: ['status', 'accounts', 'errors']\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-b810534f7380e28e",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Fix quickstart's me printing: use me.data.you.name/organization and apiKey.prefix (not full key — prefix is fine).
Also errors may be nullable/optional — check its schema type. Let me just handle accounts.errors ?? [] but with exactOptionalPropertyTypes and noUncheckedIndexedAccess, if errors is required array of unknown, ?? [] fine. Check whether errors type is array.
Now write publish.ts (X/Bluesky text post, guarded by explicit env flag), and a scheduled/multi-platform publication example maybe keep it to one write example to stay simple.
Let me update quickstart me printing and write publish.ts.
cd /tmp/adeli-sdk-main && python3 - <<'EOF'
import json
d=json.load(open('openapi/adeli.openapi.json'))
agg=d['paths']['/api/v1/accounts']['get']['responses']['200']['content']['application/json']['schema']
print(json.dumps(agg['properties']['errors'])[:600], 'required:', agg.get('required'))
EOF{"type": "array", "items": {"type": "object", "properties": {"platform": {"type": "string", "enum": ["instagram", "tiktok", "tiktok_ads", "facebook", "meta_ads"
{"type": "array", "items": {"type": "object", "properties": {"platform": {"type": "string", "enum": ["instagram", "tiktok", "tiktok_ads", "facebook", "meta_ads", "whatsapp", "youtube", "x", "bluesky", "linkedin", "linkedin_ads"]}, "accountId": {"type": "string"}, "code": {"type": "string"}, "message": {"type": "string"}, "details": {}}, "required": ["platform", "accountId", "code", "message"]}} required: ['status', 'accounts', 'errors']
Recorded tool call
{
"type": "tool_call",
"seq": 107,
"ts": "2026-11-18T20:11:22.318Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 - <<'EOF'\nimport json\nd=json.load(open('openapi/adeli.openapi.json'))\nagg=d['paths']['/api/v1/accounts']['get']['responses']['200']['content']['application/json']['schema']\nprint(json.dumps(agg['properties']['errors'])[:600], 'required:', agg.get('required'))\nEOF"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-bea548a944cce556",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 108,
"ts": "2026-11-18T20:11:22.318Z",
"turn": 1,
"output": {
"content": [
{
"text": "{\"type\": \"array\", \"items\": {\"type\": \"object\", \"properties\": {\"platform\": {\"type\": \"string\", \"enum\": [\"instagram\", \"tiktok\", \"tiktok_ads\", \"facebook\", \"meta_ads\", \"whatsapp\", \"youtube\", \"x\", \"bluesky\", \"linkedin\", \"linkedin_ads\"]}, \"accountId\": {\"type\": \"string\"}, \"code\": {\"type\": \"string\"}, \"message\": {\"type\": \"string\"}, \"details\": {}}, \"required\": [\"platform\", \"accountId\", \"code\", \"message\"]}} required: ['status', 'accounts', 'errors']\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-bea548a944cce556",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
I need to update the quickstart to display a summary of the current user and API key information, fix how errors are handled by using an empty array as the default, and format account errors to show the platform, error code, and message together. Then I'll create the publish.ts file, update package.json and README.md.
File edits
1 file
Modifiedsrc/quickstart.ts+6−3View changes
/sandbox/repo/src/quickstart.ts
Replacement excerpt
const me = await adeli.getMe();- console.log(`workspace: ${JSON.stringify(me.data)}`);+ console.log(+ `identity: ${me.data.you.name ?? '(unnamed)'} @ ${me.data.you.organization ?? '(no org)'}` ++ ` key prefix ${me.data.apiKey.prefix}`,+ );
Replacement excerpt
- for (const error of accounts.errors ?? []) {- console.warn(` account error: ${JSON.stringify(error)}`);+ for (const error of accounts.errors) {+ console.warn(` account error: ${error.platform} ${error.accountId} ${error.code}: ${error.message}`);}
Source: edit · chatcmpl-tool-ad60a5a562874184
Recorded tool call
{
"type": "tool_call",
"seq": 111,
"ts": "2026-11-18T20:11:25.742Z",
"name": "edit",
"turn": 1,
"input": {
"path": "/sandbox/repo/src/quickstart.ts",
"edits": [
{
"newText": " const me = await adeli.getMe();\n console.log(\n `identity: ${me.data.you.name ?? '(unnamed)'} @ ${me.data.you.organization ?? '(no org)'}` +\n ` key prefix ${me.data.apiKey.prefix}`,\n );",
"oldText": " const me = await adeli.getMe();\n console.log(`workspace: ${JSON.stringify(me.data)}`);"
},
{
"newText": " for (const error of accounts.errors) {\n console.warn(` account error: ${error.platform} ${error.accountId} ${error.code}: ${error.message}`);\n }",
"oldText": " for (const error of accounts.errors ?? []) {\n console.warn(` account error: ${JSON.stringify(error)}`);\n }"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ad60a5a562874184",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 112,
"ts": "2026-11-18T20:11:25.742Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully replaced 2 block(s) in /sandbox/repo/src/quickstart.ts.",
"type": "text"
}
],
"details": {
"diff": " ...\n 12 async function main(): Promise<void> {\n 13 const adeli = createAdeli();\n 14 \n 15 const me = await adeli.getMe();\n-16 console.log(`workspace: ${JSON.stringify(me.data)}`);\n+16 console.log(\n+17 `identity: ${me.data.you.name ?? '(unnamed)'} @ ${me.data.you.organization ?? '(no org)'}` +\n+18 ` key prefix ${me.data.apiKey.prefix}`,\n+19 );\n 17 \n 18 const { data: profiles } = await adeli.profiles.listProfiles();\n 19 console.log(`\\nprofiles (${profiles.profiles.length}):`);\n 20 for (const profile of profiles.profiles) {\n ...\n 27 console.log(\n 28 ` ${account.platform.padEnd(12)} ${account.accountId} ${account.connectionStatus} ${account.displayName ?? account.displayIdentifier ?? ''}`,\n 29 );\n 30 }\n-31 for (const error of accounts.errors ?? []) {\n-32 console.warn(` account error: ${JSON.stringify(error)}`);\n+34 for (const error of accounts.errors) {\n+35 console.warn(` account error: ${error.platform} ${error.accountId} ${error.code}: ${error.message}`);\n 33 }\n 34 \n 35 const { data: usage } = await adeli.usage.getUsage();\n 36 const meter = (label: string, bucket: { used: number; limit: number | null }): string =>\n ...",
"patch": "--- /sandbox/repo/src/quickstart.ts\n+++ /sandbox/repo/src/quickstart.ts\n@@ -12,9 +12,12 @@\n async function main(): Promise<void> {\n const adeli = createAdeli();\n \n const me = await adeli.getMe();\n- console.log(`workspace: ${JSON.stringify(me.data)}`);\n+ console.log(\n+ `identity: ${me.data.you.name ?? '(unnamed)'} @ ${me.data.you.organization ?? '(no org)'}` +\n+ ` key prefix ${me.data.apiKey.prefix}`,\n+ );\n \n const { data: profiles } = await adeli.profiles.listProfiles();\n console.log(`\\nprofiles (${profiles.profiles.length}):`);\n for (const profile of profiles.profiles) {\n@@ -27,10 +30,10 @@\n console.log(\n ` ${account.platform.padEnd(12)} ${account.accountId} ${account.connectionStatus} ${account.displayName ?? account.displayIdentifier ?? ''}`,\n );\n }\n- for (const error of accounts.errors ?? []) {\n- console.warn(` account error: ${JSON.stringify(error)}`);\n+ for (const error of accounts.errors) {\n+ console.warn(` account error: ${error.platform} ${error.accountId} ${error.code}: ${error.message}`);\n }\n \n const { data: usage } = await adeli.usage.getUsage();\n const meter = (label: string, bucket: { used: number; limit: number | null }): string =>\n",
"firstChangedLine": 16
}
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ad60a5a562874184",
"is_error": false,
"tool_kind": "file_edit"
}›Thinking…
I'm building out the publish.ts file for text posts on X/Bluesky, which requires setting ADELI_EXAMPLE_ACCOUNT_ID and explicitly confirming the action with ADELI_SEND_REAL_POST=yes. I need to handle several error cases including PermissionRequiredError, RateLimitError, AdeliApiError with its 402 usage_limit_reached status, and TimeoutError, all while keeping exactOptionalPropertyTypes enabled so the CreatePostBody type union works correctly.
File edits
1 file
Writtensrc/publish.tsView changes
/sandbox/repo/src/publish.ts
Written content · previous contents were not recorded
import { AdeliApiError, PermissionRequiredError, RateLimitError, TimeoutError } from '@adeli/sdk';import { createAdeli, describeError } from './client.js';/*** The smallest real write: one text post to a connected X or Bluesky account.** This spends a metered "post" on your plan and publishes publicly, so it only* runs when you opt in twice:** ADELI_EXAMPLE_ACCOUNT_ID=<account uuid from `npm run quickstart`> \* ADELI_SEND_REAL_POST=yes \* npm run publish** For multi-platform or scheduled sends use `adeli.publications.createPublication`* with an `idempotencyKey` instead: `createPost` has no idempotency guarantee.*/async function main(): Promise<void> {const accountId = process.env.ADELI_EXAMPLE_ACCOUNT_ID;if (!accountId) throw new Error('set ADELI_EXAMPLE_ACCOUNT_ID to a connected x or bluesky account id');if (process.env.ADELI_SEND_REAL_POST !== 'yes') {console.log('dry run only. Re-run with ADELI_SEND_REAL_POST=yes to publish for real.');console.log(`would post to account ${accountId}`);return;}const adeli = createAdeli();const platform = process.env.ADELI_EXAMPLE_PLATFORM === 'bluesky' ? 'bluesky' : 'x';try {const { data, status } = await adeli.posts.createPost({body: {platform,accountId,text: 'Hello from the Adeli SDK example.',},});console.log(`published (${status}): ${JSON.stringify(data)}`);// X reads and posts are billed per API request by X and passed through by// Adeli. Costs are integer millionths of a USD; never round them early.if (platform === 'x') {const { data: xUsage } = await adeli.usage.getXUsage();console.log(`x usage ledger: ${xUsage.totalCostMicros} micros total`);}} catch (error) {if (error instanceof PermissionRequiredError) {console.error('account lacks permission; reconnect it with more scope, then retry');} else if (error instanceof RateLimitError) {console.error('rate limited; back off before retrying');} else if (error instanceof TimeoutError) {console.error('timed out: the post may or may not exist. Check before sending again.');} else if (error instanceof AdeliApiError) {// 402 usage_limit_reached means the plan's monthly allowance is exhausted.console.error(`api error ${error.status} ${error.code}: ${error.message}`);} else {console.error(describeError(error));}process.exitCode = 1;}}main().catch((error: unknown) => {console.error(`publish failed: ${describeError(error)}`);process.exitCode = 1;});
Source: write · chatcmpl-tool-9a84851239c1c54d
Recorded tool call
{
"type": "tool_call",
"seq": 115,
"ts": "2026-11-18T20:11:31.039Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/src/publish.ts",
"content": "import { AdeliApiError, PermissionRequiredError, RateLimitError, TimeoutError } from '@adeli/sdk';\nimport { createAdeli, describeError } from './client.js';\n\n/**\n * The smallest real write: one text post to a connected X or Bluesky account.\n *\n * This spends a metered \"post\" on your plan and publishes publicly, so it only\n * runs when you opt in twice:\n *\n * ADELI_EXAMPLE_ACCOUNT_ID=<account uuid from `npm run quickstart`> \\\n * ADELI_SEND_REAL_POST=yes \\\n * npm run publish\n *\n * For multi-platform or scheduled sends use `adeli.publications.createPublication`\n * with an `idempotencyKey` instead: `createPost` has no idempotency guarantee.\n */\nasync function main(): Promise<void> {\n const accountId = process.env.ADELI_EXAMPLE_ACCOUNT_ID;\n if (!accountId) throw new Error('set ADELI_EXAMPLE_ACCOUNT_ID to a connected x or bluesky account id');\n if (process.env.ADELI_SEND_REAL_POST !== 'yes') {\n console.log('dry run only. Re-run with ADELI_SEND_REAL_POST=yes to publish for real.');\n console.log(`would post to account ${accountId}`);\n return;\n }\n\n const adeli = createAdeli();\n const platform = process.env.ADELI_EXAMPLE_PLATFORM === 'bluesky' ? 'bluesky' : 'x';\n\n try {\n const { data, status } = await adeli.posts.createPost({\n body: {\n platform,\n accountId,\n text: 'Hello from the Adeli SDK example.',\n },\n });\n console.log(`published (${status}): ${JSON.stringify(data)}`);\n\n // X reads and posts are billed per API request by X and passed through by\n // Adeli. Costs are integer millionths of a USD; never round them early.\n if (platform === 'x') {\n const { data: xUsage } = await adeli.usage.getXUsage();\n console.log(`x usage ledger: ${xUsage.totalCostMicros} micros total`);\n }\n } catch (error) {\n if (error instanceof PermissionRequiredError) {\n console.error('account lacks permission; reconnect it with more scope, then retry');\n } else if (error instanceof RateLimitError) {\n console.error('rate limited; back off before retrying');\n } else if (error instanceof TimeoutError) {\n console.error('timed out: the post may or may not exist. Check before sending again.');\n } else if (error instanceof AdeliApiError) {\n // 402 usage_limit_reached means the plan's monthly allowance is exhausted.\n console.error(`api error ${error.status} ${error.code}: ${error.message}`);\n } else {\n console.error(describeError(error));\n }\n process.exitCode = 1;\n }\n}\n\nmain().catch((error: unknown) => {\n console.error(`publish failed: ${describeError(error)}`);\n process.exitCode = 1;\n});\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9a84851239c1c54d",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 117,
"ts": "2026-11-18T20:11:31.039Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 2626 bytes to /sandbox/repo/src/publish.ts",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9a84851239c1c54d",
"is_error": false,
"tool_kind": "file_edit"
}cd /tmp/adeli-sdk-main && python3 -c "
import json;d=json.load(open('openapi/adeli.openapi.json'))
print(json.dumps(d['paths']['/api/v1/usage/x']['get']['responses']['200']['content']['application/json']['schema'])[:900])
"{"type": "object", "properties": {"from": {"type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][0
{"type": "object", "properties": {"from": {"type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}, "to": {"type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}, "ratesAsOf": {"type": "string"}, "totalCostMicros": {"type": "number"}, "operations": {"type": "array", "items": {"type": "obj
Recorded tool call
{
"type": "tool_call",
"seq": 116,
"ts": "2026-11-18T20:11:31.039Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /tmp/adeli-sdk-main && python3 -c \"\nimport json;d=json.load(open('openapi/adeli.openapi.json'))\nprint(json.dumps(d['paths']['/api/v1/usage/x']['get']['responses']['200']['content']['application/json']['schema'])[:900])\n\""
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8fcfee8cfdbc8020",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 118,
"ts": "2026-11-18T20:11:31.500Z",
"turn": 1,
"output": {
"content": [
{
"text": "{\"type\": \"object\", \"properties\": {\"from\": {\"type\": \"string\", \"format\": \"date-time\", \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d(?:\\\\.\\\\d+)?(?:Z|([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)))$\"}, \"to\": {\"type\": \"string\", \"format\": \"date-time\", \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d(?:\\\\.\\\\d+)?(?:Z|([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)))$\"}, \"ratesAsOf\": {\"type\": \"string\"}, \"totalCostMicros\": {\"type\": \"number\"}, \"operations\": {\"type\": \"array\", \"items\": {\"type\": \"obj\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-8fcfee8cfdbc8020",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
I need to set up the package.json scripts and README, add .env to .gitignore, then typecheck everything. For running scripts, I'm checking if Node 22.9+ supports the --env-file-if-exists flag, and if not, I'll use tsx instead.
cd /sandbox/repo && node --env-file-if-exists=.env -e "console.log('flag ok')" 2>&1 | tail -2.env not found. Continuing without it.
.env not found. Continuing without it. flag ok
Recorded tool call
{
"type": "tool_call",
"seq": 121,
"ts": "2026-11-18T20:11:34.849Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && node --env-file-if-exists=.env -e \"console.log('flag ok')\" 2>&1 | tail -2"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-abe5eb07dbfe28ac",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 123,
"ts": "2026-11-18T20:11:34.849Z",
"turn": 1,
"output": {
"content": [
{
"text": ".env not found. Continuing without it.\nflag ok\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-abe5eb07dbfe28ac",
"is_error": false,
"tool_kind": "shell"
}cd /sandbox/repo && python3 - <<'EOF'
import json
p=json.load(open('package.json'))
p['name']='adeli-example'
p['version']='0.1.0'
p['private']=True
p['description']='Minimal read-only + one-post example for the Adeli hosted social media API (@adeli/sdk)'
p['type']='module'
p['scripts']={
'quickstart':'node --env-file-if-exists=.env --import tsx src/quickstart.ts',
'publish':'node --env-file-if-exists=.env --import tsx src/publish.ts',
'typecheck':'tsc --noEmit'
}
p.pop('main',None); p.pop('keywords',None); p.pop('author',None)
json.dump(p,open('package.json','w'),indent=2)
open('package.json','a').write('\n')
EOF
cat package.json; grep -q '^\.env$' .gitignore || printf '\n# Secrets\n.env\n' >> .gitignore; tail -4 .gitignore{
{
"name": "adeli-example",
"version": "0.1.0",
"description": "Minimal read-only + one-post example for the Adeli hosted social media API (@adeli/sdk)",
"scripts": {
"quickstart": "node --env-file-if-exists=.env --import tsx src/quickstart.ts",
"publish": "node --env-file-if-exists=.env --import tsx src/publish.ts",
"typecheck": "tsc --noEmit"
},
"license": "ISC",
"dependencies": {
"@adeli/sdk": "^0.7.0"
},
"devDependencies": {
"@types/node": "^26.6.6",
"tsx": "^4.23.15",
"typescript": "^7.0.2"
},
"private": true,
"type": "module"
}
.dart_tool/
# Secrets
.env
Recorded tool call
{
"type": "tool_call",
"seq": 122,
"ts": "2026-11-18T20:11:34.849Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && python3 - <<'EOF'\nimport json\np=json.load(open('package.json'))\np['name']='adeli-example'\np['version']='0.1.0'\np['private']=True\np['description']='Minimal read-only + one-post example for the Adeli hosted social media API (@adeli/sdk)'\np['type']='module'\np['scripts']={\n 'quickstart':'node --env-file-if-exists=.env --import tsx src/quickstart.ts',\n 'publish':'node --env-file-if-exists=.env --import tsx src/publish.ts',\n 'typecheck':'tsc --noEmit'\n}\np.pop('main',None); p.pop('keywords',None); p.pop('author',None)\njson.dump(p,open('package.json','w'),indent=2)\nopen('package.json','a').write('\\n')\nEOF\ncat package.json; grep -q '^\\.env$' .gitignore || printf '\\n# Secrets\\n.env\\n' >> .gitignore; tail -4 .gitignore"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ae713b1852393a02",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 124,
"ts": "2026-11-18T20:11:34.849Z",
"turn": 1,
"output": {
"content": [
{
"text": "{\n \"name\": \"adeli-example\",\n \"version\": \"0.1.0\",\n \"description\": \"Minimal read-only + one-post example for the Adeli hosted social media API (@adeli/sdk)\",\n \"scripts\": {\n \"quickstart\": \"node --env-file-if-exists=.env --import tsx src/quickstart.ts\",\n \"publish\": \"node --env-file-if-exists=.env --import tsx src/publish.ts\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@adeli/sdk\": \"^0.7.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^26.6.6\",\n \"tsx\": \"^4.23.15\",\n \"typescript\": \"^7.0.2\"\n },\n \"private\": true,\n \"type\": \"module\"\n}\n.dart_tool/\n\n# Secrets\n.env\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ae713b1852393a02",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
typescript ^7.0.2? That's odd — TypeScript 7 (native port) maybe. Typecheck may behave. Run typecheck.
cd /sandbox/repo && timeout 300 npm run typecheck 2>&1 | tail -30
> adeli-example@0.1.0 typecheck
> adeli-example@0.1.0 typecheck > tsc --noEmit
Recorded tool call
{
"type": "tool_call",
"seq": 127,
"ts": "2026-11-18T20:11:36.988Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && timeout 300 npm run typecheck 2>&1 | tail -30"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ba1b5383adec7a4e",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 128,
"ts": "2026-11-18T20:11:36.988Z",
"turn": 1,
"output": {
"content": [
{
"text": "\n> adeli-example@0.1.0 typecheck\n> tsc --noEmit\n\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-ba1b5383adec7a4e",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Typecheck passes. Now run quickstart without key to show graceful failure, and run publish dry-run path. Also test with a fake key to confirm live API reachable (401 handling).
cd /sandbox/repo && timeout 60 npm run quickstart 2>&1 | tail -5; echo "=== with bogus key ==="; ADELI_API_KEY=adeli_test_not_a_real_key timeout 60 npm run quickstart 2>&1 | tail -5
> adeli-example@0.1.0 quickstart
> adeli-example@0.1.0 quickstart > node --env-file-if-exists=.env --import tsx src/quickstart.ts .env not found. Continuing without it. quickstart failed: Error | ADELI_API_KEY is missing or invalid. Copy .env.example to .env and paste a key from https://app.tryadeli.com === with bogus key === > adeli-example@0.1.0 quickstart > node --env-file-if-exists=.env --import tsx src/quickstart.ts .env not found. Continuing without it. quickstart failed: AuthenticationError | HTTP 401 | unauthorized | A valid Bearer API key is required
Recorded tool call
{
"type": "tool_call",
"seq": 131,
"ts": "2026-11-18T20:11:39.874Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && timeout 60 npm run quickstart 2>&1 | tail -5; echo \"=== with bogus key ===\"; ADELI_API_KEY=adeli_test_not_a_real_key timeout 60 npm run quickstart 2>&1 | tail -5"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9da1b8849c60459a",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 134,
"ts": "2026-11-18T20:11:40.788Z",
"turn": 1,
"output": {
"content": [
{
"text": "> adeli-example@0.1.0 quickstart\n> node --env-file-if-exists=.env --import tsx src/quickstart.ts\n\n.env not found. Continuing without it.\nquickstart failed: Error | ADELI_API_KEY is missing or invalid. Copy .env.example to .env and paste a key from https://app.tryadeli.com\n=== with bogus key ===\n> adeli-example@0.1.0 quickstart\n> node --env-file-if-exists=.env --import tsx src/quickstart.ts\n\n.env not found. Continuing without it.\nquickstart failed: AuthenticationError | HTTP 401 | unauthorized | A valid Bearer API key is required\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-9da1b8849c60459a",
"is_error": false,
"tool_kind": "shell"
}cd /sandbox/repo && ADELI_EXAMPLE_ACCOUNT_ID=00000000-0000-0000-0000-000000000000 timeout 60 npm run publish 2>&1 | tail -4; echo "=== no id ==="; timeout 60 npm run publish 2>&1 | tail -3
.env not found. Continuing without it.
.env not found. Continuing without it. dry run only. Re-run with ADELI_SEND_REAL_POST=yes to publish for real. would post to account 00000000-0000-0000-0000-000000000000 === no id === .env not found. Continuing without it. publish failed: Error | set ADELI_EXAMPLE_ACCOUNT_ID to a connected x or bluesky account id
Recorded tool call
{
"type": "tool_call",
"seq": 132,
"ts": "2026-11-18T20:11:39.874Z",
"name": "bash",
"turn": 1,
"input": {
"command": "cd /sandbox/repo && ADELI_EXAMPLE_ACCOUNT_ID=00000000-0000-0000-0000-000000000000 timeout 60 npm run publish 2>&1 | tail -4; echo \"=== no id ===\"; timeout 60 npm run publish 2>&1 | tail -3"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-992535db07019814",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 133,
"ts": "2026-11-18T20:11:40.357Z",
"turn": 1,
"output": {
"content": [
{
"text": "\n.env not found. Continuing without it.\ndry run only. Re-run with ADELI_SEND_REAL_POST=yes to publish for real.\nwould post to account 00000000-0000-0000-0000-000000000000\n=== no id ===\n\n.env not found. Continuing without it.\npublish failed: Error | set ADELI_EXAMPLE_ACCOUNT_ID to a connected x or bluesky account id\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-992535db07019814",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
All working end-to-end against the hosted API (401 proves live connectivity). Blocked only on a real API key.
Write README with pricing + manageability assessment.
Also note quickstart.ts uses me.data.apiKey.prefix — verified via typecheck.
Write README.md.
File edits
1 file
WrittenREADME.mdView changes
/sandbox/repo/README.md
Written content · previous contents were not recorded
# Adeli exampleMinimal TypeScript example against **Adeli** (hosted unified social media + ads API,https://www.tryadeli.com) using the official SDK [`@adeli/sdk`](https://www.npmjs.com/package/@adeli/sdk).Everything talks to the hosted API at `https://app.tryadeli.com`. No local services,no docker, no tunnels.## Files| File | What it does | Writes? || --- | --- | --- || `src/client.ts` | Builds the `Adeli` client from `ADELI_API_KEY`; safe error rendering | no || `src/quickstart.ts` | `getMe` → profiles → connected accounts → this month's usage | no (reads only) || `src/publish.ts` | One text post to X or Bluesky, double-gated behind env vars | yes, if you opt in |## Run it```shnpm installcp .env.example .env # paste your key from https://app.tryadeli.comnpm run quickstart # read-only: profiles, accounts, usagenpm run typecheck```Publishing a real post (spends one metered post, is publicly visible):```shADELI_EXAMPLE_ACCOUNT_ID=<uuid from quickstart> npm run publish # dry runADELI_EXAMPLE_ACCOUNT_ID=<uuid> ADELI_SEND_REAL_POST=yes npm run publish```Without a key, `quickstart` exits 1 with a clear message; with a bad key it surfacesthe API's `401 unauthorized` through the SDK's typed `AuthenticationError`.## How pricing worksSource: https://www.tryadeli.com/pricing (checked 2026). Plans are monthly, or annualwith ~2 months free.| Plan | Price | Profiles | Accounts/profile | Sends || --- | --- | --- | --- | --- || Free | $0, no card | 2 | 2 | one-time 10 posts, 100 comments, 100 messages || Starter | $25/mo ($300/yr) | 10, then $2.50 per extra profile/mo | 5 | 10,000 posts + 10,000 comments + 10,000 messages/mo || Business | $125/mo ($1,500/yr) | 100, then $1.50 per extra profile/mo | all platforms | unlimited, fair use || Enterprise | volume | custom | custom | custom |Rules that matter in code:- **A profile = one of your users**; it holds the social accounts that user connects.Extra profiles are **billed by the day** — a profile counts on each day it has atleast one connected account, so 10 active days ≈ 1/3 of a month.- **Only sends are metered.** Posts, comments and messages you *send* count; **readsnever count** (that's why `src/quickstart.ts` is free to run). One post to 3 accountscounts as 3 posts.- Hitting a limit returns **`402 usage_limit_reached`** — handled in `src/publish.ts`.- **Free-plan limits:** every platform except X, WhatsApp and Bluesky. Analytics, X,WhatsApp and Bluesky require a paid plan.- **X is pass-through:** X charges per API request and Adeli passes it through at X'spublished rates with no markup. `adeli.usage.getXUsage()` returns that ledger;`totalCostMicros` and `operations[].costMicros` are integer **millionths of a USD** —keep them as integers, don't round early.- **Check your own numbers in code:** `adeli.usage.getUsage()` returns `posts`,`comments`, `messages` as `{ used, limit }` (`limit: null` = unlimited on a paid plan),plus `period`, `resetsAt` and `enforced`.- Unlimited team members on every plan.## Is this product easy for an agent like me to manage?**Yes, unusually so** — with one hard gate.Easy:- Zero-dependency SDK, types generated from the OpenAPI contract, ESM + CJS, runs onNode 22+, Vercel functions and Cloudflare Workers. `npm install` and it works.- Fully hosted: no local stack, no emulator, no long-running process. A read-only callreturns in about a second, so verification loops are cheap.- Predictable API surface: every call resolves to `{ data, status, headers }`, named`{ path, query, body }` args, and a typed error class per failure mode(`AuthenticationError`, `ValidationError`, `PermissionRequiredError`, `RateLimitError`,`TimeoutError`, `ConfigurationError`, `NetworkError`, `MalformedResponseError`).- Retries are opt-in and the docs say which operations are safe to repeat; profile andpublication creation take an idempotency key, so a crash mid-publish is recoverable.Polling helpers are bounded (`intervalMs` + `timeoutMs`) — no hanging waits.- Partial results are explicit (`status: 'partial'` plus per-account `errors`), sodegraded states are visible instead of silently dropped.- Good docs in-repo (`docs/client.md`, `docs/publishing.md`) and an API referencegenerated from the same spec.Friction / things to watch:- **The blocker:** a real `ADELI_API_KEY` from `https://app.tryadeli.com` (signup, plusOAuth-connecting actual social accounts). I can't self-serve that, so anything pasttype-checking and the 401 path needs your key. Connecting accounts also requires ahuman OAuth redirect and, for Facebook/Meta Ads, page selection in a dashboard.- Writes are **public and irreversible-ish** on real accounts, and they spend meteredquota — hence the double gate in `src/publish.ts`. Ads operations spend real money andcreate objects that need explicit cleanup planning.- Platform-specific semantics leak through (TikTok `music_usage_confirmed`, YouTube`privacy_status`/`made_for_kids`, WhatsApp template approval, provider review queuesfor beta platforms). The SDK passes them faithfully; it doesn't shield you from them.- Version 0.7.0, so expect some churn; `docs/availability.md` tracks what's productionvs beta.
Source: write · chatcmpl-tool-84575e56daa1a23d
Recorded tool call
{
"type": "tool_call",
"seq": 137,
"ts": "2026-11-18T20:11:50.621Z",
"name": "write",
"turn": 1,
"input": {
"path": "/sandbox/repo/README.md",
"content": "# Adeli example\n\nMinimal TypeScript example against **Adeli** (hosted unified social media + ads API,\nhttps://www.tryadeli.com) using the official SDK [`@adeli/sdk`](https://www.npmjs.com/package/@adeli/sdk).\n\nEverything talks to the hosted API at `https://app.tryadeli.com`. No local services,\nno docker, no tunnels.\n\n## Files\n\n| File | What it does | Writes? |\n| --- | --- | --- |\n| `src/client.ts` | Builds the `Adeli` client from `ADELI_API_KEY`; safe error rendering | no |\n| `src/quickstart.ts` | `getMe` → profiles → connected accounts → this month's usage | no (reads only) |\n| `src/publish.ts` | One text post to X or Bluesky, double-gated behind env vars | yes, if you opt in |\n\n## Run it\n\n```sh\nnpm install\ncp .env.example .env # paste your key from https://app.tryadeli.com\nnpm run quickstart # read-only: profiles, accounts, usage\nnpm run typecheck\n```\n\nPublishing a real post (spends one metered post, is publicly visible):\n\n```sh\nADELI_EXAMPLE_ACCOUNT_ID=<uuid from quickstart> npm run publish # dry run\nADELI_EXAMPLE_ACCOUNT_ID=<uuid> ADELI_SEND_REAL_POST=yes npm run publish\n```\n\nWithout a key, `quickstart` exits 1 with a clear message; with a bad key it surfaces\nthe API's `401 unauthorized` through the SDK's typed `AuthenticationError`.\n\n## How pricing works\n\nSource: https://www.tryadeli.com/pricing (checked 2026). Plans are monthly, or annual\nwith ~2 months free.\n\n| Plan | Price | Profiles | Accounts/profile | Sends |\n| --- | --- | --- | --- | --- |\n| Free | $0, no card | 2 | 2 | one-time 10 posts, 100 comments, 100 messages |\n| Starter | $25/mo ($300/yr) | 10, then $2.50 per extra profile/mo | 5 | 10,000 posts + 10,000 comments + 10,000 messages/mo |\n| Business | $125/mo ($1,500/yr) | 100, then $1.50 per extra profile/mo | all platforms | unlimited, fair use |\n| Enterprise | volume | custom | custom | custom |\n\nRules that matter in code:\n\n- **A profile = one of your users**; it holds the social accounts that user connects.\n Extra profiles are **billed by the day** — a profile counts on each day it has at\n least one connected account, so 10 active days ≈ 1/3 of a month.\n- **Only sends are metered.** Posts, comments and messages you *send* count; **reads\n never count** (that's why `src/quickstart.ts` is free to run). One post to 3 accounts\n counts as 3 posts.\n- Hitting a limit returns **`402 usage_limit_reached`** — handled in `src/publish.ts`.\n- **Free-plan limits:** every platform except X, WhatsApp and Bluesky. Analytics, X,\n WhatsApp and Bluesky require a paid plan.\n- **X is pass-through:** X charges per API request and Adeli passes it through at X's\n published rates with no markup. `adeli.usage.getXUsage()` returns that ledger;\n `totalCostMicros` and `operations[].costMicros` are integer **millionths of a USD** —\n keep them as integers, don't round early.\n- **Check your own numbers in code:** `adeli.usage.getUsage()` returns `posts`,\n `comments`, `messages` as `{ used, limit }` (`limit: null` = unlimited on a paid plan),\n plus `period`, `resetsAt` and `enforced`.\n- Unlimited team members on every plan.\n\n## Is this product easy for an agent like me to manage?\n\n**Yes, unusually so** — with one hard gate.\n\nEasy:\n- Zero-dependency SDK, types generated from the OpenAPI contract, ESM + CJS, runs on\n Node 22+, Vercel functions and Cloudflare Workers. `npm install` and it works.\n- Fully hosted: no local stack, no emulator, no long-running process. A read-only call\n returns in about a second, so verification loops are cheap.\n- Predictable API surface: every call resolves to `{ data, status, headers }`, named\n `{ path, query, body }` args, and a typed error class per failure mode\n (`AuthenticationError`, `ValidationError`, `PermissionRequiredError`, `RateLimitError`,\n `TimeoutError`, `ConfigurationError`, `NetworkError`, `MalformedResponseError`).\n- Retries are opt-in and the docs say which operations are safe to repeat; profile and\n publication creation take an idempotency key, so a crash mid-publish is recoverable.\n Polling helpers are bounded (`intervalMs` + `timeoutMs`) — no hanging waits.\n- Partial results are explicit (`status: 'partial'` plus per-account `errors`), so\n degraded states are visible instead of silently dropped.\n- Good docs in-repo (`docs/client.md`, `docs/publishing.md`) and an API reference\n generated from the same spec.\n\nFriction / things to watch:\n- **The blocker:** a real `ADELI_API_KEY` from `https://app.tryadeli.com` (signup, plus\n OAuth-connecting actual social accounts). I can't self-serve that, so anything past\n type-checking and the 401 path needs your key. Connecting accounts also requires a\n human OAuth redirect and, for Facebook/Meta Ads, page selection in a dashboard.\n- Writes are **public and irreversible-ish** on real accounts, and they spend metered\n quota — hence the double gate in `src/publish.ts`. Ads operations spend real money and\n create objects that need explicit cleanup planning.\n- Platform-specific semantics leak through (TikTok `music_usage_confirmed`, YouTube\n `privacy_status`/`made_for_kids`, WhatsApp template approval, provider review queues\n for beta platforms). The SDK passes them faithfully; it doesn't shield you from them.\n- Version 0.7.0, so expect some churn; `docs/availability.md` tracks what's production\n vs beta.\n"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-84575e56daa1a23d",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 138,
"ts": "2026-11-18T20:11:50.621Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully wrote 5308 bytes to /sandbox/repo/README.md",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-84575e56daa1a23d",
"is_error": false,
"tool_kind": "file_edit"
}›Thinking…
Check "checked 2026" date claim — I don't know current date. Check env/date.
date -u +%F; cd /sandbox/repo && ls -R src && timeout 120 npm run typecheck 2>&1 | tail -3
2026-11-18
2026-11-18 src: client.ts publish.ts quickstart.ts > adeli-example@0.1.0 typecheck > tsc --noEmit
Recorded tool call
{
"type": "tool_call",
"seq": 141,
"ts": "2026-11-18T20:11:52.360Z",
"name": "bash",
"turn": 1,
"input": {
"command": "date -u +%F; cd /sandbox/repo && ls -R src && timeout 120 npm run typecheck 2>&1 | tail -3"
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a432c8eb79c096c2",
"tool_kind": "shell"
}Recorded tool result
{
"type": "tool_result",
"seq": 142,
"ts": "2026-11-18T20:11:52.793Z",
"turn": 1,
"output": {
"content": [
{
"text": "2026-11-18\nsrc:\nclient.ts\npublish.ts\nquickstart.ts\n> adeli-example@0.1.0 typecheck\n> tsc --noEmit\n\n",
"type": "text"
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-a432c8eb79c096c2",
"is_error": false,
"tool_kind": "shell"
}›Thinking…
Date 2026-11-18, so "checked 2026" is fine — make it precise: "(checked 2026-11-18)".
Final summary.
File edits
1 file
ModifiedREADME.md+1−1View changes
/sandbox/repo/README.md
Replacement excerpt
-Source: https://www.tryadeli.com/pricing (checked 2026).+Source: https://www.tryadeli.com/pricing (checked 2026-11-18).
Source: edit · chatcmpl-tool-878c7688e3ec8844
Recorded tool call
{
"type": "tool_call",
"seq": 145,
"ts": "2026-11-18T20:11:56.673Z",
"name": "edit",
"turn": 1,
"input": {
"path": "/sandbox/repo/README.md",
"edits": [
{
"newText": "Source: https://www.tryadeli.com/pricing (checked 2026-11-18).",
"oldText": "Source: https://www.tryadeli.com/pricing (checked 2026)."
}
]
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-878c7688e3ec8844",
"tool_kind": "file_edit"
}Recorded tool result
{
"type": "tool_result",
"seq": 146,
"ts": "2026-11-18T20:11:56.673Z",
"turn": 1,
"output": {
"content": [
{
"text": "Successfully replaced 1 block(s) in /sandbox/repo/README.md.",
"type": "text"
}
],
"details": {
"diff": " ...\n 34 the API's `401 unauthorized` through the SDK's typed `AuthenticationError`.\n 35 \n 36 ## How pricing works\n 37 \n- 38 Source: https://www.tryadeli.com/pricing (checked 2026). Plans are monthly, or annual\n+ 38 Source: https://www.tryadeli.com/pricing (checked 2026-11-18). Plans are monthly, or annual\n 39 with ~2 months free.\n 40 \n 41 | Plan | Price | Profiles | Accounts/profile | Sends |\n 42 | --- | --- | --- | --- | --- |\n ...",
"patch": "--- /sandbox/repo/README.md\n+++ /sandbox/repo/README.md\n@@ -34,9 +34,9 @@\n the API's `401 unauthorized` through the SDK's typed `AuthenticationError`.\n \n ## How pricing works\n \n-Source: https://www.tryadeli.com/pricing (checked 2026). Plans are monthly, or annual\n+Source: https://www.tryadeli.com/pricing (checked 2026-11-18). Plans are monthly, or annual\n with ~2 months free.\n \n | Plan | Price | Profiles | Accounts/profile | Sends |\n | --- | --- | --- | --- | --- |\n",
"firstChangedLine": 38
}
},
"run_id": "cmwmk2dce04yz0ixtgtzgdxq3",
"tool_id": "chatcmpl-tool-878c7688e3ec8844",
"is_error": false,
"tool_kind": "file_edit"
}›Thinking…
I think I've worked through the main points here.
Built and verified. Summary:
What Adeli is: hosted unified social media + ads API (https://app.tryadeli.com), official zero-dependency TS SDK @adeli/sdk@0.7.0. There is a real developer workflow — no local stack, no tunnels, no long-running processes needed.
Files in /sandbox/repo:
src/client.ts— client factory fromADELI_API_KEY, secret-safe error renderingsrc/quickstart.ts— read-only:getMe→ profiles → connected accounts → monthly usage (usage.getUsage())src/publish.ts— one text post to X/Bluesky, double-gated (ADELI_EXAMPLE_ACCOUNT_ID+ADELI_SEND_REAL_POST=yes), with typed error handling incl.402 usage_limit_reachedand the X micro-dollar ledgerREADME.md,tsconfig.json,.env.example,.gitignore(+.env), npm scripts
Verified: npm install clean, npm run typecheck passes, npm run quickstart fails clearly with no key, and with a bogus key hits the live API and returns typed AuthenticationError | HTTP 401. npm run publish dry-runs correctly. Nothing long-running started.
Pricing (from tryadeli.com/pricing, 2026-11-18): Free $0 (2 profiles × 2 accounts, one-time 10 posts/100 comments/100 messages); Starter $25/mo or $300/yr (10 profiles +$2.50 each, 5 accounts/profile, 10k posts/comments/messages per month); Business $125/mo or $1,500/yr (100 profiles +$1.50 each, all platforms, unlimited under fair use); Enterprise volume. Key mechanics: only sends are metered (reads free; a post to 3 accounts = 3 posts), extra profiles billed by the day they have ≥1 connected account, free plan excludes X/WhatsApp/Bluesky, and X costs are passed through at X's published rates in integer microdollars.
Manageability: easy — fully hosted, fast read-only verification, generated types, {data,status,headers} responses, typed errors per failure mode, opt-in retries with idempotency keys, bounded polling, explicit partial results.
Blocked on one thing: a real ADELI_API_KEY (signup + human OAuth to connect actual social accounts). I can't self-serve that, so anything beyond type-checking and the 401 path needs your key.
AX Fundamentals
23 checks. Open an area for details.
This check is a quick preview. Test more tasks and models with Gauge Agents.
Test your product with Gauge Agents