Skip to main content

SDK Overview

Profy provides official SDKs for TypeScript and Python that wrap OAuth token management, billing event reporting, and AI model access — so you can focus on building your application.

Install

npm install @profy-ai/sdk
pip install profy-sdk

What Can You Build?

SaaS with Pay-per-Use

Report custom billing events when users trigger paid actions. Profy handles credit deduction.

AI-Powered Tools

Call AI models via OpenAI-compatible API with automatic token-based billing.

Expert Integration

Embed Profy Expert agents in your app for domain-specific AI capabilities.

Multi-Platform Apps

Build with TypeScript or Python, with contrib storage for Drizzle and SQLAlchemy.

Core Capabilities

CapabilityDescription
OAuth 2.0Authorization Code Flow with automatic token refresh
PER_USE BillingReport custom events with fixed pricing
METERED BillingAI model calls with token-based billing
Expert InvokeCall platform Experts via SSE streaming
Token ManagementAuto-refresh, expiry detection, contrib storage
Error HandlingTyped exceptions: AuthExpired, InsufficientBalance, InvalidEvent

Architecture

Get Started

Quickstart

Install the SDK and make your first API call in 5 minutes

Integration Tutorial

Complete end-to-end integration walkthrough