QuiverAIImageReference
Namespace: Vercel.AI.QuiverAI
public sealed class QuiverAIImageReferenceA reference image accepted by providerOptions.quiverai.referenceImages: { "url" } or { "base64" }.
Exactly one of Url and Base64 is set. Serializes to that JSON shape.
Inheritance: object
Properties
Section titled “Properties”Base64
Section titled “Base64”[JsonPropertyName("base64")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]public string? Base64 { get; }Base64-encoded image data without a data URL prefix, or <a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> for a URL reference.
Value: string
[JsonPropertyName("url")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]public string? Url { get; }HTTP or HTTPS image URL, or <a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> for a base64 reference.
Value: string
Methods
Section titled “Methods”Prepare(byte[])
Section titled “Prepare(byte[])”public static QuiverAIImageReference Prepare(byte[] input)Returns a base64 reference for PNG, JPEG, WebP, GIF, or SVG bytes.
Parameters
| Name | Type | Description |
|---|---|---|
input |
byte[] |
Returns: QuiverAIImageReference
Prepare(string)
Section titled “Prepare(string)”public static QuiverAIImageReference Prepare(string input)Returns a URL reference for a URL, or a base64 reference for a base64 string or a base64 data URL. Throws InvalidArgumentException for other schemes, invalid base64, or unsupported images.
Parameters
| Name | Type | Description |
|---|---|---|
input |
string |
Returns: QuiverAIImageReference
Prepare(Uri)
Section titled “Prepare(Uri)”public static QuiverAIImageReference Prepare(Uri input)Returns a URL reference for an HTTP or HTTPS URL.
Parameters
| Name | Type | Description |
|---|---|---|
input |
Uri |
Returns: QuiverAIImageReference
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product