Skip to content

LumaProvider

Namespace: Vercel.AI.Luma

public sealed class LumaProvider : OpenAICompatibleProvider

Luma provider.

Inheritance: object → ProviderBase → OpenAICompatibleProvider

View source

LumaProvider(HttpClient, OpenAICompatibleOptions?)

Section titled “LumaProvider(HttpClient, OpenAICompatibleOptions?)”
public LumaProvider(HttpClient httpClient, OpenAICompatibleOptions? options = null)

Creates a provider.

Parameters

Name Type Description
httpClient HttpClient
options OpenAICompatibleOptions

View source

public const string DefaultBaseUrl = "https://api.lumalabs.ai"

Default API origin.

Value: string

View source

public const string ProviderId = "luma"

Provider id.

Value: string

View source

Create(OpenAICompatibleOptions?, HttpMessageHandler?)

Section titled “Create(OpenAICompatibleOptions?, HttpMessageHandler?)”
public static LumaProvider Create(OpenAICompatibleOptions? options = null, HttpMessageHandler? handler = null)

Creates a provider.

Parameters

Name Type Description
options OpenAICompatibleOptions
handler HttpMessageHandler

Returns: LumaProvider

View source

GenerateImageAsync(string, LumaImageRequest, CancellationToken)

Section titled “GenerateImageAsync(string, LumaImageRequest, CancellationToken)”
public Task<LumaImageGeneration> GenerateImageAsync(string modelId, LumaImageRequest request, CancellationToken cancellationToken)

Generates one image with Dream Machine.

Parameters

Name Type Description
modelId string
request LumaImageRequest
cancellationToken CancellationToken

Returns: Task<LumaImageGeneration>

View source

public override IImageModel ImageModel(string modelId)

Returns an image model.

Parameters

Name Type Description
modelId string

Returns: IImageModel

View source

public override ILanguageModel LanguageModel(string modelId)

Returns a language model.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

public override IVideoModel VideoModel(string modelId)

Returns a video model.

Parameters

Name Type Description
modelId string

Returns: IVideoModel

View source

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