Package ai.fal.client
Interface AsyncFalClient
- All Known Implementing Classes:
AsyncFalClientImpl
public interface AsyncFalClient
-
Method Summary
Modifier and TypeMethodDescriptionqueue()<O> CompletableFuture<ai.fal.client.Output<O>> <O> CompletableFuture<ai.fal.client.Output<O>> static AsyncFalClientwithConfig(ai.fal.client.ClientConfig config) Create a new client instance with the provided configuration.static AsyncFalClientCreate a new client instance with the credentials resolved from the `FAL_KEY` environment variable.static AsyncFalClientwithProxyUrl(String proxyUrl) Create a new client instance with the provided proxy URL.
-
Method Details
-
run
<O> CompletableFuture<ai.fal.client.Output<O>> run(String endpointId, ai.fal.client.RunOptions<O> options) -
subscribe
<O> CompletableFuture<ai.fal.client.Output<O>> subscribe(String endpointId, ai.fal.client.SubscribeOptions<O> options) -
queue
AsyncQueueClient queue() -
withConfig
Create a new client instance with the provided configuration.- Parameters:
config- The client configuration.- Returns:
- The new client instance.
-
withEnvCredentials
Create a new client instance with the credentials resolved from the `FAL_KEY` environment variable.- Returns:
- The new client instance.
-
withProxyUrl
Create a new client instance with the provided proxy URL. With this configuration all requests will be proxied through the provided URL and the fal target url will be in a request header called `X-Fal-Target-Url`.- Parameters:
proxyUrl- The proxy URL.- Returns:
- The new client instance.
-