Skip to content

ImageModelCall

Namespace: Vercel.AI.Operations

public sealed class ImageModelCall

Arguments for one image model call.

Inheritance: object

View source

ImageModelCall(string?, IReadOnlyList<ImageModelFile>?, ImageModelFile?, int, string?, string?, int?, JsonElement?, IReadOnlyDictionary<string, string>, CancellationToken)

Section titled “ImageModelCall(string?, IReadOnlyList<ImageModelFile>?, ImageModelFile?, int, string?, string?, int?, JsonElement?, IReadOnlyDictionary<string, string>, CancellationToken)”
public ImageModelCall(string? prompt, IReadOnlyList<ImageModelFile>? files, ImageModelFile? mask, int n, string? size, string? aspectRatio, int? seed, JsonElement? providerOptions, IReadOnlyDictionary<string, string> headers, CancellationToken cancellationToken)

Creates a call.

Parameters

Name Type Description
prompt string
files IReadOnlyList<ImageModelFile>
mask ImageModelFile
n int
size string
aspectRatio string
seed int?
providerOptions JsonElement?
headers IReadOnlyDictionary<string, string>
cancellationToken CancellationToken

View source

public string? AspectRatio { get; }

Aspect ratio such as 16:9.

Value: string

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public IReadOnlyList<ImageModelFile>? Files { get; }

Reference images.

Value: IReadOnlyList<ImageModelFile>

View source

public IReadOnlyDictionary<string, string> Headers { get; }

Headers including the user-agent suffix.

Value: IReadOnlyDictionary<string, string>

View source

public ImageModelFile? Mask { get; }

Mask image.

Value: ImageModelFile

View source

public int N { get; }

Images requested from this call.

Value: int

View source

public string? Prompt { get; }

Prompt text.

Value: string

View source

public JsonElement? ProviderOptions { get; }

Provider options. Empty object when the caller omitted them.

Value: JsonElement?

View source

public int? Seed { get; }

Seed.

Value: int?

View source

public string? Size { get; }

Size such as 1024x1024.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product