openapi: 3.1.0 info: title: Microsoft Azure Cognitive Services Accounts Images API description: APIs for vision, speech, language, and decision-making AI capabilities including Computer Vision, Text Analytics, and Translator services. version: '3.2' contact: name: Microsoft Azure Support url: https://azure.microsoft.com/en-us/support/ termsOfService: https://www.microsoft.com/en-us/legal/terms-of-use servers: - url: https://{region}.api.cognitive.microsoft.com description: Azure Cognitive Services Regional Endpoint variables: region: default: eastus description: Azure region for the Cognitive Services resource security: - apiKey: [] tags: - name: Images description: Generate images from text descriptions paths: /deployments/{deployment-id}/images/generations: post: operationId: createImageGeneration summary: Microsoft Generate images description: Creates an image given a prompt using DALL-E models. tags: - Images parameters: - $ref: '#/components/parameters/deploymentId' - $ref: '#/components/parameters/apiVersion' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ImageGenerationRequest' responses: '200': description: Image generation response content: application/json: schema: $ref: '#/components/schemas/ImageGenerationResponse' '400': description: Invalid request '401': description: Unauthorized '429': description: Rate limit exceeded components: schemas: ImageGenerationResponse: type: object properties: created: type: integer data: type: array items: type: object properties: url: type: string b64_json: type: string revised_prompt: type: string ImageGenerationRequest: type: object required: - prompt properties: prompt: type: string description: A text description of the desired image n: type: integer minimum: 1 maximum: 10 default: 1 description: Number of images to generate size: type: string enum: - 256x256 - 512x512 - 1024x1024 - 1792x1024 - 1024x1792 default: 1024x1024 quality: type: string enum: - standard - hd default: standard style: type: string enum: - natural - vivid default: vivid response_format: type: string enum: - url - b64_json default: url parameters: apiVersion: name: api-version in: query required: true description: The API version to use schema: type: string default: '2024-10-21' deploymentId: name: deployment-id in: path required: true description: The deployment name for the model schema: type: string securitySchemes: apiKey: type: apiKey name: Ocp-Apim-Subscription-Key in: header description: Azure Cognitive Services subscription key externalDocs: description: Azure AI Services Documentation url: https://learn.microsoft.com/en-us/azure/ai-services/