Interface QueueClient

All Known Implementing Classes:
QueueClientImpl

public interface QueueClient
A client for interacting with the queue endpoints.
  • Method Details

    • submit

      @Nonnull QueueStatus.InQueue submit(String endpointId, QueueSubmitOptions options)
      Submit a payload to an endpoint's queue.
      Parameters:
      endpointId - the endpoint to submit to (e.g. `fal-ai/fast-sdxl`)
      options - the submit options
      Returns:
      the status of the submission with the `requestId` for tracking the submission.
    • status

      @Nonnull QueueStatus.StatusUpdate status(@Nonnull String endpointId, @Nonnull QueueStatusOptions options)
      Check the status of a submission.
      Parameters:
      endpointId - the endpoint to cancel the submission for
      options - the status check options
      Returns:
      the status of the submission
    • subscribeToStatus

      @Nonnull QueueStatus.Completed subscribeToStatus(@Nonnull String endpointId, @Nonnull QueueSubscribeOptions options)
      Subscribe to the status of a submission.
      Parameters:
      endpointId - the endpoint to subscribe to the status for
      options - the subscribe options
      Returns:
      the status of the submission
    • result

      @Nonnull <O> Output<O> result(@Nonnull String endpointId, @Nonnull QueueResultOptions<O> options)
      Get the result of a submission.
      Type Parameters:
      O - the type of the output payload
      Parameters:
      endpointId - the endpoint to get the result for
      options - the response options
      Returns:
      the result of the submission