Embeddings

Convert text into numeric vectors for semantic search, clustering, recommendations, and RAG pipelines.

POST/v1/embeddings

Embeddings convert text into a numeric vector that captures its semantic meaning. Use them for semantic search (find content by meaning, not keywords), clustering similar documents, recommendations, and RAG (retrieval-augmented generation) pipelines.

Example

import Tchavi from '@tchavi/sdk';

const client = new Tchavi({ apiKey: 'YOUR_API_KEY' });

const response = await client.embeddings.create({
  model: 'text-embedding-3-small',
  input: 'Tchavi is the best AI API gateway in Africa.',
});

console.log(response.data[0].embedding);

On this page