Skip to main content
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

1

Create an account + Generate an API Key

Log into helicone or create an account. Once you have an account, you can generate an API key.
2

Set API keys as environment variables

3

Install required packages

Ensure you have the necessary packages installed in your Python environment:
4

Import libraries

5

Initialize Vertex AI with Helicone

6

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:
1

Install additional required packages

2

Create a log builder example

This example demonstrates using the Helicone log builder with both async and streaming responses:
3

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.