Skip to content

OpenAIImageCall

Namespace: Vercel.AI.OpenAI

public sealed class OpenAIImageCall

Image generation settings beyond the shared prompt and size.

Inheritance: object

View source

public OpenAIImageCall(string prompt)

Creates an image call.

Parameters

Name Type Description
prompt string

View source

public string? AspectRatio { get; set; }

Aspect ratio. OpenAI image models do not accept it.

Value: string

View source

public int Count { get; set; }

How many images to generate.

Value: int

View source

public IReadOnlyList<OpenAIImageFile>? Files { get; set; }

Source images for an edit.

Value: IReadOnlyList<OpenAIImageFile>

View source

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

Extra HTTP headers.

Value: IReadOnlyDictionary<string, string>

View source

public OpenAIImageFile? Mask { get; set; }

Optional edit mask.

Value: OpenAIImageFile

View source

public string Prompt { get; }

Image prompt.

Value: string

View source

public JsonElement? ProviderOptions { get; set; }

Provider options. The openai object is read.

Value: JsonElement?

View source

public int? Seed { get; set; }

Seed. OpenAI image models do not accept it.

Value: int?

View source

public string? Size { get; set; }

Size such as 1024x1024.

Value: string

View source

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