Skip to main content

Use DALL·E 2 in Python

Project description

Get Access

labs.openai.com/waitlist

Usage

pip install dalle2
from dalle2 import Dalle2

dalle =  Dalle2("sess-xxxxxxxxxxxxxxxxxxxxxxxxxxxx")
generations = dalle.generate("portal to another dimension, digital art")
print(generations)
[
  {
    'id': 'generation-sCnERSYDPP0Zu14fsdXEcKmL',
    'object': 'generation',
    'created': 1553332711,
    'generation_type': 'ImageGeneration',
    'generation': {
      'image_path': 'https://openailabsprodscus.blob.core.windows.net/private/user-hadpVzldsfs28CwvEZYMUT/generations/generation...'
    },
    'task_id': 'task-nERkiKsdjVCSZ50yD69qewID',
    'prompt_id': 'prompt-2CtaLQsgUbJHHDoJQy9Lul3T',
    'is_public': false
  },
  {
    'id': 'generation-hZWt2Nasrx8R0tJjbaROfKVy',
    'object': 'generation',
    'created': 1553332711,
    'generation_type': 'ImageGeneration',
    'generation': {
      'image_path': 'https://openailabsprodscus.blob.core.windows.net/private/user-hadpVzldsfs28CwvEZYMUT/generations/generation...'
    },
    'task_id': 'task-nERkiKhjasdSZ50yD69qewID',
    'prompt_id': 'prompt-2CtaLasdUbJHHfoJQy9Lul3T',
    'is_public': false
  },
  // 8 more ... 
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dalle2-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

dalle2-1.0.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page