diff --git a/docs/reference/classes/ApiError.html b/docs/reference/classes/ApiError.html index 0d6284b..3a1a326 100644 --- a/docs/reference/classes/ApiError.html +++ b/docs/reference/classes/ApiError.html @@ -1,4 +1,4 @@ -ApiError | @fal-ai/client

Class ApiError<Body>

Type Parameters

  • Body

Hierarchy (view full)

Constructors

constructor +ApiError | @fal-ai/client

Class ApiError<Body>

Type Parameters

  • Body

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

body: Body
status: number
+

Constructors

Properties

body: Body
status: number
diff --git a/docs/reference/classes/FalStream.html b/docs/reference/classes/FalStream.html index 0cb4c87..67016bf 100644 --- a/docs/reference/classes/FalStream.html +++ b/docs/reference/classes/FalStream.html @@ -1,5 +1,5 @@ FalStream | @fal-ai/client

Class FalStream<Input, Output>

The class representing a streaming response. With t

-

Type Parameters

  • Input
  • Output

Constructors

Type Parameters

  • Input
  • Output

Constructors

Properties

config endpointId options @@ -9,18 +9,18 @@ abort done on -

Constructors

Properties

config: Required<Config>
endpointId: string
options: StreamOptions<Input>
url: string

Accessors

  • get signal(): AbortSignal
  • Gets the AbortSignal instance that can be used to listen for abort events.

    +

Constructors

Properties

config: Required<Config>
endpointId: string
options: StreamOptions<Input>
url: string

Accessors

Methods

Methods

  • Aborts the streaming request.

    Note: This method is noop in case the request is already done.

    Parameters

    • Optionalreason: string | Error

      optional cause for aborting the request.

      -

    Returns void

  • Gets a reference to the Promise that indicates whether the streaming +

Returns void

+
diff --git a/docs/reference/classes/ValidationError.html b/docs/reference/classes/ValidationError.html index 617153a..602c954 100644 --- a/docs/reference/classes/ValidationError.html +++ b/docs/reference/classes/ValidationError.html @@ -1,6 +1,6 @@ -ValidationError | @fal-ai/client

Class ValidationError

Hierarchy (view full)

  • ApiError<ValidationErrorBody>
    • ValidationError

Constructors

constructor +ValidationError | @fal-ai/client

Class ValidationError

Hierarchy (view full)

  • ApiError<ValidationErrorBody>
    • ValidationError

Constructors

Properties

Accessors

Methods

Constructors

Properties

body: ValidationErrorBody
status: number

Accessors

Methods

+

Constructors

Properties

body: ValidationErrorBody
status: number

Accessors

Methods

diff --git a/docs/reference/functions/createFalClient.html b/docs/reference/functions/createFalClient.html index ed7a160..9e951ad 100644 --- a/docs/reference/functions/createFalClient.html +++ b/docs/reference/functions/createFalClient.html @@ -1,4 +1,4 @@ createFalClient | @fal-ai/client

Function createFalClient

  • Creates a new reference of the FalClient.

    Parameters

    • userConfig: Config = {}

      Optional configuration to override the default settings.

    Returns FalClient

    a new instance of the FalClient.

    -
+
diff --git a/docs/reference/functions/isCompletedQueueStatus.html b/docs/reference/functions/isCompletedQueueStatus.html index 3a11d4a..9e56e8a 100644 --- a/docs/reference/functions/isCompletedQueueStatus.html +++ b/docs/reference/functions/isCompletedQueueStatus.html @@ -1 +1 @@ -isCompletedQueueStatus | @fal-ai/client

Function isCompletedQueueStatus

+isCompletedQueueStatus | @fal-ai/client

Function isCompletedQueueStatus

diff --git a/docs/reference/functions/isQueueStatus.html b/docs/reference/functions/isQueueStatus.html index cbffc80..7e41bb6 100644 --- a/docs/reference/functions/isQueueStatus.html +++ b/docs/reference/functions/isQueueStatus.html @@ -1 +1 @@ -isQueueStatus | @fal-ai/client

Function isQueueStatus

+isQueueStatus | @fal-ai/client

Function isQueueStatus

diff --git a/docs/reference/functions/parseEndpointId.html b/docs/reference/functions/parseEndpointId.html index 739408c..1c3831a 100644 --- a/docs/reference/functions/parseEndpointId.html +++ b/docs/reference/functions/parseEndpointId.html @@ -1 +1 @@ -parseEndpointId | @fal-ai/client

Function parseEndpointId

  • Parameters

    • id: string

    Returns EndpointId

+parseEndpointId | @fal-ai/client

Function parseEndpointId

  • Parameters

    • id: string

    Returns EndpointId

diff --git a/docs/reference/functions/withMiddleware.html b/docs/reference/functions/withMiddleware.html index 005da27..b82c2d2 100644 --- a/docs/reference/functions/withMiddleware.html +++ b/docs/reference/functions/withMiddleware.html @@ -1,4 +1,4 @@ withMiddleware | @fal-ai/client

Function withMiddleware

+
diff --git a/docs/reference/functions/withProxy.html b/docs/reference/functions/withProxy.html index 58a6bb0..4e50737 100644 --- a/docs/reference/functions/withProxy.html +++ b/docs/reference/functions/withProxy.html @@ -1 +1 @@ -withProxy | @fal-ai/client

Function withProxy

+withProxy | @fal-ai/client

Function withProxy

diff --git a/docs/reference/interfaces/CompletedQueueStatus.html b/docs/reference/interfaces/CompletedQueueStatus.html index 93c3934..dcb8571 100644 --- a/docs/reference/interfaces/CompletedQueueStatus.html +++ b/docs/reference/interfaces/CompletedQueueStatus.html @@ -1,6 +1,6 @@ -CompletedQueueStatus | @fal-ai/client

Interface CompletedQueueStatus

interface CompletedQueueStatus {
    logs: RequestLog[];
    metrics?: Metrics;
    request_id: string;
    response_url: string;
    status: "COMPLETED";
}

Hierarchy

  • BaseQueueStatus
    • CompletedQueueStatus

Properties

logs +CompletedQueueStatus | @fal-ai/client

Interface CompletedQueueStatus

interface CompletedQueueStatus {
    logs: RequestLog[];
    metrics?: Metrics;
    request_id: string;
    response_url: string;
    status: "COMPLETED";
}

Hierarchy

  • BaseQueueStatus
    • CompletedQueueStatus

Properties

logs: RequestLog[]
metrics?: Metrics
request_id: string
response_url: string
status: "COMPLETED"
+

Properties

logs: RequestLog[]
metrics?: Metrics
request_id: string
response_url: string
status: "COMPLETED"
diff --git a/docs/reference/interfaces/FalClient.html b/docs/reference/interfaces/FalClient.html index 6516605..ac3f945 100644 --- a/docs/reference/interfaces/FalClient.html +++ b/docs/reference/interfaces/FalClient.html @@ -1,7 +1,7 @@ FalClient | @fal-ai/client

Interface FalClient

The main client type, it provides access to simple API model usage, as well as access to the queue and storage APIs.

createFalClient

-
interface FalClient {
    queue: QueueClient;
    realtime: RealtimeClient;
    storage: StorageClient;
    stream: (<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>) => Promise<FalStream<InputType<Id>, OutputType<Id>>>);
    streaming: StreamingClient;
    run<Id>(endpointId: Id, options: RunOptions<InputType<Id>>): Promise<Result<OutputType<Id>>>;
    subscribe<Id>(endpointId: Id, options: RunOptions<InputType<Id>> & QueueSubscribeOptions): Promise<Result<OutputType<Id>>>;
}

Properties

interface FalClient {
    queue: QueueClient;
    realtime: RealtimeClient;
    storage: StorageClient;
    stream: (<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>) => Promise<FalStream<InputType<Id>, OutputType<Id>>>);
    streaming: StreamingClient;
    run<Id>(endpointId: Id, options: RunOptions<InputType<Id>>): Promise<Result<OutputType<Id>>>;
    subscribe<Id>(endpointId: Id, options: RunOptions<InputType<Id>> & QueueSubscribeOptions): Promise<Result<OutputType<Id>>>;
}

Properties

queue realtime storage stream @@ -9,14 +9,14 @@ as well as access to the queue and storage APIs.

Methods

Properties

The queue client to interact with the queue API.

-
realtime: RealtimeClient

The realtime client to interact with the realtime API +

realtime: RealtimeClient

The realtime client to interact with the realtime API and receive updates in real-time.

  • #RealtimeClient
  • #RealtimeClient.connect
-
storage: StorageClient

The storage client to interact with the storage API.

-
stream: (<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>) => Promise<FalStream<InputType<Id>, OutputType<Id>>>)

Calls a fal app that supports streaming and provides a streaming-capable +

storage: StorageClient

The storage client to interact with the storage API.

+
stream: (<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>) => Promise<FalStream<InputType<Id>, OutputType<Id>>>)

Calls a fal app that supports streaming and provides a streaming-capable object as a result, that can be used to get partial results through either AsyncIterator or through an event listener.

Type declaration

    • <Id>(endpointId, options): Promise<FalStream<InputType<Id>, OutputType<Id>>>
    • Calls a fal app that supports streaming and provides a streaming-capable @@ -28,13 +28,13 @@ object as a result, that can be used to get partial results through either

the endpoint id, e.g. fal-ai/llavav15-13b.

the request options, including the input payload.

the FalStream instance.

-
streaming: StreamingClient

The streaming client to interact with the streaming API.

+
streaming: StreamingClient

The streaming client to interact with the streaming API.

#stream

-

Methods

Methods

  • Runs a fal endpoints identified by its endpointId.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      the registered function revision id or alias.

    • options: RunOptions<InputType<Id>>

    Returns Promise<Result<OutputType<Id>>>

    the remote function output

    -
  • Subscribes to updates for a specific request in the queue.

    +
  • Subscribes to updates for a specific request in the queue.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      The ID of the API endpoint.

    • options: RunOptions<InputType<Id>> & QueueSubscribeOptions

      Options to configure how the request is run and how updates are received.

    Returns Promise<Result<OutputType<Id>>>

    A promise that resolves to the result of the request once it's completed.

    -
+
diff --git a/docs/reference/interfaces/InProgressQueueStatus.html b/docs/reference/interfaces/InProgressQueueStatus.html index 9b71b70..ac70f16 100644 --- a/docs/reference/interfaces/InProgressQueueStatus.html +++ b/docs/reference/interfaces/InProgressQueueStatus.html @@ -1,5 +1,5 @@ -InProgressQueueStatus | @fal-ai/client

Interface InProgressQueueStatus

interface InProgressQueueStatus {
    logs: RequestLog[];
    request_id: string;
    response_url: string;
    status: "IN_PROGRESS";
}

Hierarchy

  • BaseQueueStatus
    • InProgressQueueStatus

Properties

logs +InProgressQueueStatus | @fal-ai/client

Interface InProgressQueueStatus

interface InProgressQueueStatus {
    logs: RequestLog[];
    request_id: string;
    response_url: string;
    status: "IN_PROGRESS";
}

Hierarchy

  • BaseQueueStatus
    • InProgressQueueStatus

Properties

logs: RequestLog[]
request_id: string
response_url: string
status: "IN_PROGRESS"
+

Properties

logs: RequestLog[]
request_id: string
response_url: string
status: "IN_PROGRESS"
diff --git a/docs/reference/interfaces/InQueueQueueStatus.html b/docs/reference/interfaces/InQueueQueueStatus.html index afdf19d..dd1860b 100644 --- a/docs/reference/interfaces/InQueueQueueStatus.html +++ b/docs/reference/interfaces/InQueueQueueStatus.html @@ -1,5 +1,5 @@ -InQueueQueueStatus | @fal-ai/client

Interface InQueueQueueStatus

interface InQueueQueueStatus {
    queue_position: number;
    request_id: string;
    response_url: string;
    status: "IN_QUEUE";
}

Hierarchy

  • BaseQueueStatus
    • InQueueQueueStatus

Properties

queue_position +InQueueQueueStatus | @fal-ai/client

Interface InQueueQueueStatus

interface InQueueQueueStatus {
    queue_position: number;
    request_id: string;
    response_url: string;
    status: "IN_QUEUE";
}

Hierarchy

  • BaseQueueStatus
    • InQueueQueueStatus

Properties

queue_position: number
request_id: string
response_url: string
status: "IN_QUEUE"
+

Properties

queue_position: number
request_id: string
response_url: string
status: "IN_QUEUE"
diff --git a/docs/reference/interfaces/QueueClient.html b/docs/reference/interfaces/QueueClient.html index 33a8183..e030a6f 100644 --- a/docs/reference/interfaces/QueueClient.html +++ b/docs/reference/interfaces/QueueClient.html @@ -1,6 +1,6 @@ QueueClient | @fal-ai/client

Interface QueueClient

Represents a request queue with methods for submitting requests, checking their status, retrieving results, and subscribing to updates.

-
interface QueueClient {
    cancel(endpointId: string, options: BaseQueueOptions): Promise<void>;
    result<Id>(endpointId: Id, options: BaseQueueOptions): Promise<Result<OutputType<Id>>>;
    status(endpointId: string, options: QueueStatusOptions): Promise<QueueStatus>;
    streamStatus(endpointId: string, options: QueueStatusStreamOptions): Promise<FalStream<unknown, QueueStatus>>;
    submit<Id>(endpointId: Id, options: SubmitOptions<InputType<Id>>): Promise<InQueueQueueStatus>;
    subscribeToStatus(endpointId: string, options: QueueStatusSubscriptionOptions): Promise<CompletedQueueStatus>;
}

Methods

interface QueueClient {
    cancel(endpointId: string, options: BaseQueueOptions): Promise<void>;
    result<Id>(endpointId: Id, options: BaseQueueOptions): Promise<Result<OutputType<Id>>>;
    status(endpointId: string, options: QueueStatusOptions): Promise<QueueStatus>;
    streamStatus(endpointId: string, options: QueueStatusStreamOptions): Promise<FalStream<unknown, QueueStatus>>;
    submit<Id>(endpointId: Id, options: SubmitOptions<InputType<Id>>): Promise<InQueueQueueStatus>;
    subscribeToStatus(endpointId: string, options: QueueStatusSubscriptionOptions): Promise<CompletedQueueStatus>;
}

Methods

cancel result status streamStatus @@ -12,25 +12,25 @@ checking their status, retrieving results, and subscribing to updates.

is run and how updates are received.

Returns Promise<void>

A promise that resolves once the request is cancelled.

If the request cannot be cancelled.

-
  • Retrieves the result of a specific request from the queue.

    +
  • Retrieves the result of a specific request from the queue.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      The ID of the function web endpoint.

    • options: BaseQueueOptions

      Options to configure how the request is run.

    Returns Promise<Result<OutputType<Id>>>

    A promise that resolves to the result of the request.

    -
  • Retrieves the status of a specific request in the queue.

    Parameters

    • endpointId: string

      The ID of the function web endpoint.

    • options: QueueStatusOptions

      Options to configure how the request is run.

    Returns Promise<QueueStatus>

    A promise that resolves to the status of the request.

    -
  • Subscribes to updates for a specific request in the queue using HTTP streaming events.

    Parameters

    • endpointId: string

      The ID of the function web endpoint.

    • options: QueueStatusStreamOptions

      Options to configure how the request is run and how updates are received.

    Returns Promise<FalStream<unknown, QueueStatus>>

    The streaming object that can be used to listen for updates.

    -
  • Submits a request to the queue.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      The ID of the function web endpoint.

    • options: SubmitOptions<InputType<Id>>

      Options to configure how the request is run.

    Returns Promise<InQueueQueueStatus>

    A promise that resolves to the result of enqueuing the request.

    -
  • Subscribes to updates for a specific request in the queue using polling or streaming. See options.mode for more details.

    Parameters

    • endpointId: string

      The ID of the function web endpoint.

    • options: QueueStatusSubscriptionOptions

      Options to configure how the request is run and how updates are received.

    Returns Promise<CompletedQueueStatus>

    A promise that resolves to the final status of the request.

    -
+
diff --git a/docs/reference/interfaces/RealtimeClient.html b/docs/reference/interfaces/RealtimeClient.html index b817a62..175d204 100644 --- a/docs/reference/interfaces/RealtimeClient.html +++ b/docs/reference/interfaces/RealtimeClient.html @@ -1,6 +1,6 @@ -RealtimeClient | @fal-ai/client

Interface RealtimeClient

interface RealtimeClient {
    connect<Input, Output>(app: string, handler: RealtimeConnectionHandler<Output>): RealtimeConnection<Input>;
}

Methods

connect +RealtimeClient | @fal-ai/client

Interface RealtimeClient

interface RealtimeClient {
    connect<Input, Output>(app: string, handler: RealtimeConnectionHandler<Output>): RealtimeConnection<Input>;
}

Methods

Methods

  • Connect to the realtime endpoint. The default implementation uses WebSockets to connect to fal function endpoints that support WSS.

    Type Parameters

    • Input = any
    • Output = any

    Parameters

    • app: string

      the app alias or identifier.

    • handler: RealtimeConnectionHandler<Output>

      the connection handler.

      -

    Returns RealtimeConnection<Input>

+

Returns RealtimeConnection<Input>

diff --git a/docs/reference/interfaces/StorageClient.html b/docs/reference/interfaces/StorageClient.html index 1448a85..1687a86 100644 --- a/docs/reference/interfaces/StorageClient.html +++ b/docs/reference/interfaces/StorageClient.html @@ -1,14 +1,14 @@ StorageClient | @fal-ai/client

Interface StorageClient

File support for the client. This interface establishes the contract for uploading files to the server and transforming the input to replace file objects with URLs.

-
interface StorageClient {
    transformInput: ((input: Record<string, any>) => Promise<Record<string, any>>);
    upload: ((file: Blob) => Promise<string>);
}

Properties

interface StorageClient {
    transformInput: ((input: Record<string, any>) => Promise<Record<string, any>>);
    upload: ((file: Blob) => Promise<string>);
}

Properties

transformInput: ((input: Record<string, any>) => Promise<Record<string, any>>)

Transform the input to replace file objects with URLs. This is used to transform the input before sending it to the server and ensures that the server receives URLs instead of file objects.

Type declaration

upload: ((file: Blob) => Promise<string>)

Upload a file to the server. Returns the URL of the uploaded file.

+
upload: ((file: Blob) => Promise<string>)

Upload a file to the server. Returns the URL of the uploaded file.

Type declaration

    • (file): Promise<string>
    • Parameters

      • file: Blob

        the file to upload

      Returns Promise<string>

      the URL of the uploaded file

      -
+
diff --git a/docs/reference/interfaces/StreamingClient.html b/docs/reference/interfaces/StreamingClient.html index 6c5e708..07d7baa 100644 --- a/docs/reference/interfaces/StreamingClient.html +++ b/docs/reference/interfaces/StreamingClient.html @@ -1,9 +1,9 @@ StreamingClient | @fal-ai/client

Interface StreamingClient

The streaming client interface.

-
interface StreamingClient {
    stream<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>): Promise<FalStream<InputType<Id>, OutputType<Id>>>;
}

Methods

interface StreamingClient {
    stream<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>): Promise<FalStream<InputType<Id>, OutputType<Id>>>;
}

Methods

Methods

  • Calls a fal app that supports streaming and provides a streaming-capable object as a result, that can be used to get partial results through either AsyncIterator or through an event listener.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      the endpoint id, e.g. fal-ai/llavav15-13b.

    • options: StreamOptions<InputType<Id>>

      the request options, including the input payload.

    Returns Promise<FalStream<InputType<Id>, OutputType<Id>>>

    the FalStream instance.

    -
+
diff --git a/docs/reference/types/Metrics.html b/docs/reference/types/Metrics.html index d9d0a4d..443d5b9 100644 --- a/docs/reference/types/Metrics.html +++ b/docs/reference/types/Metrics.html @@ -1 +1 @@ -Metrics | @fal-ai/client

Type Alias Metrics

Metrics: {
    inference_time: number | null;
}
+Metrics | @fal-ai/client

Type Alias Metrics

Metrics: {
    inference_time: number | null;
}
diff --git a/docs/reference/types/QueueStatus.html b/docs/reference/types/QueueStatus.html index f599dec..d24e332 100644 --- a/docs/reference/types/QueueStatus.html +++ b/docs/reference/types/QueueStatus.html @@ -1 +1 @@ -QueueStatus | @fal-ai/client

Type Alias QueueStatus

+QueueStatus | @fal-ai/client

Type Alias QueueStatus

diff --git a/docs/reference/types/RequestLog.html b/docs/reference/types/RequestLog.html index fc2cac7..4a5b3ab 100644 --- a/docs/reference/types/RequestLog.html +++ b/docs/reference/types/RequestLog.html @@ -1 +1 @@ -RequestLog | @fal-ai/client

Type Alias RequestLog

RequestLog: {
    level:
        | "STDERR"
        | "STDOUT"
        | "ERROR"
        | "INFO"
        | "WARN"
        | "DEBUG";
    message: string;
    source: "USER";
    timestamp: string;
}
+RequestLog | @fal-ai/client

Type Alias RequestLog

RequestLog: {
    level:
        | "STDERR"
        | "STDOUT"
        | "ERROR"
        | "INFO"
        | "WARN"
        | "DEBUG";
    message: string;
    source: "USER";
    timestamp: string;
}
diff --git a/docs/reference/types/RequestMiddleware.html b/docs/reference/types/RequestMiddleware.html index 90c8040..3f8498a 100644 --- a/docs/reference/types/RequestMiddleware.html +++ b/docs/reference/types/RequestMiddleware.html @@ -1 +1 @@ -RequestMiddleware | @fal-ai/client

Type Alias RequestMiddleware

RequestMiddleware: ((request: RequestConfig) => Promise<RequestConfig>)
+RequestMiddleware | @fal-ai/client

Type Alias RequestMiddleware

RequestMiddleware: ((request: RequestConfig) => Promise<RequestConfig>)
diff --git a/docs/reference/types/ResponseHandler.html b/docs/reference/types/ResponseHandler.html index 7b70cca..4bd5bf5 100644 --- a/docs/reference/types/ResponseHandler.html +++ b/docs/reference/types/ResponseHandler.html @@ -1 +1 @@ -ResponseHandler | @fal-ai/client

Type Alias ResponseHandler<Output>

ResponseHandler<Output>: ((response: Response) => Promise<Output>)

Type Parameters

  • Output
+ResponseHandler | @fal-ai/client

Type Alias ResponseHandler<Output>

ResponseHandler<Output>: ((response: Response) => Promise<Output>)

Type Parameters

  • Output
diff --git a/docs/reference/types/Result.html b/docs/reference/types/Result.html index 4279923..c476ae2 100644 --- a/docs/reference/types/Result.html +++ b/docs/reference/types/Result.html @@ -1,3 +1,3 @@ Result | @fal-ai/client

Type Alias Result<T>

Result<T>: {
    data: T;
    requestId: string;
}

Represents an API result, containing the data, the request ID and any other relevant information.

-

Type Parameters

  • T
+

Type Parameters

diff --git a/docs/reference/types/RunOptions.html b/docs/reference/types/RunOptions.html index 04e52ad..e9361de 100644 --- a/docs/reference/types/RunOptions.html +++ b/docs/reference/types/RunOptions.html @@ -4,4 +4,4 @@ the function, such as the HTTP method to use.

  • Optional Readonlyinput?: Input

    The function input. It will be submitted either as query params or the body payload, depending on the method.

  • Optional Readonlymethod?:
        | "get"
        | "post"
        | "put"
        | "delete"
        | string

    The HTTP method, defaults to post;

    -
  • +
    diff --git a/docs/reference/types/UrlOptions.html b/docs/reference/types/UrlOptions.html index 141d19e..beb767b 100644 --- a/docs/reference/types/UrlOptions.html +++ b/docs/reference/types/UrlOptions.html @@ -3,4 +3,4 @@
  • Optional Readonlysubdomain?: string

    If true, the function will use the queue to run the function asynchronously and return the result in a separate call. This influences how the URL is built.

    -
  • +
    diff --git a/docs/reference/types/ValidationErrorInfo.html b/docs/reference/types/ValidationErrorInfo.html index 2ecdedc..a2932dd 100644 --- a/docs/reference/types/ValidationErrorInfo.html +++ b/docs/reference/types/ValidationErrorInfo.html @@ -1 +1 @@ -ValidationErrorInfo | @fal-ai/client

    Type Alias ValidationErrorInfo

    ValidationErrorInfo: {
        loc: (string | number)[];
        msg: string;
        type: string;
    }
    +ValidationErrorInfo | @fal-ai/client

    Type Alias ValidationErrorInfo

    ValidationErrorInfo: {
        loc: (string | number)[];
        msg: string;
        type: string;
    }
    diff --git a/docs/reference/types/WebHookResponse.html b/docs/reference/types/WebHookResponse.html index 4df9e28..fb05da7 100644 --- a/docs/reference/types/WebHookResponse.html +++ b/docs/reference/types/WebHookResponse.html @@ -10,4 +10,4 @@ allowing for flexibility in specifying the structure of the payload.

  • payload: Payload

    The payload of the response, structure determined by the Payload type.

  • request_id: string

    The unique identifier for the request.

  • status: "ERROR"

    Indicates an unsuccessful response.

    -
  • +
    diff --git a/docs/reference/variables/fal.html b/docs/reference/variables/fal.html index 32d537c..c99793f 100644 --- a/docs/reference/variables/fal.html +++ b/docs/reference/variables/fal.html @@ -1,3 +1,3 @@ fal | @fal-ai/client

    Variable falConst

    fal: SingletonFalClient = ...

    Creates a singleton instance of the client. This is useful as a compatibility layer for existing code that uses the clients version prior to 1.0.0.

    -
    +
    diff --git a/libs/client/package.json b/libs/client/package.json index 808ece7..fc1f180 100644 --- a/libs/client/package.json +++ b/libs/client/package.json @@ -1,7 +1,7 @@ { "name": "@fal-ai/client", "description": "The fal.ai client for JavaScript and TypeScript", - "version": "1.2.1", + "version": "1.2.2", "license": "MIT", "repository": { "type": "git", diff --git a/libs/client/src/types/endpoints.ts b/libs/client/src/types/endpoints.ts index a78567c..95a1877 100644 --- a/libs/client/src/types/endpoints.ts +++ b/libs/client/src/types/endpoints.ts @@ -1,20 +1,28 @@ export type AudioFile = { /** - * + * The URL where the file can be downloaded from. */ url: string; /** - * Default value: `"audio/wav"` + * The mime type of the file. */ content_type?: string; /** - * Default value: `"8535dd59e911496a947daa35c07e67a3_tmplkcy6tut.wav"` + * The name of the file. It will be auto-generated if not provided. */ file_name?: string; /** * The size of the file in bytes. */ - file_size?: number | null; + file_size?: number; + /** + * File data + */ + file_data?: string; + /** + * The duration of the audio file in seconds. + */ + duration: number; }; export type BoundingBox = { /** @@ -86,6 +94,21 @@ export type Color = { */ b?: number; }; +export type ControlLoraWeight = { + /** + * URL or the path to the LoRA weights. + */ + path: string; + /** + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. Default value: `1` + */ + scale?: any | number; + /** + * URL of the image to be used as the control image. + */ + control_image_url: string | Blob | File; +}; export type ControlNet = { /** * URL or the path to the control net weights. @@ -189,15 +212,58 @@ export type FaceDetection = { */ sex?: string; }; -export type FalInputDevInfo = { +export type FastTextToImageRequest = { /** - * The key of the parameter that the input is associated with. + * The prompt you would like to use to generate images. */ - key: Array; + prompt: string; /** - * The class type of the input node. + * The negative prompt you would like to use to generate images. Default value: `""` */ - class_type: string; + negative_prompt?: string; + /** + * How many images you would like to generate. When using any Guidance Method, Value is set to 1. Default value: `4` + */ + num_images?: number; + /** + * The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. Default value: `"1:1"` + */ + aspect_ratio?: + | "1:1" + | "2:3" + | "3:2" + | "3:4" + | "4:3" + | "4:5" + | "5:4" + | "9:16" + | "16:9"; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The number of iterations the model goes through to refine the generated image. This parameter is optional. Default value: `8` + */ + num_inference_steps?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `5` + */ + guidance_scale?: number; + /** + * When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + */ + prompt_enhancement?: boolean; + /** + * Which medium should be included in your generated images. This parameter is optional. + */ + medium?: "photography" | "art"; + /** + * Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. Default value: `` + */ + guidance?: Array; }; export type File = { /** @@ -329,6 +395,44 @@ export type Frame = { */ url: string; }; +export type HunyuanV2VRequest = { + /** + * The prompt to generate the video from. + */ + prompt: string; + /** + * The seed to use for generating the video. + */ + seed?: number; + /** + * By default, generations are done with 35 steps. Pro mode does 55 steps which results in higher quality videos but will take more time and cost 2x more billing units. + */ + pro_mode?: boolean; + /** + * The aspect ratio of the video to generate. Default value: `"16:9"` + */ + aspect_ratio?: "16:9" | "9:16"; + /** + * The resolution of the video to generate. Default value: `"720p"` + */ + resolution?: "480p" | "580p" | "720p"; + /** + * The number of frames to generate. Default value: `"129"` + */ + num_frames?: "129" | "85"; + /** + * The URL to the LoRA model weights. Default value: `""` + */ + lora_url?: string | Blob | File; + /** + * URL of the video input. + */ + video_url: string | Blob | File; + /** + * Strength for Video-to-Video Default value: `0.8` + */ + strength?: number; +}; export type Image = { /** * The URL where the file can be downloaded from. @@ -337,23 +441,27 @@ export type Image = { /** * The mime type of the file. */ - content_type?: string | null; + content_type?: string; /** * The name of the file. It will be auto-generated if not provided. */ - file_name?: string | null; + file_name?: string; /** * The size of the file in bytes. */ - file_size?: number | null; + file_size?: number; + /** + * File data + */ + file_data?: string; /** * The width of the image in pixels. */ - width?: number | null; + width?: number; /** * The height of the image in pixels. */ - height?: number | null; + height?: number; }; export type ImagePrompt = { /** @@ -624,6 +732,69 @@ export type RGBColor = { */ b?: number; }; +export type TextToImageRequest = { + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * How many images you would like to generate. When using any Guidance Method, Value is set to 1. Default value: `4` + */ + num_images?: number; + /** + * The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. Default value: `"1:1"` + */ + aspect_ratio?: + | "1:1" + | "2:3" + | "3:2" + | "3:4" + | "4:3" + | "4:5" + | "5:4" + | "9:16" + | "16:9"; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The number of iterations the model goes through to refine the generated image. This parameter is optional. Default value: `30` + */ + num_inference_steps?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `5` + */ + guidance_scale?: number; + /** + * When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + */ + prompt_enhancement?: boolean; + /** + * Which medium should be included in your generated images. This parameter is optional. + */ + medium?: "photography" | "art"; + /** + * Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. Default value: `` + */ + guidance?: Array; +}; +export type TextToVideoLiveRequest = { + /** + * + */ + prompt: string; + /** + * Whether to use the model's prompt optimizer Default value: `true` + */ + prompt_optimizer?: boolean; +}; export type TextToVideoRequest = { /** * @@ -1199,6 +1370,18 @@ export type AnyLlmVisionOutput = { */ error?: string; }; +export type AudioInput = { + /** + * The URL of the audio file. + */ + audio_url: string | Blob | File; +}; +export type AudioOutput = { + /** + * The generated audio. + */ + audio: File; +}; export type AuraFlowInput = { /** * The prompt to generate images from @@ -1267,6 +1450,46 @@ export type AuraSrOutput = { */ timings: any; }; +export type AutoCaptionInput = { + /** + * URL to the .mp4 video with audio. Only videos of size <100MB are allowed. + */ + video_url: string | Blob | File; + /** + * Colour of the text. Can be a RGB tuple, a color name, or an hexadecimal notation. Default value: `"white"` + */ + txt_color?: string; + /** + * Font for generated captions. Choose one in 'Arial','Standard','Garamond', 'Times New Roman','Georgia', or pass a url to a .ttf file Default value: `"Standard"` + */ + txt_font?: string; + /** + * Size of text in generated captions. Default value: `24` + */ + font_size?: number; + /** + * Width of the text strokes in pixels Default value: `1` + */ + stroke_width?: number; + /** + * Left-to-right alignment of the text. Can be a string ('left', 'center', 'right') or a float (0.0-1.0) Default value: `center` + */ + left_align?: string | number; + /** + * Top-to-bottom alignment of the text. Can be a string ('top', 'center', 'bottom') or a float (0.0-1.0) Default value: `center` + */ + top_align?: string | number; + /** + * Number of seconds the captions should stay on screen. A higher number will also result in more text being displayed at once. Default value: `1.5` + */ + refresh_interval?: number; +}; +export type AutoCaptionOutput = { + /** + * URL to the caption .mp4 video. + */ + video_url: string | Blob | File; +}; export type BaseInput = { /** * The prompt to generate the video from. @@ -1310,6 +1533,63 @@ export type BaseInput = { */ export_fps?: number; }; +export type BGRemoveInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; +}; +export type BGRemoveOutput = { + /** + * The generated image + */ + image: Image; +}; +export type BGReplaceInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the reference image to be used for generating the new background. Use "" to leave empty. Either ref_image_url or bg_prompt has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Default value: `""` + */ + ref_image_url?: string | Blob | File; + /** + * The prompt you would like to use to generate images. + */ + prompt?: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * Whether to refine prompt Default value: `true` + */ + refine_prompt?: boolean; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * Whether to use the fast model Default value: `true` + */ + fast?: boolean; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type BGReplaceOutput = { + /** + * The generated images + */ + images: Array; + /** + * Seed value used for generation. + */ + seed: number; +}; export type BirefnetInput = { /** * URL of the image to remove background from @@ -1423,6 +1703,415 @@ export type BlurMaskOutput = { */ image: Image; }; +export type BriaBackgroundRemoveInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; +}; +export type BriaBackgroundRemoveOutput = { + /** + * The generated image + */ + image: Image; +}; +export type BriaBackgroundReplaceInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the reference image to be used for generating the new background. Use "" to leave empty. Either ref_image_url or bg_prompt has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Default value: `""` + */ + ref_image_url?: string | Blob | File; + /** + * The prompt you would like to use to generate images. + */ + prompt?: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * Whether to refine prompt Default value: `true` + */ + refine_prompt?: boolean; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * Whether to use the fast model Default value: `true` + */ + fast?: boolean; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type BriaBackgroundReplaceOutput = { + /** + * The generated images + */ + images: Array; + /** + * Seed value used for generation. + */ + seed: number; +}; +export type BriaEraserInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the binary mask image that represents the area that will be cleaned. + */ + mask_url: string | Blob | File; + /** + * You can use this parameter to specify the type of the input mask from the list. 'manual' opttion should be used in cases in which the mask had been generated by a user (e.g. with a brush tool), and 'automatic' mask type should be used when mask had been generated by an algorithm like 'SAM'. Default value: `"manual"` + */ + mask_type?: "manual" | "automatic"; +}; +export type BriaEraserOutput = { + /** + * The generated image + */ + image: Image; +}; +export type BriaExpandInput = { + /** + * The URL of the input image. + */ + image_url: string | Blob | File; + /** + * The desired size of the final image, after the expansion. should have an area of less than 5000x5000 pixels. + */ + canvas_size: Array; + /** + * The desired size of the original image, inside the full canvas. Ensure that the ratio of input image foreground or main subject to the canvas area is greater than 15% to achieve optimal results. + */ + original_image_size: Array; + /** + * The desired location of the original image, inside the full canvas. Provide the location of the upper left corner of the original image. The location can also be outside the canvas (the original image will be cropped). + */ + original_image_location: Array; + /** + * Text on which you wish to base the image expansion. This parameter is optional. Bria currently supports prompts in English only, excluding special characters. Default value: `""` + */ + prompt?: string; + /** + * You can choose whether you want your generated expension to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional. + */ + seed?: number; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type BriaExpandOutput = { + /** + * The generated image + */ + image: Image; + /** + * Seed value used for generation. + */ + seed: number; +}; +export type BriaGenfillInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the binary mask image that represents the area that will be cleaned. + */ + mask_url: string | Blob | File; + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type BriaGenfillOutput = { + /** + * Generated Images + */ + images: Array; +}; +export type BriaProductShotInput = { + /** + * The URL of the product shot to be placed in a lifestyle shot. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. + */ + image_url: string | Blob | File; + /** + * Text description of the new scene or background for the provided product shot. Bria currently supports prompts in English only, excluding special characters. + */ + scene_description?: string; + /** + * The URL of the reference image to be used for generating the new scene or background for the product shot. Use "" to leave empty.Either ref_image_url or scene_description has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Default value: `""` + */ + ref_image_url?: string | Blob | File; + /** + * Whether to optimize the scene description Default value: `true` + */ + optimize_description?: boolean; + /** + * The number of lifestyle product shots you would like to generate. You will get num_results x 10 results when placement_type=automatic and according to the number of required placements x num_results if placement_type=manual_placement. Default value: `1` + */ + num_results?: number; + /** + * Whether to use the fast model Default value: `true` + */ + fast?: boolean; + /** + * This parameter allows you to control the positioning of the product in the image. Choosing 'original' will preserve the original position of the product in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product. Default value: `"manual_placement"` + */ + placement_type?: + | "original" + | "automatic" + | "manual_placement" + | "manual_padding"; + /** + * This flag is only relevant when placement_type=original. If true, the output image retains the original input image's size; otherwise, the image is scaled to 1 megapixel (1MP) while preserving its aspect ratio. + */ + original_quality?: boolean; + /** + * The desired size of the final product shot. For optimal results, the total number of pixels should be around 1,000,000. This parameter is only relevant when placement_type=automatic or placement_type=manual_placement. Default value: `1000,1000` + */ + shot_size?: Array; + /** + * If you've selected placement_type=manual_placement, you should use this parameter to specify which placements/positions you would like to use from the list. You can select more than one placement in one request. Default value: `"bottom_center"` + */ + manual_placement_selection?: + | "upper_left" + | "upper_right" + | "bottom_left" + | "bottom_right" + | "right_center" + | "left_center" + | "upper_center" + | "bottom_center" + | "center_vertical" + | "center_horizontal"; + /** + * The desired padding in pixels around the product, when using placement_type=manual_padding. The order of the values is [left, right, top, bottom]. For optimal results, the total number of pixels, including padding, should be around 1,000,000. It is recommended to first use the product cutout API, get the cutout and understand the size of the result, and then define the required padding and use the cutout as an input for this API. + */ + padding_values?: Array; +}; +export type BriaProductShotOutput = { + /** + * The generated images + */ + images: Array; +}; +export type BriaTextToImageBaseInput = { + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * How many images you would like to generate. When using any Guidance Method, Value is set to 1. Default value: `4` + */ + num_images?: number; + /** + * The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. Default value: `"1:1"` + */ + aspect_ratio?: + | "1:1" + | "2:3" + | "3:2" + | "3:4" + | "4:3" + | "4:5" + | "5:4" + | "9:16" + | "16:9"; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The number of iterations the model goes through to refine the generated image. This parameter is optional. Default value: `30` + */ + num_inference_steps?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `5` + */ + guidance_scale?: number; + /** + * When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + */ + prompt_enhancement?: boolean; + /** + * Which medium should be included in your generated images. This parameter is optional. + */ + medium?: "photography" | "art"; + /** + * Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. Default value: `` + */ + guidance?: Array; +}; +export type BriaTextToImageBaseOutput = { + /** + * The generated images + */ + images: Array; + /** + * Seed value used for generation. + */ + seed: number; +}; +export type BriaTextToImageFastInput = { + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * How many images you would like to generate. When using any Guidance Method, Value is set to 1. Default value: `4` + */ + num_images?: number; + /** + * The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. Default value: `"1:1"` + */ + aspect_ratio?: + | "1:1" + | "2:3" + | "3:2" + | "3:4" + | "4:3" + | "4:5" + | "5:4" + | "9:16" + | "16:9"; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The number of iterations the model goes through to refine the generated image. This parameter is optional. Default value: `8` + */ + num_inference_steps?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `5` + */ + guidance_scale?: number; + /** + * When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + */ + prompt_enhancement?: boolean; + /** + * Which medium should be included in your generated images. This parameter is optional. + */ + medium?: "photography" | "art"; + /** + * Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. Default value: `` + */ + guidance?: Array; +}; +export type BriaTextToImageFastOutput = { + /** + * The generated images + */ + images: Array; + /** + * Seed value used for generation. + */ + seed: number; +}; +export type BriaTextToImageHdInput = { + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * How many images you would like to generate. When using any Guidance Method, Value is set to 1. Default value: `4` + */ + num_images?: number; + /** + * The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. Default value: `"1:1"` + */ + aspect_ratio?: + | "1:1" + | "2:3" + | "3:2" + | "3:4" + | "4:3" + | "4:5" + | "5:4" + | "9:16" + | "16:9"; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The number of iterations the model goes through to refine the generated image. This parameter is optional. Default value: `30` + */ + num_inference_steps?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `5` + */ + guidance_scale?: number; + /** + * When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + */ + prompt_enhancement?: boolean; + /** + * Which medium should be included in your generated images. This parameter is optional. + */ + medium?: "photography" | "art"; + /** + * Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. Default value: `` + */ + guidance?: Array; +}; +export type BriaTextToImageHdOutput = { + /** + * The generated images + */ + images: Array; + /** + * Seed value used for generation. + */ + seed: number; +}; export type CannyInput = { /** * URL of the image to process @@ -2172,6 +2861,34 @@ export type DepthMapOutput = { */ image: Image; }; +export type DetectionInput = { + /** + * Image URL to be processed + */ + image_url: string | Blob | File; + /** + * Type of detection to perform + */ + task_type: "bbox_detection" | "point_detection" | "gaze_detection"; + /** + * Text description of what to detect + */ + detection_prompt: string; + /** + * Whether to use ensemble for gaze detection + */ + use_ensemble?: boolean; +}; +export type DetectionOutput = { + /** + * Output image with detection visualization + */ + image: Image; + /** + * Detection results as text + */ + text_output: string; +}; export type DevImageToImageInput = { /** * The URL of the image to generate an image from. @@ -2334,6 +3051,11 @@ export type DifferentialDiffusionInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -2391,6 +3113,14 @@ export type DifferentialDiffusionInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to use as initial image. */ @@ -2690,6 +3420,26 @@ export type DreamshaperOutput = { */ prompt: string; }; +export type DubbingInput = { + /** + * Input video URL to be dubbed. + */ + video_url: string | Blob | File; + /** + * Target language to dub the video to Default value: `"hindi"` + */ + target_language?: "hindi" | "turkish" | "english"; + /** + * Whether to lip sync the audio to the video Default value: `true` + */ + do_lipsync?: boolean; +}; +export type DubbingOutput = { + /** + * The generated video with the lip sync. + */ + video: File; +}; export type DwposeInput = { /** * URL of the image to be processed @@ -2768,6 +3518,26 @@ export type Era3dOutput = { */ seed: number; }; +export type EraserInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the binary mask image that represents the area that will be cleaned. + */ + mask_url: string | Blob | File; + /** + * You can use this parameter to specify the type of the input mask from the list. 'manual' opttion should be used in cases in which the mask had been generated by a user (e.g. with a brush tool), and 'automatic' mask type should be used when mask had been generated by an algorithm like 'SAM'. Default value: `"manual"` + */ + mask_type?: "manual" | "automatic"; +}; +export type EraserOutput = { + /** + * The generated image + */ + image: Image; +}; export type EsrganInput = { /** * Url to input image @@ -5537,6 +6307,11 @@ export type FluxGeneralDifferentialDiffusionInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -5594,6 +6369,14 @@ export type FluxGeneralDifferentialDiffusionInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to use as initial image. */ @@ -5660,6 +6443,11 @@ export type FluxGeneralImageToImageInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -5717,6 +6505,14 @@ export type FluxGeneralImageToImageInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to use for inpainting. or img2img */ @@ -5779,6 +6575,11 @@ export type FluxGeneralInpaintingInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -5836,6 +6637,14 @@ export type FluxGeneralInpaintingInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to use for inpainting. or img2img */ @@ -5902,6 +6711,11 @@ export type FluxGeneralInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -5959,6 +6773,14 @@ export type FluxGeneralInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; }; export type FluxGeneralOutput = { /** @@ -6013,6 +6835,11 @@ export type FluxGeneralRfInversionInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -6056,6 +6883,14 @@ export type FluxGeneralRfInversionInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to be edited */ @@ -6139,7 +6974,7 @@ export type FluxLoraCannyInput = { loras?: Array; /** * The CFG (Classifier Free Guidance) scale is a measure of how close you want - * the model to stick to your prompt when looking for a related image to show you. Default value: `3.5` + * the model to stick to your prompt when looking for a related image to show you. Default value: `30` */ guidance_scale?: number; /** @@ -6220,7 +7055,7 @@ export type FluxLoraDepthInput = { loras?: Array; /** * The CFG (Classifier Free Guidance) scale is a measure of how close you want - * the model to stick to your prompt when looking for a related image to show you. Default value: `3.5` + * the model to stick to your prompt when looking for a related image to show you. Default value: `10` */ guidance_scale?: number; /** @@ -6311,6 +7146,10 @@ export type FluxLoraFastTrainingOutput = { * URL to the training configuration file. */ config_file: File; + /** + * URL to the preprocessed images. + */ + debug_preprocessed_output?: File; }; export type FluxLoraFillInput = { /** @@ -6916,6 +7755,55 @@ export type FluxProNewOutput = { */ prompt: string; }; +export type FluxProOutpaintInput = { + /** + * The prompt to generate an image from. + */ + prompt: string; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * The number of images to generate. Default value: `1` + */ + num_images?: number; + /** + * The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. Default value: `"2"` + */ + safety_tolerance?: "1" | "2" | "3" | "4" | "5" | "6"; + /** + * The format of the generated image. Default value: `"jpeg"` + */ + output_format?: "jpeg" | "png"; + /** + * The image URL to expand using outpainting + */ + image_url: string | Blob | File; + /** + * Pixels to expand at the top + */ + expand_top?: number; + /** + * Pixels to expand at the bottom + */ + expand_bottom?: number; + /** + * Pixels to expand on the left + */ + expand_left?: number; + /** + * Pixels to expand on the right + */ + expand_right?: number; +}; export type FluxProPlusTextToImageInput = { /** * The prompt to generate an image from. @@ -7919,7 +8807,7 @@ export type FooocusImagePromptInput = { */ negative_prompt?: string; /** - * The style to use. Default value: `Fooocus V2,Fooocus Enhance,Fooocus Sharp` + * The style to use. Default value: `Fooocus Enhance,Fooocus V2,Fooocus Sharp` */ styles?: Array< | "Fooocus V2" @@ -8344,7 +9232,7 @@ export type FooocusInpaintInput = { */ negative_prompt?: string; /** - * The style to use. Default value: `Fooocus V2,Fooocus Enhance,Fooocus Sharp` + * The style to use. Default value: `Fooocus Enhance,Fooocus V2,Fooocus Sharp` */ styles?: Array< | "Fooocus V2" @@ -8787,7 +9675,7 @@ export type FooocusInput = { */ negative_prompt?: string; /** - * The style to use. Default value: `Fooocus V2,Fooocus Enhance,Fooocus Sharp` + * The style to use. Default value: `Fooocus Enhance,Fooocus V2,Fooocus Sharp` */ styles?: Array< | "Fooocus V2" @@ -9167,7 +10055,7 @@ export type FooocusLegacyInput = { */ negative_prompt?: string; /** - * The style to use. Default value: `Fooocus V2,Fooocus Enhance,Fooocus Sharp` + * The style to use. Default value: `Fooocus Enhance,Fooocus V2,Fooocus Sharp` */ styles?: Array< | "Fooocus V2" @@ -9561,7 +10449,7 @@ export type FooocusUpscaleOrVaryInput = { */ negative_prompt?: string; /** - * The style to use. Default value: `Fooocus V2,Fooocus Enhance,Fooocus Sharp` + * The style to use. Default value: `Fooocus Enhance,Fooocus V2,Fooocus Sharp` */ styles?: Array< | "Fooocus V2" @@ -9947,6 +10835,39 @@ export type FooocusUpscaleOrVaryOutput = { */ has_nsfw_concepts: Array; }; +export type GenFillInput = { + /** + * Input Image to erase from + */ + image_url: string | Blob | File; + /** + * The URL of the binary mask image that represents the area that will be cleaned. + */ + mask_url: string | Blob | File; + /** + * The prompt you would like to use to generate images. + */ + prompt: string; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type GenFillOutput = { + /** + * Generated Images + */ + images: Array; +}; export type GrowMaskInput = { /** * Input image url. @@ -9967,6 +10888,24 @@ export type GrowMaskOutput = { */ image: Image; }; +export type GuidanceInput = { + /** + * The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided. + */ + image_url: string | Blob | File; + /** + * Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional. + */ + method?: + | "controlnet_canny" + | "controlnet_depth" + | "controlnet_recoloring" + | "controlnet_color_grid"; + /** + * Impact of the guidance. Default value: `1` + */ + scale?: number; +}; export type HaiperVideoV2ImageToVideoInput = { /** * @@ -10043,17 +10982,37 @@ export type HEDOutput = { }; export type HunyuanVideoInput = { /** - * The prompt to generate a video from. + * The prompt to generate the video from. */ prompt: string; /** * The seed to use for generating the video. */ seed?: number; + /** + * By default, generations are done with 35 steps. Pro mode does 55 steps which results in higher quality videos but will take more time and cost 2x more billing units. + */ + pro_mode?: boolean; + /** + * The aspect ratio of the video to generate. Default value: `"16:9"` + */ + aspect_ratio?: "16:9" | "9:16"; + /** + * The resolution of the video to generate. Default value: `"720p"` + */ + resolution?: "480p" | "580p" | "720p"; + /** + * The number of frames to generate. Default value: `"129"` + */ + num_frames?: "129" | "85"; + /** + * The URL to the LoRA model weights. Default value: `""` + */ + lora_url?: string | Blob | File; }; export type HunyuanVideoOutput = { /** - * The generated video + * */ video: File; /** @@ -10120,6 +11079,10 @@ export type Hyper3dRodinOutput = { * Seed value used for generation. */ seed: number; + /** + * Generated textures for the 3D object. + */ + textures: Array; }; export type HyperSdxlImageToImageInput = { /** @@ -10366,6 +11329,12 @@ export type HyperSdxlOutput = { */ prompt: string; }; +export type I2VLiveOutput = { + /** + * The generated video + */ + video: File; +}; export type I2VOutput = { /** * The generated video @@ -10390,7 +11359,7 @@ export type IclightV2Input = { */ mask_image_url?: string | Blob | File; /** - * Threshold for the background removal algorithm. A high threshold will produce sharper masks. Default value: `0.67` + * Threshold for the background removal algorithm. A high threshold will produce sharper masks. Note: This parameter is currently deprecated and has no effect on the output. Default value: `0.67` */ background_threshold?: number; /** @@ -10432,7 +11401,7 @@ export type IclightV2Input = { */ num_images?: number; /** - * The Default value: `1` + * The real classifier-free-guidance scale for the generation. Default value: `1` */ cfg?: number; /** @@ -10822,6 +11791,50 @@ export type IllusionDiffusionOutput = { */ seed: number; }; +export type ImageExpansionInput = { + /** + * The URL of the input image. + */ + image_url: string | Blob | File; + /** + * The desired size of the final image, after the expansion. should have an area of less than 5000x5000 pixels. + */ + canvas_size: Array; + /** + * The desired size of the original image, inside the full canvas. Ensure that the ratio of input image foreground or main subject to the canvas area is greater than 15% to achieve optimal results. + */ + original_image_size: Array; + /** + * The desired location of the original image, inside the full canvas. Provide the location of the upper left corner of the original image. The location can also be outside the canvas (the original image will be cropped). + */ + original_image_location: Array; + /** + * Text on which you wish to base the image expansion. This parameter is optional. Bria currently supports prompts in English only, excluding special characters. Default value: `""` + */ + prompt?: string; + /** + * You can choose whether you want your generated expension to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional. + */ + seed?: number; + /** + * The negative prompt you would like to use to generate images. Default value: `""` + */ + negative_prompt?: string; + /** + * Number of Images to generate. Default value: `1` + */ + num_images?: number; +}; +export type ImageExpansionOutput = { + /** + * The generated image + */ + image: Image; + /** + * Seed value used for generation. + */ + seed: number; +}; export type ImageInput = { /** * Input image url. @@ -13097,6 +14110,73 @@ export type InpaintOutput = { */ seed: number; }; +export type InpaintTurboInput = { + /** + * The prompt to generate an image from. + */ + prompt: string; + /** + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). Default value: `""` + */ + negative_prompt?: string; + /** + * The number of inference steps to perform. Default value: `4` + */ + num_inference_steps?: number; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * The number of images to generate. Default value: `1` + */ + num_images?: number; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"jpeg"` + */ + output_format?: "jpeg" | "png"; + /** + * The size of the generated image. Defaults to landscape_4_3 if no controlnet has been passed, otherwise defaults to the size of the controlnet conditioning image. + */ + image_size?: + | ImageSize + | "square_hd" + | "square" + | "portrait_4_3" + | "portrait_16_9" + | "landscape_4_3" + | "landscape_16_9"; + /** + * URL of Image for inpainting + */ + image_url: string | Blob | File; + /** + * Strength for Image-to-Image. Default value: `0.83` + */ + strength?: number; + /** + * URL of mask image for inpainting. + */ + mask_image_url: string | Blob | File; +}; export type Input = { /** * URL of the image to remove background from @@ -13341,6 +14421,74 @@ export type KlingVideoV15ProTextToVideoOutput = { */ video: File; }; +export type KlingVideoV16ProImageToVideoInput = { + /** + * + */ + prompt: string; + /** + * + */ + image_url: string | Blob | File; + /** + * The duration of the generated video in seconds Default value: `"5"` + */ + duration?: "5" | "10"; + /** + * The aspect ratio of the generated video frame Default value: `"16:9"` + */ + aspect_ratio?: "16:9" | "9:16" | "1:1"; +}; +export type KlingVideoV16ProImageToVideoOutput = { + /** + * The generated video + */ + video: File; +}; +export type KlingVideoV16StandardImageToVideoInput = { + /** + * + */ + prompt: string; + /** + * + */ + image_url: string | Blob | File; + /** + * The duration of the generated video in seconds Default value: `"5"` + */ + duration?: "5" | "10"; + /** + * The aspect ratio of the generated video frame Default value: `"16:9"` + */ + aspect_ratio?: "16:9" | "9:16" | "1:1"; +}; +export type KlingVideoV16StandardImageToVideoOutput = { + /** + * The generated video + */ + video: File; +}; +export type KlingVideoV16StandardTextToVideoInput = { + /** + * + */ + prompt: string; + /** + * The duration of the generated video in seconds Default value: `"5"` + */ + duration?: "5" | "10"; + /** + * The aspect ratio of the generated video frame Default value: `"16:9"` + */ + aspect_ratio?: "16:9" | "9:16" | "1:1"; +}; +export type KlingVideoV16StandardTextToVideoOutput = { + /** + * The generated video + */ + video: File; +}; export type KlingVideoV1ProImageToVideoInput = { /** * @@ -13690,6 +14838,30 @@ export type KolorsOutput = { */ prompt: string; }; +export type LatentsyncInput = { + /** + * The URL of the video to generate the lip sync for. + */ + video_url: string | Blob | File; + /** + * The URL of the audio to generate the lip sync for. + */ + audio_url: string | Blob | File; + /** + * Guidance scale for the model inference Default value: `1` + */ + guidance_scale?: number; + /** + * Random seed for generation Default value: `1247` + */ + seed?: number; +}; +export type LatentsyncOutput = { + /** + * The generated video with the lip sync. + */ + video: File; +}; export type LayerDiffusionInput = { /** * The prompt to use for generating the image. Be as descriptive as possible for best results. Default value: `""` @@ -13961,6 +15133,148 @@ export type LcmSd15I2iOutput = { */ nsfw_content_detected: Array; }; +export type LDMTTSInput = { + /** + * The dialogue text with turn prefixes to distinguish speakers. + */ + input: string; + /** + * A list of voice definitions for each speaker in the dialogue. Must be between 1 and 2 voices. Default value: `[object Object],[object Object]` + */ + voices?: Array; + /** + * S3 URI of the autoregressive (AR) model. + */ + ar?: string; + /** + * S3 URI of the AR LoRA model. + */ + lora?: string; + /** + * S3 URI of the vocoder model. + */ + vocoder?: string; +}; +export type LDMTTSOutput = { + /** + * The generated audio file. + */ + audio: AudioFile; +}; +export type LDMVoiceInput = { + /** + * The unique ID of a PlayHT or Cloned Voice, or a name from the available presets. + */ + voice: string; + /** + * A prefix to identify the speaker in multi-turn dialogues. Default value: `"Speaker 1: "` + */ + turn_prefix?: string; +}; +export type LeffaPoseTransferInput = { + /** + * The number of inference steps to perform. Default value: `50` + */ + num_inference_steps?: number; + /** + * The same seed and the same input given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. Default value: `2.5` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"png"` + */ + output_format?: "jpeg" | "png"; + /** + * Url for the human image. + */ + pose_image_url: string | Blob | File; + /** + * Url to the garment image. + */ + person_image_url: string | Blob | File; +}; +export type LeffaPoseTransferOutput = { + /** + * The output image. + */ + image: Image; + /** + * The seed for the inference. + */ + seed: number; + /** + * Whether the image contains NSFW concepts. + */ + has_nsfw_concepts: boolean; +}; +export type LeffaVirtualTryonInput = { + /** + * The number of inference steps to perform. Default value: `50` + */ + num_inference_steps?: number; + /** + * The same seed and the same input given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. Default value: `2.5` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"png"` + */ + output_format?: "jpeg" | "png"; + /** + * Url for the human image. + */ + human_image_url: string | Blob | File; + /** + * Url to the garment image. + */ + garment_image_url: string | Blob | File; +}; +export type LeffaVirtualTryonOutput = { + /** + * The output image. + */ + image: Image; + /** + * The seed for the inference. + */ + seed: number; + /** + * Whether the image contains NSFW concepts. + */ + has_nsfw_concepts: boolean; +}; export type LightningModelsImageToImageInput = { /** * The Lightning model to use. @@ -15426,7 +16740,23 @@ export type MiniCpmVideoOutput = { */ output: string; }; -export type MinimaxVideoImageToVideoInput = { +export type MinimaxMusicInput = { + /** + * Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Maximum 600 characters. + */ + prompt: string; + /** + * Reference song, should contain music and vocals. Must be a .wav or .mp3 file longer than 15 seconds. + */ + reference_audio_url: string | Blob | File; +}; +export type MinimaxMusicOutput = { + /** + * The generated music + */ + audio: File; +}; +export type MinimaxVideo01ImageToVideoInput = { /** * */ @@ -15440,13 +16770,13 @@ export type MinimaxVideoImageToVideoInput = { */ prompt_optimizer?: boolean; }; -export type MinimaxVideoImageToVideoOutput = { +export type MinimaxVideo01ImageToVideoOutput = { /** * The generated video */ video: File; }; -export type MinimaxVideoInput = { +export type MinimaxVideo01Input = { /** * */ @@ -15456,7 +16786,43 @@ export type MinimaxVideoInput = { */ prompt_optimizer?: boolean; }; -export type MinimaxVideoOutput = { +export type MinimaxVideo01LiveImageToVideoInput = { + /** + * + */ + prompt: string; + /** + * URL of the image to use as the first frame + */ + image_url: string | Blob | File; + /** + * Whether to use the model's prompt optimizer Default value: `true` + */ + prompt_optimizer?: boolean; +}; +export type MinimaxVideo01LiveImageToVideoOutput = { + /** + * The generated video + */ + video: File; +}; +export type MinimaxVideo01LiveInput = { + /** + * + */ + prompt: string; + /** + * Whether to use the model's prompt optimizer Default value: `true` + */ + prompt_optimizer?: boolean; +}; +export type MinimaxVideo01LiveOutput = { + /** + * The generated video + */ + video: File; +}; +export type MinimaxVideo01Output = { /** * The generated video */ @@ -15482,11 +16848,91 @@ export type MLSDOutput = { */ image: Image; }; +export type MmaudioV2Input = { + /** + * The URL of the video to generate the audio for. + */ + video_url: string | Blob | File; + /** + * The prompt to generate the audio for. + */ + prompt: string; + /** + * The negative prompt to generate the audio for. Default value: `""` + */ + negative_prompt?: string; + /** + * The seed for the random number generator + */ + seed?: number | null; + /** + * The number of steps to generate the audio for. Default value: `25` + */ + num_steps?: number; + /** + * The duration of the audio to generate. Default value: `8` + */ + duration?: number; + /** + * The strength of Classifier Free Guidance. Default value: `4.5` + */ + cfg_strength?: number; + /** + * Whether to mask away the clip. + */ + mask_away_clip?: boolean; +}; +export type MmaudioV2Output = { + /** + * The generated video with the lip sync. + */ + video: File; +}; +export type MmaudioV2TextToAudioInput = { + /** + * The prompt to generate the audio for. + */ + prompt: string; + /** + * The negative prompt to generate the audio for. Default value: `""` + */ + negative_prompt?: string; + /** + * The seed for the random number generator + */ + seed?: number | null; + /** + * The number of steps to generate the audio for. Default value: `25` + */ + num_steps?: number; + /** + * The duration of the audio to generate. Default value: `8` + */ + duration?: number; + /** + * The strength of Classifier Free Guidance. Default value: `4.5` + */ + cfg_strength?: number; + /** + * Whether to mask away the clip. + */ + mask_away_clip?: boolean; +}; +export type MmaudioV2TextToAudioOutput = { + /** + * The generated audio. + */ + audio: File; +}; export type MochiV1Input = { /** * The prompt to generate a video from. */ prompt: string; + /** + * The negative prompt for the video. Default value: `""` + */ + negative_prompt?: string; /** * The seed to use for generating the video. */ @@ -15546,6 +16992,64 @@ export type MoondreamBatchedOutput = { */ filenames?: Array; }; +export type MoondreamNextDetectionInput = { + /** + * Image URL to be processed + */ + image_url: string | Blob | File; + /** + * Type of detection to perform + */ + task_type: "bbox_detection" | "point_detection" | "gaze_detection"; + /** + * Text description of what to detect + */ + detection_prompt: string; + /** + * Whether to use ensemble for gaze detection + */ + use_ensemble?: boolean; +}; +export type MoondreamNextDetectionOutput = { + /** + * Output image with detection visualization + */ + image: Image; + /** + * Detection results as text + */ + text_output: string; +}; +export type MoondreamNextInput = { + /** + * Image URL to be processed + */ + image_url: string | Blob | File; + /** + * Type of task to perform Default value: `"caption"` + */ + task_type?: "caption" | "query"; + /** + * Prompt for query task + */ + prompt: string; + /** + * Maximum number of tokens to generate Default value: `64` + */ + max_tokens?: number; +}; +export type MoondreamNextOutput = { + /** + * Response from the model + */ + output: string; +}; +export type MoonDreamOutput = { + /** + * Response from the model + */ + output: string; +}; export type MusePoseInput = { /** * URL of the image to animate. @@ -15791,6 +17295,12 @@ export type OmniZeroOutput = { */ image: Image; }; +export type Output = { + /** + * The generated video with the lip sync. + */ + video: File; +}; export type PhotomakerInput = { /** * The URL of the image archive containing the images you want to use. @@ -15984,6 +17494,50 @@ export type PixartSigmaOutput = { */ prompt: string; }; +export type PlayaiTtsDialogInput = { + /** + * The dialogue text with turn prefixes to distinguish speakers. + */ + input: string; + /** + * A list of voice definitions for each speaker in the dialogue. Must be between 1 and 2 voices. Default value: `[object Object],[object Object]` + */ + voices?: Array; + /** + * S3 URI of the autoregressive (AR) model. + */ + ar?: string; + /** + * S3 URI of the AR LoRA model. + */ + lora?: string; + /** + * S3 URI of the vocoder model. + */ + vocoder?: string; +}; +export type PlayaiTtsDialogOutput = { + /** + * The generated audio file. + */ + audio: AudioFile; +}; +export type PlayaiTtsV3Input = { + /** + * The text to be converted to speech. + */ + input: string; + /** + * The unique ID of a PlayHT or Cloned Voice, or a name from the available presets. + */ + voice: string; +}; +export type PlayaiTtsV3Output = { + /** + * The generated audio file. + */ + audio: AudioFile; +}; export type PlaygroundV25ImageToImageInput = { /** * The URL of the image to use as a starting point for the generation. @@ -16274,6 +17828,124 @@ export type PolygonOutput = { */ polygons: Array; }; +export type PoseTransferInput = { + /** + * The number of inference steps to perform. Default value: `50` + */ + num_inference_steps?: number; + /** + * The same seed and the same input given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. Default value: `2.5` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"png"` + */ + output_format?: "jpeg" | "png"; + /** + * Url for the human image. + */ + pose_image_url: string | Blob | File; + /** + * Url to the garment image. + */ + person_image_url: string | Blob | File; +}; +export type PoseTransferOutput = { + /** + * The output image. + */ + image: Image; + /** + * The seed for the inference. + */ + seed: number; + /** + * Whether the image contains NSFW concepts. + */ + has_nsfw_concepts: boolean; +}; +export type ProductShotInput = { + /** + * The URL of the product shot to be placed in a lifestyle shot. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. + */ + image_url: string | Blob | File; + /** + * Text description of the new scene or background for the provided product shot. Bria currently supports prompts in English only, excluding special characters. + */ + scene_description?: string; + /** + * The URL of the reference image to be used for generating the new scene or background for the product shot. Use "" to leave empty.Either ref_image_url or scene_description has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Default value: `""` + */ + ref_image_url?: string | Blob | File; + /** + * Whether to optimize the scene description Default value: `true` + */ + optimize_description?: boolean; + /** + * The number of lifestyle product shots you would like to generate. You will get num_results x 10 results when placement_type=automatic and according to the number of required placements x num_results if placement_type=manual_placement. Default value: `1` + */ + num_results?: number; + /** + * Whether to use the fast model Default value: `true` + */ + fast?: boolean; + /** + * This parameter allows you to control the positioning of the product in the image. Choosing 'original' will preserve the original position of the product in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product. Default value: `"manual_placement"` + */ + placement_type?: + | "original" + | "automatic" + | "manual_placement" + | "manual_padding"; + /** + * This flag is only relevant when placement_type=original. If true, the output image retains the original input image's size; otherwise, the image is scaled to 1 megapixel (1MP) while preserving its aspect ratio. + */ + original_quality?: boolean; + /** + * The desired size of the final product shot. For optimal results, the total number of pixels should be around 1,000,000. This parameter is only relevant when placement_type=automatic or placement_type=manual_placement. Default value: `1000,1000` + */ + shot_size?: Array; + /** + * If you've selected placement_type=manual_placement, you should use this parameter to specify which placements/positions you would like to use from the list. You can select more than one placement in one request. Default value: `"bottom_center"` + */ + manual_placement_selection?: + | "upper_left" + | "upper_right" + | "bottom_left" + | "bottom_right" + | "right_center" + | "left_center" + | "upper_center" + | "bottom_center" + | "center_vertical" + | "center_horizontal"; + /** + * The desired padding in pixels around the product, when using placement_type=manual_padding. The order of the values is [left, right, top, bottom]. For optimal results, the total number of pixels, including padding, should be around 1,000,000. It is recommended to first use the product cutout API, get the cutout and understand the size of the result, and then define the required padding and use the cutout as an input for this API. + */ + padding_values?: Array; +}; +export type ProductShotOutput = { + /** + * The generated images + */ + images: Array; +}; export type PulidInput = { /** * List of reference faces, ideally 4 images. @@ -16337,6 +18009,24 @@ export type PulidOutput = { */ seed: number; }; +export type QueryInput = { + /** + * Image URL to be processed + */ + image_url: string | Blob | File; + /** + * Type of task to perform Default value: `"caption"` + */ + task_type?: "caption" | "query"; + /** + * Prompt for query task + */ + prompt: string; + /** + * Maximum number of tokens to generate Default value: `64` + */ + max_tokens?: number; +}; export type RealisticVisionImageToImageInput = { /** * The Realistic Vision model to use. @@ -16602,6 +18292,88 @@ export type RealisticVisionOutput = { */ prompt: string; }; +export type Recraft20bInput = { + /** + * + */ + prompt: string; + /** + * Default value: `square_hd` + */ + image_size?: + | ImageSize + | "square_hd" + | "square" + | "portrait_4_3" + | "portrait_16_9" + | "landscape_4_3" + | "landscape_16_9"; + /** + * The style of the generated images. Vector images cost 2X as much. Default value: `"realistic_image"` + */ + style?: + | "any" + | "realistic_image" + | "digital_illustration" + | "vector_illustration" + | "realistic_image/b_and_w" + | "realistic_image/enterprise" + | "realistic_image/hard_flash" + | "realistic_image/hdr" + | "realistic_image/motion_blur" + | "realistic_image/natural_light" + | "realistic_image/studio_portrait" + | "digital_illustration/2d_art_poster" + | "digital_illustration/2d_art_poster_2" + | "digital_illustration/3d" + | "digital_illustration/80s" + | "digital_illustration/engraving_color" + | "digital_illustration/glow" + | "digital_illustration/grain" + | "digital_illustration/hand_drawn" + | "digital_illustration/hand_drawn_outline" + | "digital_illustration/handmade_3d" + | "digital_illustration/infantile_sketch" + | "digital_illustration/kawaii" + | "digital_illustration/pixel_art" + | "digital_illustration/psychedelic" + | "digital_illustration/seamless" + | "digital_illustration/voxel" + | "digital_illustration/watercolor" + | "vector_illustration/cartoon" + | "vector_illustration/doodle_line_art" + | "vector_illustration/engraving" + | "vector_illustration/flat_2" + | "vector_illustration/kawaii" + | "vector_illustration/line_art" + | "vector_illustration/line_circuit" + | "vector_illustration/linocut" + | "vector_illustration/seamless" + | "icon/broken_line" + | "icon/colored_outline" + | "icon/colored_shapes" + | "icon/colored_shapes_gradient" + | "icon/doodle_fill" + | "icon/doodle_offset_fill" + | "icon/offset_fill" + | "icon/outline" + | "icon/outline_gradient" + | "icon/uneven_fill"; + /** + * An array of preferable colors Default value: `` + */ + colors?: Array; + /** + * The ID of the custom style reference (optional) + */ + style_id?: string; +}; +export type Recraft20bOutput = { + /** + * + */ + images: Array; +}; export type RecraftV3CreateStyleInput = { /** * URL to zip archive with images, use PNG format. Maximum 5 images are allowed. @@ -16622,6 +18394,18 @@ export type RecraftV3CreateStyleInput = { | "realistic_image/studio_portrait" | "realistic_image/enterprise" | "realistic_image/motion_blur" + | "realistic_image/evening_light" + | "realistic_image/faded_nostalgia" + | "realistic_image/forest_life" + | "realistic_image/mystic_naturalism" + | "realistic_image/natural_tones" + | "realistic_image/organic_calm" + | "realistic_image/real_life_glow" + | "realistic_image/retro_realism" + | "realistic_image/retro_snapshot" + | "realistic_image/urban_drama" + | "realistic_image/village_realism" + | "realistic_image/warm_folk" | "digital_illustration/pixel_art" | "digital_illustration/hand_drawn" | "digital_illustration/grain" @@ -16631,6 +18415,55 @@ export type RecraftV3CreateStyleInput = { | "digital_illustration/hand_drawn_outline" | "digital_illustration/engraving_color" | "digital_illustration/2d_art_poster_2" + | "digital_illustration/antiquarian" + | "digital_illustration/bold_fantasy" + | "digital_illustration/child_book" + | "digital_illustration/child_books" + | "digital_illustration/cover" + | "digital_illustration/crosshatch" + | "digital_illustration/digital_engraving" + | "digital_illustration/expressionism" + | "digital_illustration/freehand_details" + | "digital_illustration/grain_20" + | "digital_illustration/graphic_intensity" + | "digital_illustration/hard_comics" + | "digital_illustration/long_shadow" + | "digital_illustration/modern_folk" + | "digital_illustration/multicolor" + | "digital_illustration/neon_calm" + | "digital_illustration/noir" + | "digital_illustration/nostalgic_pastel" + | "digital_illustration/outline_details" + | "digital_illustration/pastel_gradient" + | "digital_illustration/pastel_sketch" + | "digital_illustration/pop_art" + | "digital_illustration/pop_renaissance" + | "digital_illustration/street_art" + | "digital_illustration/tablet_sketch" + | "digital_illustration/urban_glow" + | "digital_illustration/urban_sketching" + | "digital_illustration/vanilla_dreams" + | "digital_illustration/young_adult_book" + | "digital_illustration/young_adult_book_2" + | "vector_illustration/bold_stroke" + | "vector_illustration/chemistry" + | "vector_illustration/colored_stencil" + | "vector_illustration/contour_pop_art" + | "vector_illustration/cosmics" + | "vector_illustration/cutout" + | "vector_illustration/depressive" + | "vector_illustration/editorial" + | "vector_illustration/emotional_flat" + | "vector_illustration/infographical" + | "vector_illustration/marker_outline" + | "vector_illustration/mosaic" + | "vector_illustration/naivector" + | "vector_illustration/roundish_flat" + | "vector_illustration/segmented_colors" + | "vector_illustration/sharp_contrast" + | "vector_illustration/thin" + | "vector_illustration/vector_photo" + | "vector_illustration/vivid_shapes" | "vector_illustration/engraving" | "vector_illustration/line_art" | "vector_illustration/line_circuit" @@ -16673,6 +18506,18 @@ export type RecraftV3Input = { | "realistic_image/studio_portrait" | "realistic_image/enterprise" | "realistic_image/motion_blur" + | "realistic_image/evening_light" + | "realistic_image/faded_nostalgia" + | "realistic_image/forest_life" + | "realistic_image/mystic_naturalism" + | "realistic_image/natural_tones" + | "realistic_image/organic_calm" + | "realistic_image/real_life_glow" + | "realistic_image/retro_realism" + | "realistic_image/retro_snapshot" + | "realistic_image/urban_drama" + | "realistic_image/village_realism" + | "realistic_image/warm_folk" | "digital_illustration/pixel_art" | "digital_illustration/hand_drawn" | "digital_illustration/grain" @@ -16682,6 +18527,55 @@ export type RecraftV3Input = { | "digital_illustration/hand_drawn_outline" | "digital_illustration/engraving_color" | "digital_illustration/2d_art_poster_2" + | "digital_illustration/antiquarian" + | "digital_illustration/bold_fantasy" + | "digital_illustration/child_book" + | "digital_illustration/child_books" + | "digital_illustration/cover" + | "digital_illustration/crosshatch" + | "digital_illustration/digital_engraving" + | "digital_illustration/expressionism" + | "digital_illustration/freehand_details" + | "digital_illustration/grain_20" + | "digital_illustration/graphic_intensity" + | "digital_illustration/hard_comics" + | "digital_illustration/long_shadow" + | "digital_illustration/modern_folk" + | "digital_illustration/multicolor" + | "digital_illustration/neon_calm" + | "digital_illustration/noir" + | "digital_illustration/nostalgic_pastel" + | "digital_illustration/outline_details" + | "digital_illustration/pastel_gradient" + | "digital_illustration/pastel_sketch" + | "digital_illustration/pop_art" + | "digital_illustration/pop_renaissance" + | "digital_illustration/street_art" + | "digital_illustration/tablet_sketch" + | "digital_illustration/urban_glow" + | "digital_illustration/urban_sketching" + | "digital_illustration/vanilla_dreams" + | "digital_illustration/young_adult_book" + | "digital_illustration/young_adult_book_2" + | "vector_illustration/bold_stroke" + | "vector_illustration/chemistry" + | "vector_illustration/colored_stencil" + | "vector_illustration/contour_pop_art" + | "vector_illustration/cosmics" + | "vector_illustration/cutout" + | "vector_illustration/depressive" + | "vector_illustration/editorial" + | "vector_illustration/emotional_flat" + | "vector_illustration/infographical" + | "vector_illustration/marker_outline" + | "vector_illustration/mosaic" + | "vector_illustration/naivector" + | "vector_illustration/roundish_flat" + | "vector_illustration/segmented_colors" + | "vector_illustration/sharp_contrast" + | "vector_illustration/thin" + | "vector_illustration/vector_photo" + | "vector_illustration/vivid_shapes" | "vector_illustration/engraving" | "vector_illustration/line_art" | "vector_illustration/line_circuit" @@ -16903,6 +18797,11 @@ export type RFInversionInput = { * and they will be merged together to generate the final image. Default value: `` */ loras?: Array; + /** + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. Default value: `` + */ + control_loras?: Array; /** * The controlnets to use for the image generation. Only one controlnet is supported at the moment. Default value: `` */ @@ -16946,6 +18845,14 @@ export type RFInversionInput = { * The percentage of the total timesteps when the reference guidance is to be ended. Default value: `1` */ reference_end?: number; + /** + * Base shift for the scheduled timesteps Default value: `0.5` + */ + base_shift?: number; + /** + * Max shift for the scheduled timesteps Default value: `1.15` + */ + max_shift?: number; /** * URL of image to be edited */ @@ -17219,6 +19126,10 @@ export type Sam2VideoInput = { * Coordinates for boxes Default value: `` */ box_prompts?: Array; + /** + * Apply the mask on the video. + */ + apply_mask?: boolean; }; export type SAM2VideoInput = { /** @@ -17233,6 +19144,10 @@ export type SAM2VideoInput = { * Coordinates for boxes Default value: `` */ box_prompts?: Array; + /** + * Apply the mask on the video. + */ + apply_mask?: boolean; }; export type Sam2VideoOutput = { /** @@ -17259,6 +19174,10 @@ export type SAM2VideoRLEInput = { * Coordinates for boxes Default value: `` */ box_prompts?: Array; + /** + * Apply the mask on the video. + */ + apply_mask?: boolean; /** * Return the Run Length Encoding of the mask. */ @@ -17330,6 +19249,20 @@ export type SanaInput = { * The format of the generated image. Default value: `"png"` */ output_format?: "jpeg" | "png"; + /** + * The style to generate the image in. Default value: `"(No style)"` + */ + style_name?: + | "(No style)" + | "Cinematic" + | "Photographic" + | "Anime" + | "Manga" + | "Digital Art" + | "Pixel art" + | "Fantasy art" + | "Neonpunk" + | "3D Model"; }; export type SanaOutput = { /** @@ -18781,6 +20714,18 @@ export type StyleReferenceInput = { | "realistic_image/studio_portrait" | "realistic_image/enterprise" | "realistic_image/motion_blur" + | "realistic_image/evening_light" + | "realistic_image/faded_nostalgia" + | "realistic_image/forest_life" + | "realistic_image/mystic_naturalism" + | "realistic_image/natural_tones" + | "realistic_image/organic_calm" + | "realistic_image/real_life_glow" + | "realistic_image/retro_realism" + | "realistic_image/retro_snapshot" + | "realistic_image/urban_drama" + | "realistic_image/village_realism" + | "realistic_image/warm_folk" | "digital_illustration/pixel_art" | "digital_illustration/hand_drawn" | "digital_illustration/grain" @@ -18790,6 +20735,55 @@ export type StyleReferenceInput = { | "digital_illustration/hand_drawn_outline" | "digital_illustration/engraving_color" | "digital_illustration/2d_art_poster_2" + | "digital_illustration/antiquarian" + | "digital_illustration/bold_fantasy" + | "digital_illustration/child_book" + | "digital_illustration/child_books" + | "digital_illustration/cover" + | "digital_illustration/crosshatch" + | "digital_illustration/digital_engraving" + | "digital_illustration/expressionism" + | "digital_illustration/freehand_details" + | "digital_illustration/grain_20" + | "digital_illustration/graphic_intensity" + | "digital_illustration/hard_comics" + | "digital_illustration/long_shadow" + | "digital_illustration/modern_folk" + | "digital_illustration/multicolor" + | "digital_illustration/neon_calm" + | "digital_illustration/noir" + | "digital_illustration/nostalgic_pastel" + | "digital_illustration/outline_details" + | "digital_illustration/pastel_gradient" + | "digital_illustration/pastel_sketch" + | "digital_illustration/pop_art" + | "digital_illustration/pop_renaissance" + | "digital_illustration/street_art" + | "digital_illustration/tablet_sketch" + | "digital_illustration/urban_glow" + | "digital_illustration/urban_sketching" + | "digital_illustration/vanilla_dreams" + | "digital_illustration/young_adult_book" + | "digital_illustration/young_adult_book_2" + | "vector_illustration/bold_stroke" + | "vector_illustration/chemistry" + | "vector_illustration/colored_stencil" + | "vector_illustration/contour_pop_art" + | "vector_illustration/cosmics" + | "vector_illustration/cutout" + | "vector_illustration/depressive" + | "vector_illustration/editorial" + | "vector_illustration/emotional_flat" + | "vector_illustration/infographical" + | "vector_illustration/marker_outline" + | "vector_illustration/mosaic" + | "vector_illustration/naivector" + | "vector_illustration/roundish_flat" + | "vector_illustration/segmented_colors" + | "vector_illustration/sharp_contrast" + | "vector_illustration/thin" + | "vector_illustration/vector_photo" + | "vector_illustration/vivid_shapes" | "vector_illustration/engraving" | "vector_illustration/line_art" | "vector_illustration/line_circuit" @@ -18801,6 +20795,210 @@ export type StyleReferenceOutput = { */ style_id: string; }; +export type Switti512Input = { + /** + * The prompt to generate an image from. + */ + prompt: string; + /** + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). Default value: `""` + */ + negative_prompt?: string; + /** + * The number of top-k tokens to sample from. Default value: `400` + */ + sampling_top_k?: number; + /** + * The top-p probability to sample from. Default value: `0.95` + */ + sampling_top_p?: number; + /** + * Smoothing with Gumbel softmax sampling Default value: `true` + */ + more_smooth?: boolean; + /** + * More diverse sampling + */ + more_diverse?: boolean; + /** + * Smoothing starting scale Default value: `2` + */ + smooth_start_si?: number; + /** + * Disable CFG starting scale Default value: `8` + */ + turn_off_cfg_start_si?: number; + /** + * Temperature after disabling CFG Default value: `0.1` + */ + last_scale_temp?: number; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `6` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"jpeg"` + */ + output_format?: "jpeg" | "png"; +}; +export type Switti512Output = { + /** + * The generated images + */ + images: Array; + /** + * + */ + timings: any; + /** + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + */ + seed: number; + /** + * Whether the generated images contain NSFW concepts. + */ + has_nsfw_concepts: Array; + /** + * The prompt used for generating the image. + */ + prompt: string; +}; +export type SwittiInput = { + /** + * The prompt to generate an image from. + */ + prompt: string; + /** + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). Default value: `""` + */ + negative_prompt?: string; + /** + * The number of top-k tokens to sample from. Default value: `400` + */ + sampling_top_k?: number; + /** + * The top-p probability to sample from. Default value: `0.95` + */ + sampling_top_p?: number; + /** + * Smoothing with Gumbel softmax sampling Default value: `true` + */ + more_smooth?: boolean; + /** + * More diverse sampling + */ + more_diverse?: boolean; + /** + * Smoothing starting scale Default value: `2` + */ + smooth_start_si?: number; + /** + * Disable CFG starting scale Default value: `8` + */ + turn_off_cfg_start_si?: number; + /** + * Temperature after disabling CFG Default value: `0.1` + */ + last_scale_temp?: number; + /** + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. Default value: `6` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"jpeg"` + */ + output_format?: "jpeg" | "png"; +}; +export type SwittiOutput = { + /** + * The generated images + */ + images: Array; + /** + * + */ + timings: any; + /** + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + */ + seed: number; + /** + * Whether the generated images contain NSFW concepts. + */ + has_nsfw_concepts: Array; + /** + * The prompt used for generating the image. + */ + prompt: string; +}; +export type SyncLipsyncInput = { + /** + * The model to use for lipsyncing Default value: `"lipsync-1.8.0"` + */ + model?: "lipsync-1.8.0" | "lipsync-1.7.1"; + /** + * URL of the input video + */ + video_url: string | Blob | File; + /** + * URL of the input audio + */ + audio_url: string | Blob | File; + /** + * Lipsync mode when audio and video durations are out of sync. Default value: `"cut_off"` + */ + sync_mode?: "cut_off" | "loop" | "bounce"; +}; +export type SyncLipsyncOutput = { + /** + * The generated video + */ + video: File; +}; +export type T2VLiveOutput = { + /** + * The generated video + */ + video: File; +}; export type T2VOutput = { /** * The generated video @@ -19698,6 +21896,16 @@ export type TimestepsInput = { */ array?: Array; }; +export type TrainingInput = { + /** + * The name of the training job (required, max 255 characters). + */ + name: string; + /** + * A list of audio URLs used for training (must be between 1 and 5 URLs). + */ + training_data: Array; +}; export type TransparentImageToMaskInput = { /** * Input image url. @@ -19714,6 +21922,50 @@ export type TransparentImageToMaskOutput = { */ image: Image; }; +export type TrellisInput = { + /** + * URL of the input image to convert to 3D + */ + image_url: string | Blob | File; + /** + * Random seed for reproducibility + */ + seed?: number; + /** + * Guidance strength for sparse structure generation Default value: `7.5` + */ + ss_guidance_strength?: number; + /** + * Sampling steps for sparse structure generation Default value: `12` + */ + ss_sampling_steps?: number; + /** + * Guidance strength for structured latent generation Default value: `3` + */ + slat_guidance_strength?: number; + /** + * Sampling steps for structured latent generation Default value: `12` + */ + slat_sampling_steps?: number; + /** + * Mesh simplification factor Default value: `0.95` + */ + mesh_simplify?: number; + /** + * Texture resolution Default value: `"1024"` + */ + texture_size?: "512" | "1024" | "1536" | "2048"; +}; +export type TrellisOutput = { + /** + * Generated 3D mesh file + */ + model_mesh: File; + /** + * Processing timings + */ + timings: any; +}; export type TriposrInput = { /** * Path for the image file to be processed. @@ -19750,6 +22002,70 @@ export type TriposrOutput = { */ remeshing_dir?: File; }; +export type TryonInput = { + /** + * URL or base64 of the model image + */ + model_image: string; + /** + * URL or base64 of the garment image + */ + garment_image: string; + /** + * Category of the garment to try-on. + */ + category: "tops" | "bottoms" | "one-pieces"; + /** + * Specifies the type of garment photo to optimize internal parameters for better performance. 'model' is for photos of garments on a model, 'flat-lay' is for flat-lay or ghost mannequin images, and 'auto' attempts to automatically detect the photo type. Default value: `"auto"` + */ + garment_photo_type?: "auto" | "model" | "flat-lay"; + /** + * Runs NSFW content filter on inputs. Default value: `true` + */ + nsfw_filter?: boolean; + /** + * Allows long garments to cover the feet/shoes or change their appearance. + */ + cover_feet?: boolean; + /** + * Allow to change the appearance of the model’s hands. Example use-cases: Remove gloves, get hands out of pockets, long sleeves that should cover hands. + */ + adjust_hands?: boolean; + /** + * Apply additional steps to preserve the original background. Runtime will be slower. Not needed for simple backgrounds. + */ + restore_background?: boolean; + /** + * Apply additional steps to preserve the appearance of clothes that weren’t swapped (e.g. keep pants if trying-on top). + */ + restore_clothes?: boolean; + /** + * Adjusts internal parameters for better performance on long tops such as: Longline shirts, tunics, coats, etc. + */ + long_top?: boolean; + /** + * Higher guidance scales can help with preserving garment detail, but risks oversaturated colors. Default value: `2` + */ + guidance_scale?: number; + /** + * Determines how many steps the diffusion model will take to generate the image. For simple try-ons, steps can be reduced for faster runtime. Default value: `50` + */ + timesteps?: number; + /** + * Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results. Default value: `42` + */ + seed?: number; + /** + * Number of images to generate in a single run. Image generation has a random element in it, so trying multiple images at once increases the chances of getting a good result. Default value: `1` + */ + num_samples?: number; +}; +export type TryonOutput = { + /** + * URLs of the generated images + */ + images: Array; +}; export type UpscaleInput = { /** * Url to input image @@ -19777,6 +22093,10 @@ export type UpscaleInput = { | "RealESRGAN_x4_v3" | "RealESRGAN_x4_wdn_v3" | "RealESRGAN_x4_anime_v3"; + /** + * Output image format (png or jpeg) Default value: `"png"` + */ + output_format?: "png" | "jpeg"; }; export type UpscaleOutput = { /** @@ -19784,6 +22104,22 @@ export type UpscaleOutput = { */ image: Image; }; +export type V3TTSInput = { + /** + * The text to be converted to speech. + */ + input: string; + /** + * The unique ID of a PlayHT or Cloned Voice, or a name from the available presets. + */ + voice: string; +}; +export type V3TTSOutput = { + /** + * The generated audio file. + */ + audio: AudioFile; +}; export type VideoOutput = { /** * The generated video @@ -19841,6 +22177,22 @@ export type VideoToVideoInput = { */ strength?: number; }; +export type VideoUpscalerInput = { + /** + * The URL of the video to upscale + */ + video_url: string | Blob | File; + /** + * The scale factor Default value: `2` + */ + scale?: number; +}; +export type VideoUpscalerOutput = { + /** + * The stitched video + */ + video: File; +}; export type VisionInput = { /** * Name of the model to use. Premium models are charged at 3x the rate of standard models, they include: anthropic/claude-3.5-sonnet, anthropic/claude-3-5-haiku, google/gemini-pro-1.5, openai/gpt-4o. Default value: `"google/gemini-flash-1.5"` @@ -19865,6 +22217,58 @@ export type VisionInput = { */ image_url: string | Blob | File; }; +export type VTONInput = { + /** + * The number of inference steps to perform. Default value: `50` + */ + num_inference_steps?: number; + /** + * The same seed and the same input given to the same version of the model + * will output the same image every time. + */ + seed?: number; + /** + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. Default value: `2.5` + */ + guidance_scale?: number; + /** + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + */ + sync_mode?: boolean; + /** + * If set to true, the safety checker will be enabled. Default value: `true` + */ + enable_safety_checker?: boolean; + /** + * The format of the generated image. Default value: `"png"` + */ + output_format?: "jpeg" | "png"; + /** + * Url for the human image. + */ + human_image_url: string | Blob | File; + /** + * Url to the garment image. + */ + garment_image_url: string | Blob | File; +}; +export type VTONOutput = { + /** + * The output image. + */ + image: Image; + /** + * The seed for the inference. + */ + seed: number; + /** + * Whether the image contains NSFW concepts. + */ + has_nsfw_concepts: boolean; +}; export type WhisperInput = { /** * URL of the audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav or webm. @@ -20295,10 +22699,22 @@ export type ZoeOutput = { image: Image; }; export type EndpointTypeMap = { + "fal-ai/sync-lipsync": { + input: SyncLipsyncInput; + output: SyncLipsyncOutput; + }; + "fal-ai/minimax-music": { + input: MinimaxMusicInput; + output: MinimaxMusicOutput; + }; "fal-ai/flux-pro/v1.1-ultra": { input: FluxProV11UltraInput; output: FluxProV11UltraOutput; }; + "fal-ai/ideogram/v2": { + input: IdeogramV2Input; + output: IdeogramV2Output; + }; "fal-ai/flux-lora-fast-training": { input: FluxLoraFastTrainingInput; output: FluxLoraFastTrainingOutput; @@ -20311,9 +22727,17 @@ export type EndpointTypeMap = { input: RecraftV3Input; output: RecraftV3Output; }; - "fal-ai/minimax-video/image-to-video": { - input: MinimaxVideoImageToVideoInput; - output: MinimaxVideoImageToVideoOutput; + "fal-ai/minimax/video-01-live": { + input: MinimaxVideo01LiveInput; + output: MinimaxVideo01LiveOutput; + }; + "fal-ai/minimax/video-01-live/image-to-video": { + input: MinimaxVideo01LiveImageToVideoInput; + output: MinimaxVideo01LiveImageToVideoOutput; + }; + "fal-ai/haiper-video-v2": { + input: HaiperVideoV2Input; + output: HaiperVideoV2Output; }; "fal-ai/hyper3d/rodin": { input: Hyper3dRodinInput; @@ -20411,13 +22835,25 @@ export type EndpointTypeMap = { input: StableDiffusionV35MediumInput; output: StableDiffusionV35MediumOutput; }; + "fal-ai/switti": { + input: SwittiInput; + output: SwittiOutput; + }; + "fal-ai/switti/512": { + input: Switti512Input; + output: Switti512Output; + }; "fal-ai/recraft-v3/create-style": { input: RecraftV3CreateStyleInput; output: RecraftV3CreateStyleOutput; }; - "fal-ai/ideogram/v2": { - input: IdeogramV2Input; - output: IdeogramV2Output; + "fal-ai/minimax/video-01/image-to-video": { + input: MinimaxVideo01ImageToVideoInput; + output: MinimaxVideo01ImageToVideoOutput; + }; + "fal-ai/recraft-20b": { + input: Recraft20bInput; + output: Recraft20bOutput; }; "fal-ai/ideogram/v2/edit": { input: IdeogramV2EditInput; @@ -20439,6 +22875,42 @@ export type EndpointTypeMap = { input: IdeogramV2TurboRemixInput; output: IdeogramV2TurboRemixOutput; }; + "fal-ai/bria/text-to-image/base": { + input: BriaTextToImageBaseInput; + output: BriaTextToImageBaseOutput; + }; + "fal-ai/bria/text-to-image/fast": { + input: BriaTextToImageFastInput; + output: BriaTextToImageFastOutput; + }; + "fal-ai/bria/text-to-image/hd": { + input: BriaTextToImageHdInput; + output: BriaTextToImageHdOutput; + }; + "fal-ai/bria/eraser": { + input: BriaEraserInput; + output: BriaEraserOutput; + }; + "fal-ai/bria/product-shot": { + input: BriaProductShotInput; + output: BriaProductShotOutput; + }; + "fal-ai/bria/background/replace": { + input: BriaBackgroundReplaceInput; + output: BriaBackgroundReplaceOutput; + }; + "fal-ai/bria/genfill": { + input: BriaGenfillInput; + output: BriaGenfillOutput; + }; + "fal-ai/bria/expand": { + input: BriaExpandInput; + output: BriaExpandOutput; + }; + "fal-ai/bria/background/remove": { + input: BriaBackgroundRemoveInput; + output: BriaBackgroundRemoveOutput; + }; "fal-ai/flux-lora-fill": { input: FluxLoraFillInput; output: FluxLoraFillOutput; @@ -20503,13 +22975,9 @@ export type EndpointTypeMap = { input: StableCascadeInput; output: StableCascadeOutput; }; - "fal-ai/minimax-video": { - input: MinimaxVideoInput; - output: MinimaxVideoOutput; - }; - "fal-ai/haiper-video-v2": { - input: HaiperVideoV2Input; - output: HaiperVideoV2Output; + "fal-ai/minimax/video-01": { + input: MinimaxVideo01Input; + output: MinimaxVideo01Output; }; "fal-ai/haiper-video-v2/image-to-video": { input: HaiperVideoV2ImageToVideoInput; @@ -20523,6 +22991,22 @@ export type EndpointTypeMap = { input: HunyuanVideoInput; output: HunyuanVideoOutput; }; + "fal-ai/video-upscaler": { + input: VideoUpscalerInput; + output: VideoUpscalerOutput; + }; + "fal-ai/auto-caption": { + input: AutoCaptionInput; + output: AutoCaptionOutput; + }; + "fal-ai/mmaudio-v2": { + input: MmaudioV2Input; + output: MmaudioV2Output; + }; + "fal-ai/mmaudio-v2/text-to-audio": { + input: MmaudioV2TextToAudioInput; + output: MmaudioV2TextToAudioOutput; + }; "fal-ai/luma-dream-machine": { input: LumaDreamMachineInput; output: LumaDreamMachineOutput; @@ -20563,6 +23047,18 @@ export type EndpointTypeMap = { input: KlingVideoV15ProTextToVideoInput; output: KlingVideoV15ProTextToVideoOutput; }; + "fal-ai/kling-video/v1.6/standard/image-to-video": { + input: KlingVideoV16StandardImageToVideoInput; + output: KlingVideoV16StandardImageToVideoOutput; + }; + "fal-ai/kling-video/v1.6/standard/text-to-video": { + input: KlingVideoV16StandardTextToVideoInput; + output: KlingVideoV16StandardTextToVideoOutput; + }; + "fal-ai/kling-video/v1.6/pro/image-to-video": { + input: KlingVideoV16ProImageToVideoInput; + output: KlingVideoV16ProImageToVideoOutput; + }; "fal-ai/cogvideox-5b": { input: Cogvideox5bInput; output: Cogvideox5bOutput; @@ -20867,6 +23363,10 @@ export type EndpointTypeMap = { input: MusetalkInput; output: MusetalkOutput; }; + "fal-ai/dubbing": { + input: DubbingInput; + output: DubbingOutput; + }; "fal-ai/sadtalker/reference": { input: SadtalkerReferenceInput; output: SadtalkerReferenceOutput; @@ -20915,6 +23415,14 @@ export type EndpointTypeMap = { input: OmniZeroInput; output: OmniZeroOutput; }; + "fal-ai/leffa/virtual-tryon": { + input: LeffaVirtualTryonInput; + output: LeffaVirtualTryonOutput; + }; + "fal-ai/leffa/pose-transfer": { + input: LeffaPoseTransferInput; + output: LeffaPoseTransferOutput; + }; "fal-ai/cat-vton": { input: CatVtonInput; output: CatVtonOutput; @@ -21091,4 +23599,32 @@ export type EndpointTypeMap = { input: F5TtsInput; output: F5TtsOutput; }; + "fashn/tryon": { + input: TryonInput; + output: TryonOutput; + }; + "fal-ai/trellis": { + input: TrellisInput; + output: TrellisOutput; + }; + "fal-ai/playai/tts/v3": { + input: PlayaiTtsV3Input; + output: PlayaiTtsV3Output; + }; + "fal-ai/playai/tts/dialog": { + input: PlayaiTtsDialogInput; + output: PlayaiTtsDialogOutput; + }; + "fal-ai/latentsync": { + input: LatentsyncInput; + output: LatentsyncOutput; + }; + "fal-ai/moondream-next": { + input: MoondreamNextInput; + output: MoondreamNextOutput; + }; + "fal-ai/moondream-next/detection": { + input: MoondreamNextDetectionInput; + output: MoondreamNextDetectionOutput; + }; };