generate method

String generate(
  1. String optsJson
)

Generate images from optsJson (serialized ImageCallOptions).

Returns the JSON-serialized ImageResult, or throws AimuxException.

Implementation

String generate(String optsJson) {
  _checkOpen();
  return withAimuxCError((err) {
    return withUtf8(optsJson, (optsPtr) {
      final resultPtr = _ffi.imageGenerate(_handle, optsPtr, err);
      return takeString(resultPtr, err);
    });
  });
}