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

# Einbettungen (AI SDK)

> Erzeuge Embeddings mit Phaseo-Providermodellen in Vercel AI SDK.

Verwende `phaseo.textEmbeddingModel(...)` (oder `embeddingModel`) mit `embed` und `embedMany`.

```ts theme={null}
import { phaseo } from "@phaseo/ai-sdk-provider";
import { embed, embedMany } from "ai";

const single = await embed({
  model: phaseo.textEmbeddingModel("google/gemini-embedding-001"),
  value: "Embeddings power semantic search.",
});

console.log(single.embedding.length);

const batch = await embedMany({
  model: phaseo.textEmbeddingModel("google/gemini-embedding-001"),
  values: ["pricing", "latency", "quality"],
});

console.log(batch.embeddings.length);
```

## Hinweise

* Verwende für Query- und Corpus-Embeddings dieselbe Modellversion.
* Normalisiere Vektoren vor der Ähnlichkeitsbewertung einheitlich.
* Speichere stabile Embeddings für wiederkehrende Inhalte im Cache.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.