If you are utilizing an OpenAI compatible endpoint, you can conveniently log
your requests to Helicone by modifying the base URL from
-
https://oai.helicone.ai/v1
to any of the following supported dedicated
endpoints:
-
https://together.helicone.ai/v1
Are you using another target that is OpenAI compatible?If the target is a domain that has been approved with a dedicated domain (e.g., TogetherAI), then you can replace the base URL with the dedicated domain.
If the target has not been approved, you can utilize the Helicone Gateway to log your requests to Helicone.Example:Instead of using the base URL
base_url=“https://oai.helicone.ai/v1”,
You can use the base URLbase_url=“https://together.helicone.ai/v1”,
OpenAI v1+
OpenAI v1+
Set HELICONE_API_KEY as an environment variableInitialize the OpenAI client. This can also be done via a global client.Send a request and attach extra headersCongratulations! Your OpenAI requests are now logging results to Helicone.
OpenAI <v1
OpenAI <v1
Set HELICONE_API_KEY as an environment variableModify the API base and add a Helicone-Auth headerCongratulations! Your OpenAI requests are now logging results to Helicone.