> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/de/clis/cli-embedding-spaces.md).

# CLI: Embedding Spaces

Unitlab-CLI für Embedding Spaces: im Terminal Spaces erstellen, Vektoren aus JSONL hochladen und nach ähnlichen Dateien oder Video-Frames suchen.

```bash
SPACE_ID=$(unitlab embeddings create clip-vit-b32 --dimensions 512 \
  --model-name openai/clip-vit-base-patch32 --json | jq -r .id)

unitlab embeddings upload "$SPACE_ID" vectors.jsonl
unitlab embeddings upsert "$SPACE_ID" "$ASSET_ID" --vector-file vector.json
unitlab embeddings search "$SPACE_ID" --vector-file query.json --limit 20 --level asset --json

unitlab embeddings list
unitlab embeddings detail "$SPACE_ID"
unitlab embeddings delete "$SPACE_ID" --yes
```

## Dateiformate <a href="#file-formats" id="file-formats"></a>

| Datei              | Format                                                                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
| `--vector-file`    | Ein JSON-Array aus Zahlen: `[0.12, -0.04, ...]`                                                               |
| JSONL für `upload` | Ein Objekt pro Zeile: `{"asset_id": "...", "vector": [...], "frame_index": 120}`. `frame_index` ist optional. |

`upload` sendet 1.000 Zeilen pro Anfrage. `search` akzeptiert `--project`, um Treffer auf ein Projekt zu beschränken, und `--level frame` für einen Treffer pro Video-Frame.

## Verwandte Themen <a href="#related" id="related"></a>

[Embedding Spaces](https://docs.unitlab.ai/api-sdk-cli/de/sdks/embedding-spaces.md) · [Vektoren schreiben und suchen](https://docs.unitlab.ai/api-sdk-cli/de/sdks/upsert-and-search-vectors.md)
