POST /products/
Request body
The product name
Detailed description of the product. This is used along with the name to generate the semantic embedding for search.
The product category (e.g., “Electronics”, “Clothing”, “Food”)
Response
Unique identifier for the created product
The product name
The product description
The product category
The embedding vector is generated automatically in the background and stored in the PostgreSQL database with pgvector extension. You don’t need to provide it in the request.
How embeddings work
When you create a product:- The system combines the product’s
nameanddescription - Sends the text to Google’s Gemini embedding model
- Receives a 3072-dimensional vector representation
- Stores the vector in the database for semantic search