You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
991 B
37 lines
991 B
using Refit; |
|
using StabilityMatrix.Core.Models.Api.Comfy; |
|
|
|
namespace StabilityMatrix.Core.Api; |
|
|
|
[Headers("User-Agent: StabilityMatrix")] |
|
public interface IComfyApi |
|
{ |
|
[Post("/prompt")] |
|
Task<ComfyPromptResponse> PostPrompt( |
|
[Body] ComfyPromptRequest prompt, |
|
CancellationToken cancellationToken = default |
|
); |
|
|
|
[Post("/interrupt")] |
|
Task PostInterrupt(CancellationToken cancellationToken = default); |
|
|
|
[Get("/history/{promptId}")] |
|
Task<Dictionary<string, ComfyHistoryResponse>> GetHistory( |
|
string promptId, |
|
CancellationToken cancellationToken = default |
|
); |
|
|
|
[Get("/object_info/{nodeType}")] |
|
Task<Dictionary<string, ComfyObjectInfo>> GetObjectInfo( |
|
string nodeType, |
|
CancellationToken cancellationToken = default |
|
); |
|
|
|
[Get("/view")] |
|
Task<Stream> GetImage( |
|
string filename, |
|
string subfolder, |
|
string type, |
|
CancellationToken cancellationToken = default |
|
); |
|
}
|
|
|