Installation
Get Prism Vertex up and running in your Laravel application.Requirements
Before you begin, make sure you have:- PHP 8.2 or higher
- Laravel 11 or 12
- Composer installed
Install the package
Install via Composer
Run the following command in your Laravel project:This will also install the required dependencies:
prism-php/prism(>= 0.99.16)google/auth(^1.0)
Choose your configuration mode
Prism Vertex supports two modes:Standard mode - Full access to all models and providers
- Requires Google Cloud project ID and location
- Supports service account or API key authentication
- Works with all 11 supported providers
- Only requires an API key
- Limited to Google Gemini models
- No project or location configuration needed
Configure Standard mode (recommended)
Add the Vertex configuration to your Then add these values to your
config/prism.php file:.env file:You can use
api_key instead of credentials if you prefer API key authentication:Authentication options
You have two ways to authenticate with Vertex AI:Service account (recommended for production)
- Create a service account in your Google Cloud project
- Download the JSON key file
- Set the
credentialsconfig option to the path of your JSON file:
google/auth library to automatically obtain a Bearer token.
API key
Set theapi_key config option. The key is sent as a query parameter on every request:
Per-provider configuration
All providers read from the sharedvertex config by default. If you need different settings for a specific provider (for example, a different region for Anthropic), you can add a per-provider config block:
Available locations
Vertex AI is available in multiple Google Cloud regions. Common locations include:us-central1(Iowa)us-east4(Northern Virginia)europe-west1(Belgium)europe-west4(Netherlands)asia-northeast1(Tokyo)asia-southeast1(Singapore)
Not all models are available in all regions. Check the Vertex AI documentation for model availability by region.
Verify your installation
Test your configuration with a simple text generation request:Next steps
Quick start guide
Follow the quickstart to build your first integration