# Vectorization · Embeddings — neuraldeep.tech API

> One section of the machine-readable reference. All sections: https://neuraldeep.tech/llms.txt · everything in one file: https://neuraldeep.tech/llms-full.txt

Base URL: `https://api.neuraldeep.tech/v1`
Auth: `Authorization: Bearer $YOUR_KEY`

OpenAI-compatible `/v1/embeddings`. Accepts a string or an array of strings. The vector size depends on the model: 1024 for `e5-large` and `bge-m3`, larger for the others; the exact number is the length of `embedding` in the response.

```bash
curl https://api.neuraldeep.tech/v1/embeddings \
  -H "Authorization: Bearer $YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"e5-large","input":"hello world"}'
```

```bash
curl https://api.neuraldeep.tech/v1/embeddings \
  -H "Authorization: Bearer $YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"bge-m3","input":["text 1","text 2","text 3"]}'
```

```python
from openai import OpenAI
client = OpenAI(api_key="$YOUR_KEY", base_url="https://api.neuraldeep.tech/v1")
texts = ["first document", "second", "third"]
r = client.embeddings.create(model="bge-m3", input=texts)
vectors = [e.embedding for e in r.data]  # list[list[float]], dim=1024 for bge-m3
```

> For RAG — `e5-large` for queries/docs with the "query: " / "passage: " prefix. For accuracy — `bge-m3` (longer context).

**Some models require prefixes.** The server does not add them, the client writes them at the start of each text. Without a prefix you still get vectors, but retrieval on them is several times worse.

| model | query | document |
|---|---|---|
| `frida` | `search_query: …` | `search_document: …` |
| `e5-large` | `query: …` | `passage: …` |
| `qwen3-embedding-4b`, `qwen3-embedding-8b` | `Instruct: <task>\nQuery: …` | no prefix |

`frida` has other modes too: `paraphrase: ` for similarity and dedup, `categorize: ` for classification, `categorize_sentiment: ` and `categorize_topic: ` for sentiment and topics.

```bash
curl https://api.neuraldeep.tech/v1/embeddings \
  -H "Authorization: Bearer $YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"frida","input":["search_query: how do I get a refund","search_document: Refunds are requested in your account within 14 days"]}'
```

**Input limits.**

- All text in one request, summed over every `input` item, up to 105,600 characters (about 32,000 tokens). Beyond that: `400` with the `X-Window: vector-payload` header; split it into several requests. There is no separate cap on the number of items in the array.
- Keep each text within the model window: `frida` 512 tokens, `giga-embeddings` 4096, `bge-m3` and `qwen3-embedding-8b` 8192, `jina-embeddings-v4` and `qwen3-embedding-4b` 32,768.
- Embeddings and rerank have their own concurrency, separate from chat. Beyond it: `429` with `X-Window: vector-inflight` and `Retry-After`. Quotas are separate too; the remainder is in the `vector` block of [`GET /v1/limits`](https://neuraldeep.tech/docs/limits-api.md).
