Skip to content

Commit

Permalink
Tweak image size on README
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudall committed Jan 7, 2023
1 parent ca64fea commit f3448a3
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,27 +226,18 @@ Fill in the transparent part of an image, or upload a mask with transparent sect

### Image Variations

Create n variations of an image.
Create n variations of an image. The size of the generated images must be one of `256x256`, `512x512` or `1024x1024` -
if not specified the image will default to `1024x1024`.

```ruby
response = client.images.variations(parameters: { image: "image.png", n: 2 })
response = client.images.variations(parameters: { image: "image.png", n: 2, size: "256x256" })
puts response.dig("data", 0, "url")
=> "https://oaidalleapiprodscus.blob.core.windows.net/private/org-Rf437IxKhh..."
```

![Ruby](https://i.ibb.co/TWJLP2y/img-miu-Wk-Nl0-QNy-Xtj-Lerc3c0l-NW.png)
![Ruby](https://i.ibb.co/ScBhDGB/img-a9-Be-Rz-Au-Xwd-AV0-ERLUTSTGdi.png)

### Image Size Parameters

The size of the generated images must be one of `256x256`, `512x512` or `1024x1024`

```ruby
response = client.images.variations(parameters: { image: "image.png", size: "256x256" })
puts response.dig("data", 0, "url")
=> "https://oaidalleapiprodscus.blob.core.windows.net/private/org-MmU7kHWkvg..."
```

### Moderations

Pass a string to check if it violates OpenAI's Content Policy:
Expand Down

0 comments on commit f3448a3

Please sign in to comment.