> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.sophra.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with Sophra in minutes

# Quickstart Guide

Get up and running with Sophra quickly by following these steps.

## Prerequisites

* Node.js 16 or higher
* A Sophra API key

## Installation

```bash theme={null}
npm install @sophra/core
```

## Basic Setup

1. Initialize the Sophra client:

```typescript theme={null}
import { SophraClient } from '@sophra/core';

const client = new SophraClient({
  apiKey: process.env.SOPHRA_API_KEY
});
```

2. Configure your first document index:

```typescript theme={null}
await client.documents.createIndex({
  name: 'my-first-index',
  settings: {
    language: 'en',
    vectorization: true
  }
});
```

## Core Features

### Document Processing

```typescript theme={null}
// Index a document
const document = await client.documents.create({
  index: 'my-first-index',
  content: 'This is a sample document for testing.',
  metadata: {
    title: 'Sample Document',
    tags: ['test', 'example']
  }
});

// Search for documents
const results = await client.search.query({
  index: 'my-first-index',
  query: 'sample document',
  limit: 10
});
```

### Experimentation

```typescript theme={null}
// Create an A/B test
const experiment = await client.experiments.create({
  name: 'search-ranking-test',
  variants: ['default', 'semantic'],
  distribution: [0.5, 0.5]
});

// Track experiment results
await client.experiments.track({
  experimentId: experiment.id,
  variantId: 'semantic',
  metrics: {
    clickthrough: true,
    conversionTime: 1500
  }
});
```

## Next Steps

* Dive into our [Development Guide](/development) for detailed setup
* Explore the [API Reference](/api-reference) for comprehensive documentation
* Check out our [example repository](https://github.com/sophra-org/examples) for more use cases

Need help? Join our [GitHub Discussions](https://github.com/sophra-org/sophra/discussions) or email [support@sophra.org](mailto:support@sophra.org)

```
```
