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

# Infinity Embeddings

> Generate embeddings using self-hosted Infinity server

## Overview

Infinity is a high-performance self-hosted embedding server that supports various open-source models.

## Quick Start

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import embedding

result = embedding(
    input="Hello world",
    model="infinity/BAAI/bge-small-en-v1.5",
    api_base="http://localhost:7997"
)
print(f"Dimensions: {len(result.embeddings[0])}")
```

## CLI Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai embed "Hello world" --model infinity/BAAI/bge-small-en-v1.5
```

## Setup

1. Install and run Infinity server:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install infinity-emb
infinity_emb --model-name-or-path BAAI/bge-small-en-v1.5
```

2. Set environment variable:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export INFINITY_API_BASE="http://localhost:7997"
```

## Related

* [Embedding Providers Overview](/docs/embeddings/index)
* [vLLM Embeddings](/docs/embeddings/providers/vllm)
