Use Lytix to manage your evaluation and usage diretly with the OpenAI SDK. Gain access to models across providers and manage your usage and billing.Documentation Index
Fetch the complete documentation index at: https://docs.lytix.co/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Prerequisite First create a lytix account here
Create a Lytix API Key
Start by creating and noting down a lytix api key. See instructions hereUpdate your OpenAI SDK
With 2 lines you can start using Lytix to manage your evaluation and usage.🇪🇺 Note You will need to use
https://eu.api.lytix.co/proxy/v2/openai if you are in the EU region.Optional Fields
Optimodel supports a variety of optional parameters to help you get the best results.optimodel-py/@lytix/client package to use these parameters.
Guards
lytix-guards: Pass in a list of fallback models to use
Fallback Models
lytix-fallbackModels: Pass in a list of extra models to try if the primary model fails. This can be helpful in mitigating provider outages.
Speed Priority
lytix-speedPriority: Pass in a speed priority to use
low, optimodel will choose the cheapest possible model across all providers (for example if you have two providers bedrock and anthropic that both offer claude-3-opus, optimodel will choose the claude-3-opus model with the lowest price regardless of which provider is faster). If set to high, optimodel will choose the fastest possible model across all providers.
Provider
lytix-provider: Pass in a provider to use
SessionId
sessionId: A unique identifier for the session.
UserId
userId: A unique identifier for the user.
WorkflowName
workflowName: A unique identifier for the workflow. If this workflow does not exist, it will be created and can be viewed here
Passing in Images
Passing images to any model uses the OpenAIs syntax. Underneath we’ll convert the syntax for the model you’re using.claude-3-5-sonnet and pass the image in with no code changes.
Using Models From Other Providers
Beyond the models available on the OpenAI API, Lytix also supports a range of other models from different providers. Just add the credentials for the model/provider and you can start using them immediately.model field to the model you want to use.
Passing in Credentials
To pass in credentials for a provider, you can add the credentials to the headers. The following is a list of credentils you can pass in:mistralApiKey: The API key for the Mistral API.mistralCodeStralApiKey: The API key for the Mistral CodeStral API.openaiKey: The API key for the OpenAI API.anthropicApiKey: The API key for the Anthropic API.groqApiKey: The API key for the Groq API.togetherApiKey: The API key for the Together API.geminiApiKey: The API key for the Gemini API.
awsAccessKeyId: The access key for the AWS account.awsSecretKey: The secret access key for the AWS account.awsRegion: The session token for the AWS account.
Supported Models & Providers
You can see the list of up to date models and providers here and clicking “Available Models”.