StabilityAI (Independent Publisher) v.1.1 Plugin (#3384)

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update apiDefinition.swagger.json

* Update readme.md

* Update apiDefinition.swagger.json

* Update apiDefinition.swagger.json

* Update apiDefinition.swagger.json
This commit is contained in:
Troy Taylor 2024-05-21 04:21:48 -06:00 коммит произвёл GitHub
Родитель d380ae65e2
Коммит e8e742947b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 372 добавлений и 112 удалений

Просмотреть файл

@ -2,13 +2,17 @@
"swagger": "2.0",
"info": {
"title": "Stability.ai",
"description": "Stability.ai is the world\u2019s leading open source generative AI company. We strongly believe that our open source ethos provides the definitive path for the creation and access of cutting-edge research. Stability AI-backed research communities are currently developing breakthrough AI models applied to imaging, language, code, audio, video, 3D content, design, biotech and other scientific research.",
"version": "1.0",
"description": "Stability.ai is the worlds leading open source generative AI company. We strongly believe that our open source ethos provides the definitive path for the creation and access of cutting-edge research. Stability AI-backed research communities are currently developing breakthrough AI models applied to imaging, language, code, audio, video, 3D content, design, biotech and other scientific research.",
"version": "1.1",
"contact": {
"name": "Troy Taylor",
"url": "https://www.hitachisolutions.com",
"email": "ttaylor@hitachisolutions.com"
}
},
"x-ms-keywords": [
"Stability",
"AI",
"image generation"
},
"host": "api.stability.ai",
"basePath": "/",
@ -70,7 +74,16 @@
"x-ms-summary": "Organization"
}
],
"x-ms-visibility": "advanced"
"x-ms-visibility": "advanced",
"x-ms-openai-data": {
"openai-enabled": true,
"operations": [
{
"operationId": "EnginesListGet",
"x-ms-require-user-confirmation": false
}
]
}
}
},
"/v1/user/account": {
@ -169,30 +182,13 @@
"schema": {
"type": "object",
"properties": {
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"base64": {
"type": "string",
"description": "The Base64 value.",
"title": "Base64"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed.",
"title": "Seed"
},
"finishReason": {
"type": "string",
"description": "The finish reason.",
"title": "Finish Reason"
}
}
},
"title": "Artifacts"
"$content-type": {
"description": "The content type.",
"title": "Content Type"
},
"$content": {
"description": "The file content.",
"title": "File Content"
}
}
},
@ -232,7 +228,8 @@
"operationId": "EnginesListGet",
"value-path": "id",
"value-title": "name"
}
},
"default": "stable-diffusion-v1-6"
},
{
"name": "Content-Type",
@ -251,7 +248,7 @@
"description": "The accept type.",
"required": true,
"type": "string",
"default": "application/json",
"default": "image/png",
"x-ms-visibility": "internal"
},
{
@ -341,7 +338,16 @@
}
}
}
]
],
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "GenerationTextImagePost",
"x-ms-require-user-confirmation": true
}
]
}
}
},
"/v1/generation/{engine_id}/image-to-image": {
@ -352,30 +358,13 @@
"schema": {
"type": "object",
"properties": {
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"base64": {
"type": "string",
"description": "The Base64 value.",
"title": "Base64"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed.",
"title": "Seed"
},
"finishReason": {
"type": "string",
"description": "The finish reason.",
"title": "Finish Reason"
}
}
},
"title": "Artifacts"
"$content-type": {
"description": "The content type.",
"title": "Content Type"
},
"$content": {
"description": "The file content.",
"title": "File Content"
}
}
},
@ -411,6 +400,7 @@
"description": "The engine identifier.",
"required": true,
"type": "string",
"default": "stable-diffusion-v1-6",
"x-ms-dynamic-values": {
"operationId": "EnginesListGet",
"value-path": "id",
@ -424,7 +414,7 @@
"description": "The content type.",
"required": true,
"type": "string",
"default": "application/json",
"default": "multipart/form-data",
"x-ms-visibility": "internal"
},
{
@ -434,7 +424,7 @@
"description": "The accept type.",
"required": true,
"type": "string",
"default": "application/json",
"default": "image/png",
"x-ms-visibility": "internal"
},
{
@ -547,7 +537,16 @@
]
}
}
]
],
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "GenerationImageImagePost",
"x-ms-require-user-confirmation": true
}
]
}
}
},
"/v1/generation/{engine_id}/image-to-image/upscale": {
@ -558,30 +557,13 @@
"schema": {
"type": "object",
"properties": {
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"base64": {
"type": "string",
"description": "The Base64 value.",
"title": "Base64"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed.",
"title": "Seed"
},
"finishReason": {
"type": "string",
"description": "The finish reason.",
"title": "Finish Reason"
}
}
},
"title": "Artifacts"
"$content-type": {
"description": "The content type.",
"title": "Content Type"
},
"$content": {
"description": "The file content.",
"title": "File Content"
}
}
},
@ -636,7 +618,7 @@
"description": "The accept type.",
"required": true,
"type": "string",
"default": "application/json",
"default": "image/png",
"x-ms-visibility": "internal"
},
{
@ -677,7 +659,16 @@
]
}
}
]
],
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "GenerationUpscalePost",
"x-ms-require-user-confirmation": true
}
]
}
}
},
"/v1/generation/{engine_id}/image-to-image/masking": {
@ -688,30 +679,13 @@
"schema": {
"type": "object",
"properties": {
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"base64": {
"type": "string",
"description": "The Base64 value.",
"title": "Base64"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed.",
"title": "Seed"
},
"finishReason": {
"type": "string",
"description": "The finish reason.",
"title": "Finish Reason"
}
}
},
"title": "Artifacts"
"$content-type": {
"description": "The content type.",
"title": "Content Type"
},
"$content": {
"description": "The file content.",
"title": "File Content"
}
}
},
@ -765,7 +739,7 @@
"description": "The accept type.",
"required": true,
"type": "string",
"default": "application/json",
"default": "image/png",
"x-ms-visibility": "internal"
},
{
@ -881,7 +855,284 @@
]
}
}
]
],
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "GenerationMaskPost",
"x-ms-require-user-confirmation": true
}
]
}
}
},
"/v2beta/stable-image/generate/core": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"image": {
"type": "string",
"description": "The generated image, encoded to base64.",
"title": "Image"
},
"finish_reason": {
"type": "string",
"description": "The reason the generation finished.",
"title": "Finish Reason"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed used as random noise for this generation.",
"title": "Seed"
}
}
}
}
},
"summary": "Get image with Stable Image Core",
"description": "Retrieve an image using the Stable Image Core text-to-image generation.",
"operationId": "StableImageCorePost",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"x-ms-summary": "Content Type",
"description": "The content type.",
"required": true,
"type": "string",
"default": "multipart/form-data",
"x-ms-visibility": "internal"
},
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.",
"title": "Prompt"
},
"aspect_ratio": {
"type": "string",
"description": "The aspect ratio of the generated image.",
"title": "Aspect Ratio",
"default": "1:1",
"enum": [
"1:1",
"16:9",
"21:9",
"2:3",
"3:2",
"4:5",
"5:4",
"9:16",
"9:21"
]
},
"negative_prompt": {
"type": "string",
"description": "A blurb of text describing what you do not wish to see in the output image.",
"title": "Negative Prompt"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "A specific value that is used to guide the 'randomness' of the generation.",
"title": "Seed"
},
"style_preset": {
"type": "string",
"description": "Guides the image model towards a particular style.",
"title": "Style Preset",
"enum": [
"3d-model",
"analog-film",
"anime",
"cinematic",
"comic-book",
"digital-art",
"enhance",
"fantasy-art",
"isometric",
"line-art",
"low-poly",
"modeling-compound",
"neon-punk",
"origami",
"photographic",
"pixel-art",
"tile-texture"
]
}
},
"required": [
"prompt"
]
}
}
],
"x-ms-visibility": "important",
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "StableImageCorePost",
"x-ms-require-user-confirmation": true
}
]
}
}
},
"/v2beta/stable-image/generate/sd3": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"image": {
"type": "string",
"description": "The generated image, encoded to base64.",
"title": "Image"
},
"finish_reason": {
"type": "string",
"description": "The reason the generation finished.",
"title": "Finish Reason"
},
"seed": {
"type": "integer",
"format": "int32",
"description": "The seed used as random noise for this generation.",
"title": "Seed"
}
}
}
}
},
"summary": "Get image with Stable Diffusion 3.0",
"x-ms-visibility": "important",
"description": "Retrieve an image using the Stable Diffusion 3.0 text-to-image generation.",
"operationId": "StableDiffusionPost",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"x-ms-summary": "Content Type",
"description": "The content type.",
"required": true,
"type": "string",
"default": "multipart/form-data",
"x-ms-visibility": "internal"
},
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.",
"title": "Prompt"
},
"aspect_ratio": {
"type": "string",
"description": "The aspect ratio of the generated image.",
"title": "Aspect Ratio",
"default": "1:1",
"enum": [
"1:1",
"16:9",
"21:9",
"2:3",
"3:2",
"4:5",
"5:4",
"9:16",
"9:21"
]
},
"mode": {
"type": "string",
"description": "The text-to-image mode.",
"title": "Mode",
"default": "text-to-image",
"x-ms-visibility": "internal"
},
"negative_prompt": {
"type": "string",
"description": "A blurb of text describing what you do not wish to see in the output image.",
"title": "Negative Prompt"
},
"model": {
"type": "string",
"description": "The model to use for generation.",
"title": "Model",
"default": "sd3",
"enum": [
"sd3",
"sd3-turbo"
]
},
"seed": {
"type": "integer",
"format": "int32",
"description": "A specific value that is used to guide the 'randomness' of the generation.",
"title": "Seed"
},
"style_preset": {
"type": "string",
"description": "Guides the image model towards a particular style.",
"title": "Style Preset",
"enum": [
"3d-model",
"analog-film",
"anime",
"cinematic",
"comic-book",
"digital-art",
"enhance",
"fantasy-art",
"isometric",
"line-art",
"low-poly",
"modeling-compound",
"neon-punk",
"origami",
"photographic",
"pixel-art",
"tile-texture"
]
}
},
"required": [
"prompt",
"mode"
]
}
}
],
"x-ms-openai-data": {
"openai-enabled": false,
"operations": [
{
"operationId": "StableDiffusionPost",
"x-ms-require-user-confirmation": true
}
]
}
}
}
},
@ -914,5 +1165,10 @@
"propertyName": "Categories",
"propertyValue": "AI"
}
]
}
],
"x-ms-openai-manifest": {
"humanName": "Stability AI",
"modelDescription": "This is a Copilot plugin for the Stability.ai image generating service.",
"contactEmail": "ttaylor@hitachisolutions.com"
}
}

Просмотреть файл

@ -10,6 +10,10 @@ To use the Stability.ai platform, you will need to sign up for an account with [
Once logged in to DreamStudio, open your [Account page](https://dreamstudio.ai/account) to find your API key.
## Supported Operations
### Get image with Stable Image Core
Retrieve an image using the Stable Image Core text-to-image generation.
### Get image with Stable Diffusion 3.0
Retrieve an image using the Stable Diffusion 3.0 text-to-image generation.
### Generate image from text
Generate images from text, existing images, or both.
### Generate image from image