StabilityAiClient class

Constructors

StabilityAiClient({required String apiKey, String baseUrl = "api.stability.ai"})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateImageBase64FromImage({String? apiKey, required String engineId, required ImageToImageRequestParams params, required Uint8List initImage, String? organization, String? clientId, String? clientVersion}) Future<List<ImageResponse>>
Modify an image based on a text prompt
generateImageBase64FromText({required String engineId, required TextToImageRequestParams params, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<List<ImageResponse>>
Generates an image from the input prompts and returns it as a base64 string.
generateImageBase64WithMask({String? apiKey, required String engineId, required ImageMaskingRequestParam params, required Uint8List initImage, String? organization, String? clientId, String? clientVersion}) Future<List<ImageResponse>>
Selectively modify portions of an image using a mask
generateImagePngFromImage({required String engineId, required ImageToImageRequestParams params, required Uint8List initImage, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<Uint8List>
Modify an image based on a text prompt and returns the image PNG bytes.
generateImagePngFromText({required String engineId, required TextToImageRequestParams params, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<Uint8List>
Generates an image from the specified prompt and returns the set of bytes in PNG format.
generateImagePngWithMask({required String engineId, required ImageMaskingRequestParam params, required Uint8List initImage, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<Uint8List>
Selectively modify portions of an image using a mask Returns the bytes of the image PNG
getAccount({String? apiKey}) Future<Account>
Get information about the account associated with the provided API key
getBalance({String? apiKey}) Future<Balance>
Get the credit balance of the account/organization associated with the API key
getEngines({String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<List<Engine>>
Gets the list of engines available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upScaleImageBase64({required String engineId, required ImageUpScaleRequestParams params, required Uint8List image, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<List<ImageResponse>>
Create a higher resolution version of an input image.
upScaleImagePng({required String engineId, required ImageUpScaleRequestParams params, required Uint8List image, String? apiKey, String? organization, String? clientId, String? clientVersion}) Future<Uint8List>
Create a higher resolution version of an input image.

Operators

operator ==(Object other) bool
The equality operator.
inherited