OpenAI Compatible Endpoints
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
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 URL
base_url=“https://together.helicone.ai/v1”,
Set HELICONE_API_KEY as an environment variable
Modify the base path and add a Helicone-Auth header
OpenAI V4+
OpenAI < V4
Installation and Setup
To get started, install the `helicone-openai` package
Set `HELICONE_API_KEY` as an environment variable
Replace
with
Make a request
Chat, Completion, Embedding, etc usage is equivalent to OpenAI package.
Send feedback
Ensure you store the helicone-id
header returned in the original response
HeliconeMeta options
Replace the OpenAI Base URL with Helicone’s
Add a Helicone-Auth header into the requests
Here is an example cURL command:
Please ensure to replace API keys with your own
Python
Modify the API base and add a Helicone-Auth header
Typescript
Was this page helpful?