Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ openai api engines.list

# create a completion
openai api completions.create -e ada -p "Hello world"

# generate images via DALL·E API
openai api image.create -p "two dogs playing chess, cartoon" -n 1
```

## Example code
Expand Down Expand Up @@ -190,6 +193,18 @@ openai wandb sync

For more information on fine tuning, read the [fine-tuning guide](https://beta.openai.com/docs/guides/fine-tuning) in the OpenAI documentation.

## Image generation (DALL·E)

```python
import openai
openai.api_key = "sk-..." # supply your API key however you choose

image_resp = openai.Image.create(prompt="two dogs playing chess, oil painting", n=4, size="512x512")

```

See the [usage guide](https://beta.openai.com/docs/guides/images) for more details.

## Requirements

- Python 3.7.1+
Expand Down