Interface HordeApi


public interface HordeApi
Retrofit interface for the AI Horde API v2.
  • Method Details

    • generateImageAsync

      @POST("/v2/generate/async") retrofit2.Call<RequestAsync> generateImageAsync(@Header("apikey") String apiKey, @Header("Client-Agent") String clientAgent, @Body GenerationInputStable request)
      Initiates an asynchronous image generation request.
      Parameters:
      apiKey - The API key for authentication
      clientAgent - The client agent header
      request - The generation request parameters
      Returns:
      A call that returns the async request ID
    • checkImageGeneration

      @GET("/v2/generate/check/{id}") retrofit2.Call<RequestStatusCheck> checkImageGeneration(@Path("id") String id)
      Checks the status of an image generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the status check
    • getImageGenerationStatus

      @GET("/v2/generate/status/{id}") retrofit2.Call<RequestStatusStable> getImageGenerationStatus(@Path("id") String id)
      Gets the full status and results of an image generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the full status with generated images
    • cancelImageGeneration

      @DELETE("/v2/generate/status/{id}") retrofit2.Call<RequestStatusStable> cancelImageGeneration(@Path("id") String id)
      Cancels a pending image generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the status
    • generateTextAsync

      @POST("/v2/generate/text/async") retrofit2.Call<RequestAsync> generateTextAsync(@Header("apikey") String apiKey, @Header("Client-Agent") String clientAgent, @Body GenerationInputKobold request)
      Initiates an asynchronous text generation request.
      Parameters:
      apiKey - The API key for authentication
      clientAgent - The client agent header
      request - The generation request parameters
      Returns:
      A call that returns the async request ID
    • checkTextGeneration

      @GET("/v2/generate/text/check/{id}") retrofit2.Call<RequestStatusCheck> checkTextGeneration(@Path("id") String id)
      Checks the status of a text generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the status check
    • getTextGenerationStatus

      @GET("/v2/generate/text/status/{id}") retrofit2.Call<RequestStatusKobold> getTextGenerationStatus(@Path("id") String id)
      Gets the full status and results of a text generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the full status with generated text
    • cancelTextGeneration

      @DELETE("/v2/generate/text/status/{id}") retrofit2.Call<RequestStatusKobold> cancelTextGeneration(@Path("id") String id)
      Cancels a pending text generation request.
      Parameters:
      id - The request UUID
      Returns:
      A call that returns the status
    • findUser

      @GET("/v2/find_user") retrofit2.Call<UserDetails> findUser(@Header("apikey") String apiKey, @Header("Client-Agent") String clientAgent)
      Gets the details of the authenticated user.
      Parameters:
      apiKey - The API key for authentication
      clientAgent - The client agent header
      Returns:
      A call that returns user details
    • getActiveModels

      @GET("/v2/status/models") retrofit2.Call<List<ActiveModel>> getActiveModels(@Query("type") String type, @Query("min_count") Integer minCount)
      Gets the list of active models.
      Parameters:
      type - Filter by model type (image or text)
      minCount - Minimum number of workers
      Returns:
      A call that returns the list of active models
    • getActiveModels

      @GET("/v2/status/models") retrofit2.Call<List<ActiveModel>> getActiveModels()
      Gets all active models without filters.
      Returns:
      A call that returns the list of active models