Embeddings
Vector generation, indexing, and similarity search.
Generation only
http
POST /v1/embeddingsjson
{
"input": ["Premier texte", "Deuxieme texte"],
"model": null,
"routing_strategy": "auto"
}json
{
"embeddings": [[0.0123, -0.0456, ...], [0.0789, ...]],
"dimensions": 1536,
"model": "text-embedding-3-small",
"provider": "openai"
}Indexing
Generates the vector and stores it in your organization's vector index (pgvector), with free-form metadata.
http
POST /v1/embeddings/indexjson
{
"content": "IleAI est une plateforme unifiee d'acces a des modeles d'IA.",
"metadata": { "source": "faq", "id_interne": "42" }
}json
{ "id": "3f7a1c2e-..." }Indexing always forces
text-embedding-3-small (routing_strategy "manual"), regardless of the model used for your generations: everything touching the index must share the same vector dimension.Similarity search
http
POST /v1/embeddings/searchjson
{
"query": "Comment fonctionne le routage IA ?",
"top_k": 5
}json
{
"results": [
{
"id": "3f7a1c2e-...",
"content": "IleAI est une plateforme unifiee d'acces a des modeles d'IA.",
"metadata": { "source": "faq", "id_interne": "42" },
"model": "text-embedding-3-small",
"distance": 0.1834
}
]
}distance is a cosine distance — the closer to 0, the more relevant the result.
Providers
OpenAI, Google.