KtorStabilityAiGenerationApi
class KtorStabilityAiGenerationApi(val httpClient: HttpClient, val baseUrl: String, val json: Json = defaultNetworkJson) : StabilityAiGenerationApi(source)
Ktor implementation of Stability AI generation calls with counted inference traffic.
Author
Dmitriy Moroz
Parameters
httpClient
Configured Ktor client used to send provider requests.
baseUrl
Stability AI API base URL.
json
JSON codec used for counted request/response payloads.
Functions
Link copied to clipboard
Loads SDAI data through fetchCredits.
Link copied to clipboard
open suspend override fun imageToImage(apiKey: String, engineId: String, imageBytes: ByteArray, parameters: Map<String, String>): StabilityGenerationResponse
Executes the imageToImage step in the SDAI network layer.
Link copied to clipboard
Link copied to clipboard
open suspend override fun textToImage(apiKey: String, engineId: String, request: StabilityTextToImageRequest): StabilityGenerationResponse
Executes the textToImage step in the SDAI network layer.
Link copied to clipboard
Executes the validateBearerToken step in the SDAI network layer.