---
title: "jade-mole-4"
description: "Embeddings model for search, retrieval, and clustering"
---

`jade-mole-4` is Liutong's embeddings model. It converts text into high-dimensional vector representations suitable for semantic search, clustering, classification, and retrieval-augmented generation (RAG).

## Capabilities

- Semantic text similarity
- Document search and retrieval
- Clustering and classification
- RAG (Retrieval-Augmented Generation) pipelines

## API usage

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.liutong.llby.org/v1",
    api_key="lt_your_api_key",
)

response = client.embeddings.create(
    model="jade-mole-4",
    input="Liutong provides affordable LLM inference.",
)

embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")
```

### Batch embeddings

```python
response = client.embeddings.create(
    model="jade-mole-4",
    input=[
        "First document to embed.",
        "Second document to embed.",
        "Third document to embed.",
    ],
)

for item in response.data:
    print(f"Index {item.index}: {len(item.embedding)} dimensions")
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `model` | string | Must be `jade-mole-4`. |
| `input` | string or array | The text(s) to embed. |
| `encoding_format` | string | Optional. `float` (default) or `base64`. |

## Endpoint

`POST /v1/embeddings`

See the full [Embeddings API reference](/docs/api-reference/embeddings).
