Create embeddings for the given input text(s).This endpoint creates vector embeddings, typically for the purpose of “RAG” (Retrieval Augemented Generation) storage. It automatically manages sessions and routes requests to the appropriate embedding model.
When using the interactive playground, it may show "input": {} - ignore this and manually edit the generated cURL command to use either a string "text" or array ["text1", "text2"] format.
import openaiclient = openai.OpenAI( api_key="sk-xxxxxx", base_url="https://api.mor.org/api/v1")response = client.embeddings.create( model="text-embedding-model", input="The quick brown fox jumps over the lazy dog")print(response.data[0].embedding)