1
Create an account and generate an API key
Log into Helicone or create an account. Once you have an account, you can generate an API key here.
2
Set up your Helicone API key in your .env file
3
Modify the base URL path and set up authentication
Configuring Helicone Features with Headers
Enable Helicone features through headers, configurable at client initialization or individual request level.Configure Client
Generate Text
Stream Text
Using with Existing Custom Base URLs
If you’re already using a custom base URL for an OpenAI-compatible vendor, you can proxy your requests through Helicone by setting theHelicone-Target-URL
header to your existing vendor’s endpoint.
Example with Custom Vendor
Example with Multiple Vendors
You can also dynamically set the target URL per request:- Keep your existing vendor integrations
- Add Helicone monitoring and features
- Switch between vendors without changing your base URL
- Maintain compatibility with your current setup