# Text embeddings with the API

Source: [Text embeddings with the API](<https://docs.gptunnel.ru/en/embedding/>)

<a id="_top"></a>
An embedding is a numerical vector that represents the meaning of a text. To find similar passages, compare vectors produced by the same model with the same number of dimensions.

<a id="base-url"></a>
## Base URL

All three models use `POST /v1/embeddings`. Send the model ID in `model`, the text in `input`, and your [API key](<https://docs.gptunnel.ru/en/#get-an-api-key>) in the `Authorization` header.

```text
https://gptunnel.ru/v1/embeddings
```

<a id="models"></a>
## Models

| Model | Vector size without `dimensions` | Set the size |
| --- | --- | --- |
| [text-embedding-3-small](<https://docs.gptunnel.ru/en/embedding/text-embedding-3-small/>) | 1536 | In the example, `dimensions: 1024` returns 1024 numbers. |
| [text-embedding-3-large](<https://docs.gptunnel.ru/en/embedding/text-embedding-3-large/>) | 3072 | In the example, `dimensions: 2048` returns 2048 numbers. |
| [text-embedding-ada-002](<https://docs.gptunnel.ru/en/embedding/embedding-ada-v2/>) | 1536 | Send text without `dimensions`. A request with `dimensions: 1024` returned HTTP 400. |

Choose a model before indexing. If you change models, regenerate your vectors for existing texts and search queries. Check available IDs in the [model catalog](<https://docs.gptunnel.ru/en/api/models/>).

If you want to upload and search documents without managing a vector store, use [RAG knowledge bases](<https://docs.gptunnel.ru/en/rag/>).
