# DALL-E 2 > OpenAI's legacy image generation model supporting generations, edits with masks (inpainting), and variations ## Quick Reference - Model ID: dall-e-2 - Creator: OpenAI - Status: deprecated - Family: dall-e - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Resolution: 1024x1024 - Max Output Images: 10 - Input Modalities: text, image - Output Modalities: image - Supported Modes: Text to Image, Image Edit ## API Parameters The compiled parameter schema for this model is available via the API: `GET /v1/models/dall-e-2?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Text prompt for image generation. Modes: Text to Image, Image Edit - `quality` (string): Image quality level. Values: standard. Modes: Text to Image ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9"). Values: 256x256, 512x512, 1024x1024. Modes: Text to Image, Image Edit - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1"). Values: 1:1. Modes: Text to Image, Image Edit - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Values: 0.5K, 1K. Modes: Text to Image, Image Edit ### Media Inputs - `image` (file) — REQUIRED: Input image(s) to edit. Modes: Image Edit ### Output & Format - `response_format` (string): Transport format for returned images. URLs are valid for 60 minutes.. Default: url. Values: b64_json, url. Modes: Text to Image, Image Edit. Only available via openai - `output_format` (string): Output image format. Values: png, jpeg, gif, webp, avif. Modes: Text to Image, Image Edit - `output_compression` (integer): Compression level for lossy formats (JPEG, WebP, AVIF). Modes: Text to Image, Image Edit - `n` (integer): Number of images to generate. Default: 1. Modes: Text to Image, Image Edit ### Additional Parameters - `user` (string): Stable end-user identifier used by OpenAI abuse monitoring.. Modes: Text to Image, Image Edit. Only available via openai ## Model Identifiers - Primary Slug: dall-e-2 ## Dates - Released: April 2022 - Sunset Date: May 12, 2026 ## Tags image-generation, text-to-image, image-editing, inpainting ## Available Providers ### Replicate - Config Key: replicate/dall-e-2 - Provider Model ID: openai/dall-e-2 - Pricing: $0.020/image - Source: https://replicate.com/openai/dall-e-2 ### OpenAI - Config Key: openai/dall-e-2 - Provider Model ID: dall-e-2 - Pricing: $0.016/image, $0.018/image, $0.020/image - Note: Deprecated model - will stop being supported on May 12, 2026 - Note: Pricing is per image, varying by size - Note: Supports generations, edits with masks (inpainting), and variations - Source: https://platform.openai.com/docs/pricing ## Arena Benchmarks ### Isometric Miniature Diorama Scenes - Elo: 1171 - Record: 2W / 5L / 1T (8 battles) - Rank: #35 of 72 ### Candid Street Photography - Elo: 1140 - Record: 2W / 3L / 0T (5 battles) - Rank: #39 of 68 ### Geometric Composition - Elo: 1103 - Record: 2W / 17L / 0T (19 battles) - Rank: #55 of 70 ### Modern Clean Menu - Elo: 1090 - Record: 1W / 15L / 0T (16 battles) - Rank: #53 of 69 ### Magic Burger Explosion: Fiery Photorealism Challenge - Elo: 1068 - Record: 3W / 8L / 0T (11 battles) - Rank: #62 of 69 ### Vintage Cafe Logo - Elo: 1062 - Record: 1W / 13L / 1T (15 battles) - Rank: #59 of 70 ### The Halloween Invitation - Elo: 1061 - Record: 2W / 7L / 1T (10 battles) - Rank: #61 of 70 ### Adorable Baby Animals in Sunny Meadow - Elo: 1058 - Record: 2W / 8L / 2T (12 battles) - Rank: #65 of 72 ### Fantasy Warrior - Elo: 1051 - Record: 1W / 13L / 0T (14 battles) - Rank: #62 of 71 ### The Reversed Rodeo - Elo: 1034 - Record: 1W / 4L / 2T (7 battles) - Rank: #61 of 68 ### Apollo 11: Journey to Tranquility - Elo: 1012 - Record: 0W / 10L / 0T (10 battles) - Rank: #65 of 70 ### The Capybara Taxi Driver - Elo: 997 - Record: 0W / 14L / 0T (14 battles) - Rank: #68 of 69 ### Chalkboard Menu - Elo: 988 - Record: 0W / 10L / 0T (10 battles) - Rank: #69 of 69 ## Use Cases & Category Performance ### Art (Text-to-Image) - Rank: #11 of 58 - Elo: 1223 - Record: 3W / 11L / 3T (17 battles) - Win Rate: 17.6% ### 3D Imaging & Modeling (Text-to-Image) - Rank: #46 of 61 - Elo: 1169 - Record: 4W / 22L / 1T (27 battles) - Win Rate: 14.8% ### Prompt Adherence (Text-to-Image) - Rank: #51 of 62 - Elo: 1192 - Record: 11W / 91L / 5T (107 battles) - Win Rate: 10.3% ### Portraits (Text-to-Image) - Rank: #50 of 53 - Elo: 1030 - Record: 1W / 13L / 0T (14 battles) - Win Rate: 7.1% ### Cartoon, Anime & Fantasy (Text-to-Image) - Rank: #50 of 53 - Elo: 1030 - Record: 1W / 13L / 0T (14 battles) - Win Rate: 7.1% ### Text Rendering (Text-to-Image) - Rank: #59 of 61 - Elo: 1150 - Record: 9W / 68L / 3T (80 battles) - Win Rate: 11.3% ### Product, Branding & Commercial (Text-to-Image) - Rank: #59 of 61 - Elo: 1135 - Record: 7W / 63L / 2T (72 battles) - Win Rate: 9.7% ### Photorealism (Text-to-Image) - Rank: #61 of 62 - Elo: 1103 - Record: 11W / 77L / 4T (92 battles) - Win Rate: 12.0% ### Creativity (Text-to-Image) - Rank: #61 of 62 - Elo: 1148 - Record: 7W / 52L / 5T (64 battles) - Win Rate: 10.9% ### Aesthetics (Text-to-Image) - Rank: #61 of 62 - Elo: 1156 - Record: 17W / 107L / 7T (131 battles) - Win Rate: 13.0% ## Image Gallery 47 images available for this model. Browse all at https://lumenfall.ai/models/openai/dall-e-2/gallery ### Curated Examples - [A wide, cinematic shot of a sophisticated artisan chocolate boutique at dusk, where the name "DAL...](https://assets.lumenfall.ai/yMnc7Gev_1nMH6Km9AlaCuVb5Xr17eAWwdHV3lHdGGQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/239d16dko8aewcszjrxqpliwluqi@jpeg) - [A high resolution image of the text 'Lumenfall' made out of a computer chip.](https://assets.lumenfall.ai/n5PkiBQPPtxmcSql4HUqggOv0tlaAwo8_gB78whCK8k/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/i2p0dy99fw9qx62aw0pnnnik0dlz@jpeg) - [CCTV footage of Jesus Christ stealing a bike](https://assets.lumenfall.ai/6Ps6HvXdqUk_8xNk3nedpJGAvB1x6ukH5VoUfQs3NPY/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/0spd8fjzhuucbo99dn0uxo9f95vu@jpeg) - [Crungus](https://assets.lumenfall.ai/cUuaGNBZ8O4MJAvY97p-18ZYQyHis8w8ibUR_XRp8Rc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/8a1vpl7npxn4p96pr1kueqde2f7y@jpeg) - [Jar Jar Binks at the Nuremberg Trials](https://assets.lumenfall.ai/HN7Y4AB86hUvlw53hU_HKrqGtjBOWgdFyAwOgCk1ZQw/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/mjnjjqjx8f6dkpmsoavsd5sh3k0w@jpeg) - [courtroom sketch of Snoop Dogg being sued by Snoopy](https://assets.lumenfall.ai/elZKSxGpX9fTcUlNfxOTdFsMnXNF-816ks8gSXsc8zg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/wmx2io3l3tqnhopoik8f3knqcyyf@jpeg) - [close-up photo of two realistic human hands holding a coffee cup, ten fingers visible, natural an...](https://assets.lumenfall.ai/eJzfB2ZZbMtdOtPPfNIT2KmS3Bcf4gGPyxEYQeDFAPI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/5ob8qpcj516wdai3colx6wnj7lv0@jpeg) - [A green sign that says "Very Deep Learning" and is at the edge of the Grand Canyon, Two baseballs...](https://assets.lumenfall.ai/3UwzWUQPP1cA_0ByEu7gxgfYuT81LYWwdtVI-SJq4Wg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/clygxh9j6359n88s95xplg0aky1v@jpeg) - [A capybara dancing tango with a cat](https://assets.lumenfall.ai/w-DTynam_31UwZEgXqsh-D_O6fjOI6SBOmDYsIRXGiM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/549isz6lusv8pltxd5mt211yn61h@jpeg) - [Two Prussian soldiers wearing spiked pith helmets are facing each other and playing a game of rin...](https://assets.lumenfall.ai/aZ6C4Gwvg4Jy76e41aAl42EOybDTleipVtX3GVyO0sI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/d90u3408dxzi4yu58dflyz6k25j3@jpeg) - [A digital illustration of a star with exactly 9 points.](https://assets.lumenfall.ai/Oe-57ddOfdgJhk8mMz5qsqRtrmOnyTnItiS0y_eba4o/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/pjon5g8gaopascr50sap5w1084ed@jpeg) - [A dolphin is using its fluke to discipline a mermaid by paddling it across the backside.](https://assets.lumenfall.ai/qNIHsapA1KyJNFk1hIqJx5cwynxUpNyzfGJae7xztqI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/x1jy9tcr4a4gzmzr99954l0xd3hx@jpeg) - [A real octopus with each tentacle covered by a sock puppet.](https://assets.lumenfall.ai/asjB_xd7Jq0JVCXYLObNe9urczk-ytkFZKmf133o9Vo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/anxrll5gv1umiebjxpfg4qro8jwd@jpeg) - [A raytraced scene with five solid colored cubes. The red cube is stacked on the blue cube. The bl...](https://assets.lumenfall.ai/GuNO1srQMwZ6Kzfef55im4wmXKlyJIb7kgSjqBHLrbQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/u9h4pzwc657ulumz2s79n04ee3e6@jpeg) - [A painting of a powerful angelic blacksmith holding a molten halo with a pair of metallic tongs a...](https://assets.lumenfall.ai/x53EwNbiu8t1l5NdfWdxzvXvc3nPL8l_IU_7JCS8vNo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/3eeiy5sinpp5vw6vh4mfmg14z11q@jpeg) - [A man with only four fingers on one hand and six fingers on his other hand.](https://assets.lumenfall.ai/IQbhlYUDaCltpJumtAM2HdlpgEDbBlh9HAK59IBxBTo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/gun58ht2711ubvtvep2twjfwxylr@jpeg) - [A photo of a brightly colored coral snake but with the bands of color red, blue, green, purple, a...](https://assets.lumenfall.ai/mSx5eeBY-5q2YtZI7EuPx-AP3Wi9oa05VAeBUCncNqo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/gc07x0vatyjjvwlfj64wm24udxuh@jpeg) - [A flat earth-like planet which resembles a flat disc is overpopulated with people. The people are...](https://assets.lumenfall.ai/g9_ROzvG0iwA9gXk1Ey-cbRVarwept6SVKjR22xySFQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/etot33dg3tqt8r0sfxkprsrnp7yj@jpeg) - [A frustrated Einstein fighting a Eureka moment - the sparking idea light-bulb floats above his he...](https://assets.lumenfall.ai/2Ba2kwJEQAZ19EaMgnaLzohzP6otYBh-NsC2MIbXPL0/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/a355fy5t6hqbjrl1b07c3s9l0cxb@jpeg) - [A standard 2d maze with a single clearly marked exit and a single clearly marked entrance. A dash...](https://assets.lumenfall.ai/zYVJS-C_v0wB-leI4oUua-Kg_Z0ERnGuzR9ZQjKxnU8/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/k5odp46jbfweng357culks21uugh@jpeg) - [A fantasy illustration of an arctic pirate on the bridge of their galleon ship. The pirate has a ...](https://assets.lumenfall.ai/0hWLAIoF0oTeWA4DEtuokGK4w5lJf-gLR3J0tTG0DK8/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/dah4d0ehgjk8he6ctumfdbiuk8o1@jpeg) - [A twenty-sided die (D20) with the first twenty prime numbers (2, 3, 5, 7, 11, 13, 17, 19, 23, 29,...](https://assets.lumenfall.ai/rQiqJW8nGBZMKvHNibPCKKZ7ccRWWQGQpY0ymkiGCFY/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/jszgkxrptrwt5rwhjqwk3gom9vbq@jpeg) - [A capybara dancing tango with a cat](https://assets.lumenfall.ai/skQBryeha_gSmr4oCJZNjiEg__ZuZMPCb9uDqGJYZtc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ntzgb57euga90ss8ct9rg0v6tows@jpeg) - [A photo of a Corgi dog riding a bike in Times Square. It is wearing sunglasses and a beach hat.](https://assets.lumenfall.ai/qY09gzxCTS_LHCi_mtDshP6dUxUD1t9UYFAK7mlIdvg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/6n2sp3t1f8dznnhjxjgizoupvcv6@jpeg) - [A photorealistic image of an astronaut riding a horse](https://assets.lumenfall.ai/BetLexxmdEFbuq0H-qStE3eAlSGBPEfxELk8og2HWWQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/qdmj8qyont9kj4sueje14em1tneo@jpeg) - [a horse riding an astronaut](https://assets.lumenfall.ai/a1LHWXViMRHAoMRxsHeNZdvvzrhd1E8bN5yqtS6KPgc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/lperfae71dqspfqepne75nt6fikh@jpeg) - [A cute corgi lives in a house made out of sushi.](https://assets.lumenfall.ai/hwS5RGSZqr86v2mNUY8AahkAJ_J7BPr0DdiWqtvy3Gc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/61au4scxumhjbsxd07dk1u0exboi@jpeg) - [CCTV footage of Jesus Christ stealing a bike](https://assets.lumenfall.ai/HokeEzrc-mTI3c-hRHfy1o2CCS6O-Mpa3taqeYL9mds/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/m0f78ikshzj5lqwq5kszidscmz7h@jpeg) - [A dragon flying through Fifth Avenue in NYC](https://assets.lumenfall.ai/2OPlxb9GhmkNV3wr_oew73qydMGpLUfFb2RQ3wrXDIo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/hi97pd25ie3rh8862zbecqhton7n@jpeg) - [an armchair in the shape of an avocado](https://assets.lumenfall.ai/r8XmXF8w3SuLQ3sBUlp2iE5QMYmdX1k7n_-SEY_1Jzo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/khh1b0b6wsh28vd1tvjprssxdovd@jpeg) - [an illustration of a baby daikon radish in a tutu walking a dog](https://assets.lumenfall.ai/Md2WnSQ0o73jBk7A_QXOQDogO2TmZRe3s95nVRIDtxs/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/40i9klbu982wcp6egrajdxoolgw1@jpeg) - [A hyper-realistic, wide-angle interior shot of a sun-drenched minimalist ceramic studio. In the c...](https://assets.lumenfall.ai/sKGEpjKO6e-jcDyYJJ4jnpl6GFrOY-8Bcye4uvjX9xU/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/9mxfynzxpslk4drvfj2kdc6mgwen@jpeg) - [A hyper-realistic, wide-angle cinematic shot of a master carpenter's sun-drenched workshop. In th...](https://assets.lumenfall.ai/JuLzK_wlNCbfHdVWzL7vpWsUFUtH8QNOQe0_J2POz50/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/mfv2o8v5b8m4u56xcps2dd2zk2ri@jpeg) - [A sunlit, rustic bakery storefront with a large glass window displaying the hand-painted gold lea...](https://assets.lumenfall.ai/lGhlVYsUBHz416CxbyZIpLpUfJN9el7W2TPxL5VH7bI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/8r71j9v55i4lx6x5qd4664cylejr@jpeg) ### Arena Competition Results - [Isometric Miniature Diorama Scenes](https://assets.lumenfall.ai/wHXwV8PZKBHFOiVIjSqbrGHIB6E9ZWrepZueYLE-bOw/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/j99q74i5lgz4msyuu1v1lbbaomzb@jpeg): #35 of 72 (Elo 1171) - [Candid Street Photography](https://assets.lumenfall.ai/bU9TVuk0ZYgW4Qqmz0lu0r1iXfusYgRngE6AvPcDrjk/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/jor2zspckp5erf9mrboahn9v9ct9@jpeg): #39 of 68 (Elo 1140) - [Geometric Composition](https://assets.lumenfall.ai/hAs3FQ-3pCBrc9ABnX6inNcmRjsrhCcxpA25tbqClt8/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/rqk2g4ormmhheadb0hmloim2kvi4@jpeg): #55 of 70 (Elo 1103) - [Modern Clean Menu](https://assets.lumenfall.ai/_1QGTS-zw8f_wkKNIZ_HOoEUKzFe3OdS0Wcp7-VGMPU/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/7zxnzc58ireuwyz57l8c936dufts@jpeg): #53 of 69 (Elo 1090) - [Magic Burger Explosion: Fiery Photorealism Challenge](https://assets.lumenfall.ai/xNBD9Pu_WcnPHpsu7O0HEpAR9VQ3eAjh8SnwLz7hjsc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/utzjqkaonadr578ut0xfhpf83h2k@jpeg): #62 of 69 (Elo 1068) - [Vintage Cafe Logo](https://assets.lumenfall.ai/PPpYpWlNwiepzeI8SkJjusH7Uu_WjNk9CEyeOXl83IM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/m85r1tnr8ju0onh87qpteu7i7fus@jpeg): #59 of 70 (Elo 1062) - [The Halloween Invitation](https://assets.lumenfall.ai/C5ermZ82guRysFXvNLHuhpzgbutlWY9E9j9o_ysvfkE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/zffp87r6fc7iq2mmewpedxex4iwz@jpeg): #61 of 70 (Elo 1061) - [Adorable Baby Animals in Sunny Meadow](https://assets.lumenfall.ai/AoMurCY40auXVVg1XRUHKKomCZsflGjcTuMd4ioleCI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/e883p4ezct4bmwsfvzdae8tkp9zz@jpeg): #65 of 72 (Elo 1058) - [Fantasy Warrior](https://assets.lumenfall.ai/T2__t8PyNiSnvzOTB31gNUJ_MjetbNvDkQXi0TgXSlI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/jkoweb578rhamwesg2wvjeknufzr@jpeg): #62 of 71 (Elo 1051) - [The Reversed Rodeo](https://assets.lumenfall.ai/L5OUYMBBLc906ghm7Emc8hce6xwiY-gqTgOQDzEZbUA/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/cxin7ms7jv4beukspwe2jujsuatb@jpeg): #61 of 68 (Elo 1034) - [Apollo 11: Journey to Tranquility](https://assets.lumenfall.ai/SC-m8fs172uSqAkxZzlajaO7UMqArZ11A34mpfYhhB8/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/x7du21gt9j0sh3jzvpuj221j5dxs@jpeg): #65 of 70 (Elo 1012) - [The Capybara Taxi Driver](https://assets.lumenfall.ai/1Nj9ClrvsC1qMm0rmleTENFTAgyd7X1ETGGwnDvhgvM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/l24ggggfdzo8irvg5apzavy7xks4@jpeg): #68 of 69 (Elo 997) - [Chalkboard Menu](https://assets.lumenfall.ai/XhLTOJgU6LskmGdCpj876JN9uUkIT5pSWtbI6xhrx0I/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/nkmu4ggam6crnuxq14cxa3ddd6rr@jpeg): #69 of 69 (Elo 988) ## Example Prompt The following prompt was used to generate an example image in our playground: A sunlit, rustic bakery storefront with a large glass window displaying the hand-painted gold leaf typography "THE GOLDEN CRUST" on the pane. A cozy capybara sits quietly on the sidewalk by the door, watching people pass by. 8k, warm tones. ## Code Examples ### Text to Image (/v1/images/generations) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/generations \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "dall-e-2", "prompt": "", "size": "1024x1024" }' # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.generate({ model: 'dall-e-2', prompt: '', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.generate( model="dall-e-2", prompt="", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ### Image Edit (/v1/images/edits) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=dall-e-2" \ -F "image=@source.png" \ -F "prompt=Add a starry night sky to this image" \ -F "size=1024x1024" # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; import fs from 'fs'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.edit({ model: 'dall-e-2', image: fs.createReadStream('source.png'), prompt: 'Add a starry night sky to this image', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.edit( model="dall-e-2", image=open("source.png", "rb"), prompt="Add a starry night sky to this image", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## About ## Overview DALL-E 2 is a legacy text-to-image diffusion model developed by OpenAI that generates images from natural language descriptions. While succeeded by newer iterations, it remains a stable benchmark for image synthesis, offering a distinct feature set that includes image-to-image variations and mask-based inpainting. It is particularly known for its ability to combine disparate concepts and objects in a coherent, albeit often stylized, visual manner. ## Strengths * **Image Inpainting:** The model excels at modifying existing images through masking, allowing users to replace specific elements or extend backgrounds while maintaining the original image's context and lighting. * **Concept Blending:** It demonstrates a strong capability for semantic synthesis, such as placing a 3D-rendered character in a real-world setting or applying specific artistic styles (e.g., "in the style of Van Gogh") to original subjects. * **Compositional Understanding:** DALL-E 2 handles spatial relationships and object attributes with reasonable accuracy, ensuring that adjectives are generally applied to the correct nouns within a prompt. * **Variation Generation:** It can ingest an existing image and output multiple visual permutations that retain the original’s core theme and color palette without being exact copies. ## Limitations * **Low Resolution:** Native output is limited to 1024x1024 pixels, which often lacks the fine-grained texture and sharp detail found in more modern models like DALL-E 3 or Midjourney. * **Text Rendering:** The model struggle significantly with rendering legible text; characters often appear as nonsensical glyphs or blurred artifacts. * **Photorealism Constraints:** Compared to newer latent diffusion models, DALL-E 2 often produces images with a "plastic" or overly smooth aesthetic, struggling with complex human anatomy like hands or eyes. ## Technical Background DALL-E 2 is built on a CLIP-guided diffusion architecture, specifically a process OpenAI refers to as "unCLIP." It uses the CLIP (Contrastive Language-Image Pre-training) latent space to translate text embeddings into image embeddings, which a decoder then converts into a visual representation. This approach prioritizes the relationship between visual concepts and their linguistic descriptions over raw pixel-mapping. ## Best For DALL-E 2 is best suited for rapid prototyping, creating stylized illustrations, and performing basic image editing tasks like inpainting or outpainting where high-fidelity photorealism isn't the primary requirement. It is a cost-effective choice for developers who need consistent, programmatic image variations. This model is available for testing and integration through Lumenfall’s unified API and interactive playground, allowing you to compare its outputs directly against more recent generative models. ## Frequently Asked Questions ### How much does DALL-E 2 cost? DALL-E 2 starts at $0.016 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use DALL-E 2 via API? You can use DALL-E 2 through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "dall-e-2". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer DALL-E 2? DALL-E 2 is available through Replicate and OpenAI on Lumenfall. Lumenfall automatically routes requests to the best available provider. ### What is the maximum resolution for DALL-E 2? DALL-E 2 supports images up to 1024x1024 resolution. ## Links - Model Page: https://lumenfall.ai/models/openai/dall-e-2 - About: https://lumenfall.ai/models/openai/dall-e-2/about - Providers, Pricing & Performance: https://lumenfall.ai/models/openai/dall-e-2/providers - API Reference: https://lumenfall.ai/models/openai/dall-e-2/api - Benchmarks: https://lumenfall.ai/models/openai/dall-e-2/benchmarks - Use Cases: https://lumenfall.ai/models/openai/dall-e-2/use-cases - Gallery: https://lumenfall.ai/models/openai/dall-e-2/gallery - Playground: https://lumenfall.ai/models/openai/dall-e-2/playground - API Documentation: https://docs.lumenfall.ai