in src/Custom/Images/ImageEditOptions.cs [94:128]
internal MultiPartFormDataBinaryContent ToMultipartContent(Stream image, string imageFilename, Stream mask, string maskFilename)
{
MultiPartFormDataBinaryContent content = new();
content.Add(image, "image", imageFilename);
content.Add(Prompt, "prompt");
content.Add(Model.Value.ToString(), "model");
if (mask is not null)
{
content.Add(mask, "mask", maskFilename);
}
if (N is not null)
{
content.Add(N.Value, "n");
}
if (ResponseFormat is not null)
{
content.Add(ResponseFormat.ToString(), "response_format");
}
if (Size is not null)
{
content.Add(Size.ToString(), "size");
}
if (EndUserId is not null)
{
content.Add(EndUserId, "user");
}
return content;
}