DALL-E API use refused, not sure I understand the rationale

I tried to use the DALL-E API, and both the 2 and 3 API calls refused my request. Not sure I understand why, because
a) I would be paying for the API usage, just like for chat completions
b) but even if you decided to not allow DALL-E for the API users like myself, I also have previously paid DALL-E credits, at least that you should allow me to use…

can someone from OpenAI advise?

Welcome to the forum.

Credits bought for Labs.openai.com will not work with the API. You’ll need a separate API account. Here’s an API quickstart guide that should help you.

To clarify, I do have an API account and have been successfully using that for chat completion in various models, 35 and 4.

1 Like

Ah, gotcha.

Hrm. Are you getting a specific error? Can you share code?

The python OpenAI library has changed quite a bit recently. We need more info to help …

{“error”:{“message”:“You are not allowed to sample from this model”,“type”:“invalid_request_error”,“param”:null,“code”:null}}

I used the dall-e-2 model for this

I use HTTPS POST from JavaScript, exactly how I do it for chat completion, although different endpoint and parameters of course

Just checked and my DALLE2 app is not generating for 256 or 512 size which means maybe it’s defaulting to DALLE3? I imagine DALLE2 won’t be available forever, but it was working a day or so ago.

What’s your code to connect? Are you setting the model for dall-e-3?

I did use 256 for this request, let me check if that is the root cause. Also I did not fully expect 3 to work, since I don’t use ‘Plus’. But 2 I did expect to work.

1 Like

Lemme know.

Here’s the updated Cookbook page for DALLE…

I’ll have to check my code and make sure the size didn’t change or something when I was testing the other night. Sounds like it should default to DALLE2 (and was) but maybe it’s not anymore?

using dall-e-2 with 1024 did not help the error message. I sleep on it, who knows, maybe related to the outage tonight… but am I right that for 2 the ‘Plus’ subscription would not be a must?

Yeah, you don’t need ChatGPT Plus for DALLE2 or DALLE3 via the API. I had it set to DALLE3 which is why size wasn’t working here. (D’oh!) … DALLE3 is working here, though.

If you can’t get it sorted, share the code you’re using to generate, and we’ll try to get it sorted.

ETA: Can confirm DALLE2 is working here…

Your information is giving me hope that it will work tomorrow, I come back to this fight as soon as I can. Best!

1 Like

The problem was end user error - appreciate the assistance, Paul.

However, I would still love if my DALL-E credits could be converted over to API credits, it is not asking for money back, only asking for using the prepaid money in a different way.