# Configure the embedding API (replace with your actual API key) os.environ["GOOGLE_API_KEY"] = "your_api_key_here" genai.configure(api_key=os.getenv("GOOGLE_API_KEY")) # Test the embedding API result = genai.embed_content( model="models/text-embedding-004", content="What is the meaning of life?", task_type="retrieval_document", title="Embedding of single string" ) # Print a portion of the embedding vector print(str(result['embedding'])[:50], '... TRIMMED]')