@everyfeed/sdk
v0.1.0
Published
Type-safe TypeScript client for the EveryFeed Public API.
Maintainers
Readme
@everyfeed/sdk
Type-safe ESM client for the EveryFeed Public API. Node.js 22 or newer is required.
npm install @everyfeed/sdkimport { EveryFeedClient } from "@everyfeed/sdk";
const everyfeed = new EveryFeedClient({
baseUrl: "https://api.everyfeed.app",
token: process.env.EVERYFEED_API_TOKEN!,
});
const connection = await everyfeed.connections.start("linkedin", {
redirectUrl: "https://app.everyfeed.app/app/settings",
timezone: "Europe/Istanbul",
});
console.log(connection.data.url);The token option accepts either an organization API token with the evf_
prefix or a Public API-audience OAuth access token with the evfo_at_ prefix.
OAuth refresh tokens, authorization codes, and client secrets are not accepted.
Custom credential providers use a retry-safe second step:
const custom = await everyfeed.connections.connectCustom(
"wordpress",
{
credentials: {
password: process.env.WORDPRESS_APPLICATION_PASSWORD!,
url: "https://blog.example.com",
username: "everyfeed",
},
},
{ idempotencyKey: crypto.randomUUID() },
);For OAuth providers that require an account or page choice after the callback:
const connectionId = "PENDING_CONNECTION_UUID";
const pending = await everyfeed.connections.selectionOptions(connectionId);
const refreshed = await everyfeed.connections.refreshSelectionOptions(
connectionId,
{ idempotencyKey: crypto.randomUUID() },
);
await everyfeed.connections.selectOption(
connectionId,
{ selectionId: refreshed.data.selectionOptions![0]!.id },
{ idempotencyKey: crypto.randomUUID() },
);Writes that can create, update, or delete resources accept an idempotency key:
const image = await everyfeed.media.generateImage(
{
enhancePrompt: true,
prompt: "A clean product launch illustration",
style: "Minimalist",
},
{ idempotencyKey: crypto.randomUUID() },
);AI images use the Postiz-compatible fixed square pipeline. Set
enhancePrompt: true to expand the prompt with GPT-4.1. Selecting any SDK
EveryFeedAiImageStyle also enables enhancement before
chatgpt-image-latest generates the image.
AI video creation accepts up to three image references. Read
everyfeed.media.listVideoProviders() first when building a dynamic client:
await everyfeed.media.createVideo(
{
prompt: "A short vertical product reveal",
referenceImages: [
{ file: campaignHeroBlob, fileName: "campaign-hero.png" },
{ file: productBlob, fileName: "product.png" },
],
seconds: 8,
},
{ idempotencyKey: crypto.randomUUID() },
);See the repository's docs/public-api.md for endpoints, scopes, pagination,
media upload, and asynchronous video-generation examples.
License
MIT
