View Source LumaaiEx.Generation (lumaai_ex v0.1.1)
Functions for interacting with the Luma Labs Generation API.
This module provides high-level functions for creating, listing, retrieving, and deleting generations, as well as fetching available camera motions.
Summary
Functions
Creates a new generation.
Deletes a specific generation.
Retrieves a specific generation.
Retrieves available camera motions.
Lists generations.
Functions
@spec create(LumaaiEx.Config.t(), map()) :: {:ok, map()} | {:error, map()}
Creates a new generation.
Parameters
- client: A
LumaaiEx.Config
struct containing API configuration. - params: A map of parameters for the generation.
Returns
{:ok, response}
on success.{:error, reason}
on failure.
@spec delete(LumaaiEx.Config.t(), String.t()) :: {:ok, map()} | {:error, map()}
Deletes a specific generation.
Parameters
- client: A
LumaaiEx.Config
struct containing API configuration. - id: The ID of the generation to delete.
Returns
{:ok, response}
on success.{:error, reason}
on failure.
@spec get(LumaaiEx.Config.t(), String.t()) :: {:ok, map()} | {:error, map()}
Retrieves a specific generation.
Parameters
- client: A
LumaaiEx.Config
struct containing API configuration. - id: The ID of the generation to retrieve.
Returns
{:ok, response}
on success.{:error, reason}
on failure.
@spec get_camera_motions(LumaaiEx.Config.t()) :: {:ok, map()} | {:error, map()}
Retrieves available camera motions.
Parameters
- client: A
LumaaiEx.Config
struct containing API configuration.
Returns
{:ok, response}
on success.{:error, reason}
on failure.
@spec list(LumaaiEx.Config.t(), map()) :: {:ok, map()} | {:error, map()}
Lists generations.
Parameters
- client: A
LumaaiEx.Config
struct containing API configuration. - params: Optional query parameters (default: %{}).
Returns
{:ok, response}
on success.{:error, reason}
on failure.