AiHubMix embedding models efficiently convert text or document content into searchable vector data, widely used in RAG Q&A systems and intelligent customer support. Whether for plain text or full documents, you can generate embeddings with a single call to significantly improve semantic processing.
Copy
from openai import OpenAIimport osclient = OpenAI( api_key="sk-***", # Replace with the key you generated in the AIHUBMIX dashboard base_url="https://aihubmix.com/v1")response = client.embeddings.create( input="Your text string goes here", model="gemini-embedding-001")print(response.data[0].embedding)