Skip to content

TypeScript SDK

Welcome to the Synthetic Users TypeScript/JavaScript SDK documentation.

Overview

The TypeScript SDK provides a type-safe way to interact with the Synthetic Users API from your TypeScript and JavaScript applications.

Features

  • Full TypeScript support with type definitions
  • Works in Node.js and browser environments
  • Promise-based API
  • Tree-shakeable for smaller bundle sizes
  • Automatic retries and rate limiting

Common Tasks

Quick access to the most frequently used SDK methods.

🚀 Getting Started

Essential methods to begin your research:

🔬 Running Research

Conduct interviews and gather insights:

📊 Generating Insights

Analyze data and extract patterns:

📄 Reports & Export

Create professional documents:

📁 File Management

Upload context and monitor progress:

Requirements

  • Node.js 16 or higher
  • TypeScript 4.5 or higher (for TypeScript projects)

Authentication

The Synthetic Users API uses Bearer token authentication (HTTPBearer). You need to provide a valid access token when making API requests.

typescript
import { createConfiguration, Configuration } from '@syntheticusers/sdk'

const configuration: Configuration = createConfiguration({
  baseServer: 'https://api.syntheticusers.com',
  authMethods: {
    HTTPBearer: {
      tokenProvider: {
        getToken: () => 'your-access-token'
      }
    }
  }
})

For more details, see the Authentication Guide.

Released under the MIT License.