Pico AI Homelab API
  • Pico AI Server for developers
  • Getting Started
  • Basics
    • Models API
    • Chat API
    • Embeddings API
    • Discover Pico AI Homelab servers using Bonjour
    • Custom URL scheme to open your chat app
Powered by GitBook
On this page
  • Supported models
  • OpenAI-compatible endpoint
  • Ollama-compatible endpoint
  1. Basics

Embeddings API

The embeddings API creates embeddings of one or more strings. Pico AI Server supports both OpenAI and Ollama compatible endpoints.

PreviousChat APINextDiscover Pico AI Homelab servers using Bonjour

Last updated 2 days ago

The embeddings API is available from Pico 1.1.12 and newer

Supported models

Unlike LLMs, embedding models are downloaded and loaded into memory dynamically when required. Pre-downloading and persistent caching of embedding models is neither necessary nor supported in Pico AI Server. Due to their compact size, embedding models can be efficiently retrieved on demand.

By default, embedding models are stored in <base-directory>/Embeddings as specified in the Models section of Settings.

Embedding models leverage the CoreML-based library. For more implementation details, refer to the project’s GitHub repository.

Name
Type

all-MiniLM-L6-v2

BERT

msmarco-bert-base-dot-v5

BERT

gte-base

BERT

bert-base-uncased

BERT

roberta-base

RoBERTa

xlm-roberta-base

XLM-RoBERTa

paraphrase-multilingual-mpnet-base-v2

XLM-RoBERTa

xlm-roberta-base-multilingual-en-ar-fr-de-es-tr-it

XLM-RoBERTa

clip-vit-base-patch16

CLIP

clip-vit-base-patch32

CLIP

clip-vit-large-patch14

CLIP

glove-twitter-25

Word2Vec

glove-twitter-50

Word2Vec

glove-twitter-100

Word2Vec

glove-twitter-200

Word2Vec

potion-base-2M

Model2Vec

potion-base-4M

Model2Vec

potion-base-8M

Model2Vec

potion-retrieval-32M

Model2Vec

potion-base-32M

Model2Vec

M2V_base_output

Model2Vec

M2V_base_output

Static

static-similarity-mrl-multilingual-v1

Static

OpenAI-compatible endpoint

Request

POST /v1/embeddings

Name
Type
Description

model

String

Name of the embeddings model, e.g. all-MiniLM-L6-v2

input

String or array of strings

String or strings to embed

encoding_format

Optional string

This property is ignored

user

Optional string

This property is ignored

Response

Name
Type
Description

model

String

Name of the embeddings model, e.g. all-MiniLM-L6-v2

object

String

Always list

data

Array of embedding objects

See embedding objects

Name
Type
Description

index

Integer

Index of the embedding

object

String

Always embedding

embedding

Array of floats

Embedding

Ollama-compatible endpoint

Request

POST /api/embed

Name
Type
Description

model

String

Name of the embeddings model, e.g. all-MiniLM-L6-v2

input

String or array of strings

String or strings to embed

Response

Name
Type
Description

model

String

The model used to generate the embeddings

embeddings

Array of array of floats

The generated embeddings

total_duration

Integer

Always nil

load_duration

Integer

Always nil

prompt_eval_count

Integer

Always nil

Swift-Embeddings