{"id":16620147,"url":"https://github.com/kabirjaipal/node-dall-ai","last_synced_at":"2025-08-21T14:10:22.031Z","repository":{"id":65132394,"uuid":"582706176","full_name":"kabirjaipal/node-dall-ai","owner":"kabirjaipal","description":"A type safe library for interacting with OpenAI's Dall-E 2 AI.","archived":false,"fork":false,"pushed_at":"2022-12-27T17:17:12.000Z","size":13,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T02:50:04.195Z","etag":null,"topics":["axios","dall-e","dall-e-api","discord-bot","discordjs","image-processing","imagegeneration","nodejs","openai-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kabirjaipal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-27T16:30:01.000Z","updated_at":"2023-10-16T06:27:53.000Z","dependencies_parsed_at":"2023-01-01T00:36:17.826Z","dependency_job_id":null,"html_url":"https://github.com/kabirjaipal/node-dall-ai","commit_stats":null,"previous_names":["kabirjaipal/node-dall-ai","kabirsingh2004/node-dall-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kabirjaipal/node-dall-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabirjaipal%2Fnode-dall-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabirjaipal%2Fnode-dall-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabirjaipal%2Fnode-dall-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabirjaipal%2Fnode-dall-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kabirjaipal","download_url":"https://codeload.github.com/kabirjaipal/node-dall-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabirjaipal%2Fnode-dall-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271493232,"owners_count":24769117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","dall-e","dall-e-api","discord-bot","discordjs","image-processing","imagegeneration","nodejs","openai-api"],"created_at":"2024-10-12T02:43:36.952Z","updated_at":"2025-08-21T14:10:22.005Z","avatar_url":"https://github.com/kabirjaipal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-dall-ai-2\r\n\r\nA type safe library for interacting with OpenAI's Dall-E 2 AI.\r\n\r\nDall-E 2 is a new AI system that can create realistic images and art from a description in natural langauge.\r\n\r\n[https://openai.com/dall-e-2/](https://openai.com/dall-e-2/)\r\n\r\n# Setup\r\n\r\nTo get access to Dall-E 2's API you need to join the waitlist and wait to be accepted which can be found [here](https://labs.openai.com/waitlist).\r\n\r\n1. To get the your unique session key you need to go to [https://labs.openai.com/](https://labs.openai.com/).\r\n2. Open the Network Tab in Developer Tools in your browser.\r\n3. Send an image request in the input box.\r\n4. In the network tab you'll find a POST request to [https://labs.openai.com/api/labs/tasks](https://labs.openai.com/api/labs/tasks).\r\n5. In the POST request headers you'll find your session key in the \"Authorization\" header, it'll look something like \"sess-xxxxxxxxxxxxxxxxxxxxxxxxxxxx\".\r\n\r\n# Usage\r\n\r\n```sh\r\nnpm i node-dall-ai-2\r\n```\r\n\r\n```js\r\nimport { Dalle } from \"node-dall-ai-2\";\r\n\r\nconst dalle = new Dalle({\r\n  apiKey: `Auth_Token`,\r\n});\r\n\r\n(async () =\u003e {\r\n  const data = await dalle.generate(`cat`); // return array of data\r\n\r\n  console.log(data);\r\n})();\r\n```\r\n\r\n### Output\r\n\r\n```\r\n[\r\n  {\r\n    id: 'generation-QyXXdJP165TiSpSrzBqAo6IS',\r\n    object: 'generation',\r\n    created: 1659149946,\r\n    generation_type: 'ImageGeneration',\r\n    generation: {\r\n      image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'\r\n    },\r\n    task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',\r\n    prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',\r\n    is_public: false\r\n  },\r\n  {\r\n    id: 'generation-UNJiRu5dzbvJYo8FVnZs5SCS',\r\n    object: 'generation',\r\n    created: 1659149946,\r\n    generation_type: 'ImageGeneration',\r\n    generation: {\r\n      image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'\r\n    },\r\n    task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',\r\n    prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',\r\n    is_public: false\r\n  },\r\n  {\r\n    id: 'generation-XCqpvMF0araPjFczwwfDGHGv',\r\n    object: 'generation',\r\n    created: 1659149946,\r\n    generation_type: 'ImageGeneration',\r\n    generation: {\r\n      image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'\r\n    },\r\n    task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',\r\n    prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',\r\n    is_public: false\r\n  },\r\n  {\r\n    id: 'generation-sSo1TufL7d4OSGEBTwRTMtxv',\r\n    object: 'generation',\r\n    created: 1659149946,\r\n    generation_type: 'ImageGeneration',\r\n    generation: {\r\n      image_path: 'https://openailabsprodscus.blob.core.windows.net/private/...'\r\n    },\r\n    task_id: 'task-QCKmkq8rxg0ablIgiXizTn0y',\r\n    prompt_id: 'prompt-IN4gE4yFBTi4MPlEG3GzCE4R',\r\n    is_public: false\r\n  }\r\n]\r\n```\r\n\r\n### Get the first image URL\r\n\r\n```js\r\nconst firstImage = data[0].generation.image_path;\r\nconsole.log(firstImage);\r\n```\r\n\r\n### Output\r\n\r\n```\r\n'https://openailabsprodscus.blob.core.windows.net/private/...'\r\n```\r\n\r\n\u003cbr/\u003e\r\n\r\n# Support Server\r\n\r\n[Join Now](https://discord.gg/PcUVWApWN3)\r\n\r\n# Npm Package\r\n\r\n[Visit](https://www.npmjs.com/package/node-dall-ai-2)\r\n\r\n# Discord Bot Example\r\n\r\n[Visit](https://github.com/kabirsingh2004/dall-e-discord-bot)\r\n\r\n\u003ch1 align=\"center\"\u003e Thanks For Visiting Here \u003c/h1\u003e\u003cbr/\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabirjaipal%2Fnode-dall-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkabirjaipal%2Fnode-dall-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabirjaipal%2Fnode-dall-ai/lists"}