Skip to content

TogetherAIImageModel

Namespace: Vercel.AI.TogetherAI

public sealed class TogetherAIImageModel : IImageModel

Together image generation. Posts /images/generations with width, height, and base64 output.

Inheritance: object

Implements: IImageModel

View source

TogetherAIImageModel(TogetherAIProvider, string, Func<DateTimeOffset>?)

Section titled “TogetherAIImageModel(TogetherAIProvider, string, Func<DateTimeOffset>?)”
public TogetherAIImageModel(TogetherAIProvider provider, string modelId, Func<DateTimeOffset>? clock = null)

Creates an image model. <code class=“paramref”>clock</code> sets the response timestamp and defaults to UTC now.

Parameters

Name Type Description
provider TogetherAIProvider
modelId string
clock Func<DateTimeOffset>

View source

public int MaxImagesPerCall { get; }

Together accepts one image per call.

Value: int

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

DoGenerateAsync(ImageCallOptions, CancellationToken)

Section titled “DoGenerateAsync(ImageCallOptions, CancellationToken)”
public Task<ImageGenerationResult> DoGenerateAsync(ImageCallOptions options, CancellationToken cancellationToken)

Generates images. Maps to doGenerate on an image model.

Parameters

Name Type Description
options ImageCallOptions
cancellationToken CancellationToken

Returns: Task<ImageGenerationResult>

View source

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