Voyage AI exposes several fields on its text embeddings endpoint that have no equivalent in the portable SDK API. You can forward any of these fields by callingDocumentation 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.
->providerOptions('voyageai', [...]) on the embedding builder. The key–value pairs are merged directly into the JSON request body and sent to Voyage’s API unchanged — the SDK does not whitelist them, so any field Voyage documents will be forwarded.
Example
The following example shows the most commonly used provider options together:Supported Provider Options
Tells Voyage AI how to tokenize and encode the input. Use
'document' when
indexing content and 'query' when embedding a search query. Omitting this
field lets Voyage choose a default. Using the correct value improves retrieval
quality because Voyage trains document and query encoders differently.When
true, inputs that exceed the model’s maximum context length are
silently truncated before embedding. When false (the default), an oversized
input causes the API to return an error. Set to true in production pipelines
where input length is not guaranteed.Controls the numeric representation of the returned vectors. The only value
accepted by this adapter is
'float'. Passing any other value (e.g.
'binary', 'ubinary', 'int8', 'uint8') raises an
AiSdk\Exceptions\InvalidArgumentException before the request is sent,
because quantized and bit-packed types require a different result contract
than the SDK’s standard float-vector response.Requests a specific vector length from Voyage AI. This field is set
automatically when you call
->dimensions(int $n) on the embedding builder —
you do not need to pass it through providerOptions() directly. For example,
->dimensions(512) results in "output_dimension": 512 in the JSON request
body sent to https://api.voyageai.com/v1/embeddings.Constraints
Query vs. Document Input Type
When building a retrieval system you will typically embed documents at index time and queries at search time. Use a differentinput_type for each:
