This integration method is maintained but no longer actively developed. For the best experience and latest features, use our new AI Gateway with unified API access to 100+ models.
Proxy Integration#
Python SDK#
Create an account + Generate an API Key
Set API keys as environment variables
Install required packages
Ensure you have the necessary packages installed in your Python environment:
Import libraries
Initialize Vertex AI with Helicone
Initialize the model and generate content
Manual Logging with Log Builder#
For more control over logging, especially with asynchronous and streaming responses, you can use the Helicone Manual Logger:
Install additional required packages
Create a log builder example
This example demonstrates using the Helicone log builder with both async and streaming responses:
Create the HeliconeManualLogger helper
Create a file named helicone_helpers.py with the following content:
The log builder approach provides several advantages:
- Precise control over what gets logged
- Support for both async and streaming responses
- Ability to add custom properties and metadata
- Manual control over when logs are sent
This is particularly useful for complex applications where you need more control over the logging process.
