Questions about the API and Dall-e!

Hey guys! so i’m a bit of a noob at coding and couldnt find answers to my questions anywhere i would highly appreciate any contribution :slightly_smiling_face:

i am using the free 18$ credits for open ai and using my API key to generate images this is the parameters i’m using :

const apiUrl = '';

const data = {
  'prompt': prompt,
  'model': 'image-alpha-001',
  'num_images': 2,
  'size': '1024x1024',
  'response_format': 'url'

I was wondering :
Is what im using here Dall-e ? or is it another model ?
Is there only one model for picture generation ? if not how can i change the one i use ?
I tried changing to ‘model’: ‘image-alpha-002’, and i got an error when running ;
its pretty confusing as “image-alpha” is mentionned nowhere on the open ai website!
thanks fore reading! please help

I can’t find an image generation API reference that even lists model as a parameter. Where did you get that snippet, if not from OpenAI?

i actually got it generated by chat gpt
here is the full code : open ai code -
seeing as im not that good with js i did not follow the open AI guide , i will try that next
any insight you have is helpfull

Lol, yeah, I’ve tried something like that early on. The docs are actually pretty user-friendly:

1 Like

Yeah, ChatGPT will make up stuff, so it’s best to stick with the docs.

You can also search GitHub for GPT-3 or DALLE projects and take a peek at code from others.

1 Like

Yeah, ChatGPT will make up stuff

Cannot emphasize this enough. It’s like 50/50 on whether or not it knows whether or not it knows something, so if it doesn’t know that it doesn’t know, it just acts like it knows, you know?

Point being: If you want to get the most out of GPT-3, become familiar with its limitations. It will gladly lead you down the garden path. There’s an old Ukrainian saying: “Trust, but verify”.

thanks for pointing me in a direction and the advice!
if i can ask does anyone know the different “models” that can be used using the api? / any limitations compared to the web based dall-e ?

If you’re looking for image generation, AFAIK, OpenAI just has the Image API with the create, create_edit, and create_variation, but I think you can fine-tune them to get a specific style?