-
Couldn't load subscription status.
- Fork 5.5k
[Azure OpenAI Service] Adding images.json to 2023-04-15-preview #23104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
1a8a1f8
5da89ef
edf16cc
85af26b
3a0332c
4402321
0bbdcea
03fe1eb
ab5a699
b1c5182
8c16fbe
94050ec
e7e40eb
43b6fd4
31a23ac
ad26bbb
4962af9
c70235c
23be47b
5245ea6
2efaa47
4410ea9
703cb1f
1bfd112
e7eef3a
ac158d8
7137695
bdc7f37
c52e141
8401244
bd9d298
f2b541d
70b7aa4
fcae5ec
7dbed88
1f2076d
9c0fba6
d0d1472
e0b8dc7
92ea4ab
7220508
3f7ad9b
237f3e4
bc0016f
7ccf424
3021379
d6f6d36
1839b06
35a7f92
9e3b5c0
5ddfb3c
f5a39a1
2fe4093
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,348 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "Cognitive Services API", | ||
| "description": "Cognitive Services API to support OpenAI Dall-E", | ||
| "version": "2023-04-01-preview" | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "host": "eastus.api.cognitive.microsoft.com", | ||
| "basePath": "/dalle", | ||
| "schemes": ["https"], | ||
| "securityDefinitions": { | ||
| "Api-Key": { | ||
| "type": "apiKey", | ||
| "name": "Api-Key", | ||
| "in": "header", | ||
| "description": "Provide your Cognitive Services Azure OpenAI account key here." | ||
| } | ||
| }, | ||
| "security": [ | ||
| { | ||
| "Api-Key": [] | ||
| } | ||
| ], | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "parameters": { | ||
| "apiVersionQueryParameter": { | ||
| "in": "query", | ||
| "name": "api-version", | ||
| "description": "The requested API version.", | ||
| "required": true, | ||
| "type": "string" | ||
| } | ||
| }, | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "definitions": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "Status": { | ||
| "description": "The status of the operation.", | ||
| "type": "string", | ||
| "enum": [ | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "NotStarted", | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "Running", | ||
| "Failed", | ||
| "Canceled", | ||
| "Succeeded" | ||
| ] | ||
| }, | ||
| "InnerError": { | ||
| "type": "object", | ||
| "description": "The inner error if a task in a batch failed.", | ||
| "properties": { | ||
| "message": { | ||
| "type": "string", | ||
| "description": "The error message.", | ||
| "example": "Operation failed as a result of our safety system." | ||
| }, | ||
| "code": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "ContentFilter", | ||
|
||
| "Internal", | ||
| "BlockedImages" | ||
| ], | ||
| "description": "The error code." | ||
| } | ||
| } | ||
| }, | ||
| "Error": { | ||
| "type": "object", | ||
| "description": "The error if the request or operation failed.", | ||
| "properties": { | ||
| "message": { | ||
| "type": "string", | ||
| "description": "The error message.", | ||
| "example": "Required query parameter 'api-version' is missing." | ||
| }, | ||
| "code": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "BadRequest", | ||
|
||
| "ContentFilter", | ||
| "Internal", | ||
| "TooManyRequests", | ||
| "Unauthorized", | ||
| "NotFound", | ||
| "OperationNotInTerminalState", | ||
| "BlockedImages", | ||
| "RequestTimout" | ||
| ], | ||
| "description": "The error code." | ||
| }, | ||
| "details": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/InnerError" | ||
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "message", | ||
| "code" | ||
| ] | ||
| }, | ||
| "ErrorResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "$ref": "#/definitions/Error" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "error" | ||
| ] | ||
| }, | ||
| "ImageResult": { | ||
| "type": "object", | ||
| "description": "The image url if successful, and an error otherwise.", | ||
| "properties": { | ||
| "url": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "string", | ||
| "description": "The image url.", | ||
|
||
| "example": "https://www.contoso.com" | ||
| }, | ||
| "error": { | ||
| "$ref": "#/definitions/Error" | ||
| } | ||
| } | ||
| }, | ||
| "OperationResult": { | ||
| "type": "array", | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The result data of the operation, if successful", | ||
| "items": { | ||
| "$ref": "#/definitions/ImageResult" | ||
| } | ||
| }, | ||
| "OperationResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "type": "string", | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The ID of the operation.", | ||
| "example": "59c7e2ea-7450-4e85-9762-55c78727f4c7" | ||
| }, | ||
| "created": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "integer", | ||
| "format": "int64", | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The unix timestamp when the operation was created.", | ||
| "example": "1676540381" | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "last_action": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "integer", | ||
| "format": "int64", | ||
| "description": "The unix timestamp for when the current state was entered.", | ||
| "example": "1676540381" | ||
| }, | ||
| "expires_at": { | ||
| "type": "integer", | ||
| "format": "int64", | ||
| "description": "The unix timestamp when the operation expires.", | ||
| "example": "1676540381" | ||
| }, | ||
| "data": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "$ref": "#/definitions/OperationResult" | ||
| }, | ||
| "status": { | ||
| "$ref": "#/definitions/Status" | ||
| }, | ||
| "error": { | ||
| "$ref": "#/definitions/Error" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "id", | ||
| "status", | ||
| "created", | ||
| "last_action" | ||
| ] | ||
| }, | ||
| "ImageResolution": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The resolution of the image (256x256, 512x512, or 1024x1024). Smaller images are faster to generate.", | ||
| "type": "string", | ||
| "enum": [ | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "256x256", | ||
| "512x512", | ||
| "1024x1024" | ||
| ], | ||
| "default": "1024x1024" | ||
| }, | ||
| "GenerateImagesPostRequest": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "object", | ||
|
||
| "properties": { | ||
| "prompt": { | ||
| "type": "string", | ||
| "description": "The prompt to generate an image from.", | ||
| "minLength": 1, | ||
| "maxLength": 1000 | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "n": { | ||
| "type": "integer", | ||
| "description": "The number of images to generate.", | ||
| "minimum": 1, | ||
| "default": 1 | ||
| }, | ||
| "size": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "$ref": "#/definitions/ImageResolution" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "prompt" | ||
| ] | ||
| }, | ||
| "GenerateImagesPostResponse": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "object", | ||
| "properties": { | ||
| "status": { | ||
| "$ref": "#/definitions/Status" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "id" | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ] | ||
| } | ||
| }, | ||
| "paths": { | ||
| "/images/generate": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "post": { | ||
| "summary": "Generates a batch of images from a text caption", | ||
| "operationId": "Images_Generate", | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionQueryParameter" | ||
| }, | ||
| { | ||
| "in": "body", | ||
| "name": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/GenerateImagesPostRequest" | ||
| } | ||
| } | ||
| ], | ||
| "responses": { | ||
| "202": { | ||
| "description": "Created", | ||
| "headers": { | ||
| "Operation-Location": { | ||
| "type": "string", | ||
| "description": "URL to poll for the operation result." | ||
| } | ||
| }, | ||
| "schema": { | ||
| "$ref": "#/definitions/GenerateImagesPostResponse" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "An error occurred.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/operations/{operationId}": { | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "get": { | ||
| "summary": "Returns the status of the operation", | ||
| "operationId": "Operations_Get", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionQueryParameter" | ||
| }, | ||
| { | ||
| "in": "path", | ||
| "name": "operationId", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The id of the operation" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "headers": { | ||
| "Operation-Location": { | ||
| "schema": { | ||
| "type": "string" | ||
| }, | ||
| "description": "The location of the operation." | ||
| }, | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "Retry-After": { | ||
| "schema": { | ||
| "type": "integer" | ||
| }, | ||
| "description": "Indicates the number of seconds that the client should wait before trying to get the result from the URL identified by the Operation-Location header if the operation did not terminate yet." | ||
| } | ||
| }, | ||
| "schema": { | ||
| "$ref": "#/definitions/OperationResponse" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "An error occurred.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "summary": "Deletes an operation (if in terminal state)", | ||
| "operationId": "Operations_Delete", | ||
| "parameters": [ | ||
| { | ||
| "in": "query", | ||
| "name": "api-version", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "API version." | ||
| }, | ||
hstellmach-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| "in": "path", | ||
| "name": "operationId", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The id of the operation" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "204": { | ||
| "description": "NoContent" | ||
| }, | ||
| "default": { | ||
| "description": "An error occurred.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.