LumaProvider
Namespace: Vercel.AI.Luma
public sealed class LumaProvider : OpenAICompatibleProviderLuma provider.
Inheritance: object → ProviderBase → OpenAICompatibleProvider
Constructors
Section titled “Constructors”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 |
Fields
Section titled “Fields”DefaultBaseUrl
Section titled “DefaultBaseUrl”public const string DefaultBaseUrl = "https://api.lumalabs.ai"Default API origin.
Value: string
ProviderId
Section titled “ProviderId”public const string ProviderId = "luma"Provider id.
Value: string
Methods
Section titled “Methods”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
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>
ImageModel(string)
Section titled “ImageModel(string)”public override IImageModel ImageModel(string modelId)Returns an image model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: IImageModel
LanguageModel(string)
Section titled “LanguageModel(string)”public override ILanguageModel LanguageModel(string modelId)Returns a language model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: ILanguageModel
VideoModel(string)
Section titled “VideoModel(string)”public override IVideoModel VideoModel(string modelId)Returns a video model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: IVideoModel
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product