createImageVariation abstract method

  1. @Post(path: "/v1/images/variations")
  2. @Multipart()
Future<Response<Data<ImageUrl>>> createImageVariation(
  1. @PartFile("image") List<int> image, {
  2. @Part("n") int n = 1,
  3. @Part("size") String? size,
  4. @Part("response_format") String? responseFormat,
  5. @Part("user") String? user,
})

Returns a variation of a given image.

size must be one of 256x256, 512x512, or 1024x1024. responseFormat must be one of url or b64_json.

Implementation

@Post(path: "/v1/images/variations")
@Multipart()
Future<Response<Data<ImageUrl>>> createImageVariation(
  @PartFile("image") List<int> image, {
  @Part("n") int n = 1,
  @Part("size") String? size,
  @Part("response_format") String? responseFormat,
  @Part("user") String? user,
});