> ## 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.

# Embeddings (AI SDK)

> Create embeddings with Phaseo provider models in Vercel AI SDK.

Use `phaseo.textEmbeddingModel(...)` (or `embeddingModel`) with `embed` and `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);
```

## Notes

* Keep query and corpus embeddings on the same model version.
* Normalize vectors consistently before similarity scoring.
* Cache stable embeddings for repeated content.
