The Utopian Labs TypeScript SDK provides convenient access to the Utopian Labs API from applications written in server-side TypeScript.
See the utopianlabs
API docs for Node.js.
Node 20 or higher.
Install the package with:
npm install utopianlabs
# or
yarn add utopianlabs
The package needs to be configured with your account's API key, which is available in the Utopian Labs API Keys page.
import { UtopianLabs } from "utopianlabs";
const utopianLabs = new UtopianLabs({ apiKey: "your-api-key" });
const run = await utopianLabs.agents.runs.create({
agent: "r1",
lead: {
company: {
website: "https://example.com",
},
},
});
console.log(run);
import { UtopianLabs } from "utopianlabs";
const utopianLabs = new UtopianLabs({ apiKey: "your-api-key" });
const runData = await utopianLabs.agents.runs.get({
id: "abc123",
});
console.log(runData);