Skip to main content
from google import genai
from google.genai import types

client = genai.Client(
    api_key='sk-xxxx',
    http_options=types.HttpOptions(
        base_url='https://api.siray.ai',
    ),
)

result = client.models.embed_content(
        model="google/gemini-embedding-001",
        contents=[
            "How do I get a driver's license/learner's permit?",
            "How long is my driver's license valid for?",
            "Driver's knowledge test study guide",
        ],
        config=types.EmbedContentConfig(task_type="SEMANTIC_SIMILARITY")
    )

print(result)