Skip to main content
SDKs are in very early alpha: We’re working as hard as we can to get them into a stable state. Please bear with us as we iterate rapidly.

Installation

Install the SDK using your preferred package manager:
npm install @phaseo/sdk
pnpm add @phaseo/sdk
yarn add @phaseo/sdk

Requirements

  • Node.js 18+
  • TypeScript 4.5+ (for type definitions)

Setup

API Key

You’ll need A Phaseo API key to use the SDK. Get one from Gateway Keys.

Environment Variables

Set your API key as an environment variable:
export PHASEO_API_KEY="phaseo_v1_sk_<kid>_<secret>"

Basic Usage

import Phaseo from "@phaseo/sdk";

// Initialize the client
const client = new Phaseo({
	apiKey: process.env.PHASEO_API_KEY!,
});

// Make your first request
const response = await client.generateText({
	model: "openai/gpt-4o-mini",
	messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);

Next Steps

Last modified on July 9, 2026