Warning
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#
Fetch#
Create an account + Generate an API Key
Set API keys as environment variables
Install necessary packages
Ensure you have the necessary packages installed in your Javascript project:
Send a request using fetch
VertexAI SDK#
Create an account + Generate an API Key
Set API keys as environment variables
Install necessary packages
Ensure you have the necessary packages installed in your Javascript project:
Import VertexAI and configure the client
Set up custom headers
Define request options
Get the generative model
Generate content
