Download the PHP package rmh/vertex without Composer

On this page you can find all versions of the php package rmh/vertex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vertex

Total Downloads Latest Stable Version License

Prism Vertex

A standalone Google Vertex AI provider for the Prism PHP framework. Access Google Gemini and partner model families through a single configuration and unified interface.

Installation

Configuration

Add the following to your Prism configuration (config/prism.php):

Standard mode (project + location required)

Express mode (API key only, Google models only)

When project_id and location are omitted, the package automatically uses Vertex AI Express Mode endpoints:

[!IMPORTANT] Express mode only supports Google Gemini models. Using partner model providers in Express mode will throw an exception.

Usage

Use the provider constants from Prism\Vertex\Enums\Vertex with the Prism facade:

Text Generation

Structured Output (JSON)

Embeddings

Streaming

[!WARNING] Streaming is not yet supported. This feature is planned for a future release.

Supported Providers

All providers share one vertex config block. The provider constant determines which API schema and publisher endpoint is used:

Constant Publisher Example Models Schema
Vertex::Gemini google gemini-2.5-flash, text-embedding-005 Gemini
Vertex::Anthropic anthropic claude-3-5-sonnet@20241022, claude-3-5-haiku@20241022 Anthropic
Vertex::Mistral mistralai mistral-small-2503, codestral-2501 OpenAI
Vertex::Meta meta llama-4-scout-17b-16e-instruct-maas OpenAI
Vertex::DeepSeek deepseek deepseek-v3-0324-maas OpenAI
Vertex::AI21 ai21 jamba-1.5-mini@001, jamba-1.5-large@001 OpenAI
Vertex::Kimi kimi kimi-k2-0711-maas OpenAI
Vertex::MiniMax minimax minimax-m1-40k-0709-maas OpenAI
Vertex::OpenAI openai gpt-oss-4o-mini-maas OpenAI
Vertex::Qwen qwen qwen2.5-72b-instruct-maas OpenAI
Vertex::ZAI zaiorg glm-4-plus-maas OpenAI

API Schemas

Prism Vertex uses three API schemas to handle the different formats used by Vertex AI publishers:

Schema Text Structured Embeddings
Gemini yes yes yes
Anthropic yes yes no
OpenAI yes yes no

The provider constant automatically selects the correct schema. You can override it via withProviderOptions():

Structured Output Details

Each schema handles structured output differently:

You can override the schema instruction prompt for Anthropic and OpenAI schemas using withProviderOptions():

Authentication

API Key

Set the api_key config option. The key is sent as a ?key= query parameter on every request. This works for both Standard and Express modes.

Service Account JSON file

Set the credentials config option to the path of your service account JSON key file. The package uses google/auth to obtain a Bearer token automatically.

Application Default Credentials (ADC)

When neither credentials nor api_key are set in Standard mode, the package automatically uses Application Default Credentials. This is the recommended approach for code running on Google Cloud Platform, no credentials need to be configured at all.

ADC resolves credentials in this order:

  1. GOOGLE_APPLICATION_CREDENTIALS environment variable (path to a JSON key file)
  2. gcloud auth application-default login (local development)
  3. Attached service account (GCE, GKE, Cloud Run, Cloud Functions, etc.)

Per-Provider Config Overrides

All providers read from the shared vertex config. If you need different credentials for a specific provider, add a per-provider config block — it will override the shared config:

Requirements

License

The MIT License (MIT). Please see License File for more information.


All versions of vertex with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0|^12.0
google/auth Version ^1.0
prism-php/prism Version >=0.99.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rmh/vertex contains the following files

Loading the files please wait ...