npiv / chatblade

A CLI Swiss Army Knife for ChatGPT
GNU General Public License v3.0
2.58k stars 92 forks source link

feature request: support Creates an image given a prompt #63

Open julienlau opened 11 months ago

julienlau commented 11 months ago

It would be nice to support the create image API endpoint :

curl https://api.openai.com/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }'

and also the Creates a variation of a given image

curl https://api.openai.com/v1/images/variations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F image="@otter.png" \
  -F n=2 \
  -F size="1024x1024"