Microsoft Foundry에 gpt-image-1이라는 모델을 배포합니다.
애플리케이션이 OpenAI Images API를 사용하여 사용자 프롬프트에서 이미지를 생성할 수 있는지 확인해야 합니다.
파이썬 코드를 어떻게 완성해야 할까요? 정답을 선택하려면 답변란에서 적절한 옵션을 고르세요.
참고: 정답 하나당 1점입니다.

Reveal Solution
Discussion
Correct Answer:

Explanation:
images.generate
The canonical Python call is:
response = client.images.generate(
model= " gpt-image-1 " ,
prompt=prompt
)
The correct selection is images.generate . Microsoft's current Foundry documentation shows that image generation with a deployed GPT Image model uses the OpenAI Python SDK ' s Images API , specifically client.images.generate(). Microsoft provides an example using model= " gpt-image-1 " together with a text prompt, which directly corresponds to this scenario.
chat.completions.create is intended for chat-completion interactions rather than the standalone Images API.
images.create is not the documented Python SDK method for generating an image. responses.create belongs to the Responses API , which can also orchestrate image generation through an image-generation tool, but that is a different API pattern from the explicitly requested OpenAI Images API . Microsoft distinguishes the standalone image-generation API from image generation performed through the Responses API.
One important detail in the supplied exhibit is that it visually shows client.responses. before the dropdown.
Taken literally, client.responses.images.generate() would not be the documented syntax. For this question, the intended answer is clearly images.generate , yielding the documented form client.images.generate(...) .
Study Guide Reference: Microsoft Azure AI Fundamentals # Implement AI solutions by using Microsoft Foundry # Generative AI and image-generation models.