# BAD REQUEST at dall-e's createImageEdit function

**URL:** https://community.openai.com/t/bad-request-at-dall-es-createimageedit-function/53884
**Category:** API
**Created:** [February 9, 2023, 12:58am UTC](https://community.openai.com/t/bad-request-at-dall-es-createimageedit-function/53884 "2023-02-09T00:58:18Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)
#### Post date: [February 9, 2023, 1:35am UTC](https://community.openai.com/t/bad-request-at-dall-es-createimageedit-function/53884/2 "2023-02-09T01:35:28Z")

</div>

![image](https://us1.discourse-cdn.com/openai1/original/3X/2/a/2aeb13013c4036dd55a75c64b803c65fd5f62758.png)

> [@\[SOLVED\] File upload REST API help?](https://community.openai.com/t/solved-file-upload-rest-api-help/32647/6):
>
> This is some “Typescript” code for Dall-E. It uses files as well const response = await openai.createImageEdit( fs.createReadStream(“sunlit\_lounge.png”) as any, fs.createReadStream(“mask.png”) as any, “A sunlit indoor lounge area with a pool containing a flamingo”, 1, “1024x1024” ); The key thing is that they are using a file system ReadStream (but it is an image). I suspect that if you are not using an openai library to help you, you will have to read the file at your end and feed its c…

---

_[View the full topic](https://community.openai.com/t/bad-request-at-dall-es-createimageedit-function/53884)._
