The VoyageAI PHP SDK is the official Voyage AI provider for the PHP AI SDK. It lets you generate text embeddings using Voyage AI’s state-of-the-art models with a single, portable interface — no boilerplate, no vendor lock-in.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/voyageai/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Install the package and generate your first embedding in minutes.
Configuration
Set your API key, base URL, and custom headers.
Embeddings Overview
Learn how to embed single strings, batches, and tune output dimensions.
Provider Options
Pass Voyage-specific fields like input_type, truncation, and output_dtype.
Get started in three steps
Set your API key
Export your Voyage AI key as an environment variable, or pass it directly when creating the provider.
Why VoyageAI PHP SDK?
Portable API
Built on the PHP AI SDK’s shared embedding contract — swap providers without rewriting your application code.
Voyage-native options
Pass
input_type, truncation, output_dtype, and custom dimensions directly to Voyage’s API.Zero-config defaults
Reads
VOYAGE_API_KEY and VOYAGE_BASE_URL from the environment automatically.Type-safe & tested
Strict PHP 8.3+ types, PHPStan analysis, and a full Pest test suite on every push.
This package covers Voyage AI’s text embeddings endpoint. Multimodal embeddings, contextualized chunk embeddings, and reranking are not yet part of this package’s surface.
