Error "No scheme supplied" using generated code from DALL-E playground

emonzies 0 Reputation points

I copied the Python code from DALL-E just to test the API to generate one image. And I got that error: "raise error.APIConnectionError(

openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL '<your_openai_endpoint>/images/generations': No scheme supplied. Perhaps you meant https://<your_openai_endpoint>/images/generations?"

Following is the code all set with out parameters, we have re-entered the form to get access to DALL-E and got confirmation.

#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "" #xxxx replaced by the real endpoint
openai.api_version = "2023-06-01-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Image.create(

image_url = response["data"][0]["url"]
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
1,881 questions
{count} votes