Use this file to discover all available pages before exploring further.
The run_embedding() method generates text embeddings using OpenAI, Google, or Amazon Bedrock embedding models. Like run_local(), embedding requests go directly to the provider via LiteLLM and traces are sent to Tracia asynchronously in the background.
from tracia import Traciaclient = Tracia(api_key="tr_your_api_key")result = client.run_embedding( model="text-embedding-3-small", input="What is the meaning of life?",)print(len(result.embeddings[0].values)) # 1536
Calls the provider via LiteLLM - Your embedding request goes to OpenAI, Google, or Amazon Bedrock through LiteLLM. Tracia is not in the request path.
Sends the trace asynchronously - After the provider responds, trace data is sent to Tracia in the background. This is non-blocking and adds zero latency to your application.
Embedding spans appear in the Tracia dashboard with the EMBEDDING span kind, so you can track embedding usage, latency, and costs alongside your LLM completions.