SDK-First

Integrate ObjectiveAI into your applications with the TypeScript SDK.

Get Started with the SDK

Install the package and start making requests in minutes.

npmGitHub

Install

bash
npm install objectiveai

Quick Start

typescript
import { ObjectiveAI, Functions } from "objectiveai";

const client = new ObjectiveAI({
  apiKey: process.env.OBJECTIVEAI_API_KEY,
});

// Browse available functions
const functions = await Functions.list(client);
console.log(functions.data);

// Execute a function with a profile
// const result = await Functions.Executions.create(
//   client,
//   { owner: "fn-owner", repository: "fn-repo" },
//   { owner: "profile-owner", repository: "profile-repo" },
//   { input: { text: "Hello world" }, from_cache: true, from_rng: true }
// );
// console.log(result.output);

You need an API key to make requests.

Get API Key