Client Setup
If you are setting up a new integration, start in the product at AI Platform -> Setup first. It will give you the current organizationId, a copyable access token, API key creation, and verification before you paste SDK code.
import { PromptOrchestraClient } from "@prompt-orchestra/sdk";
const client = new PromptOrchestraClient({
baseUrl: "https://your-api.example.com",
accessToken: process.env.PROMPT_ORCHESTRA_ACCESS_TOKEN!,
});
const verification = await client.setup.verify({
organizationId: process.env.PROMPT_ORCHESTRA_ORG_ID!,
});
Optional fetch override for tests or edge runtimes. The SDK is ESM-first and expects Node 18+ or another runtime with fetch.
baseUrl should be the origin of saas-ai-api (no trailing / required). Paths are resolved with new URL(path, baseUrl) in buildUrl (core/http.ts).
client.setup.verify(...) is the quickest stable check that your token, org access, and SDK-facing route path are all valid before you start building.