@adobe/firefly-apis
Version:
Adobe Firefly Services library for consuming Firefly Service APIs.
1,109 lines (1,108 loc) • 133 kB
JSON
{
"openapi": "3.1.0",
"info": {
"version": "1.0.0",
"title": "Firefly APIs",
"description": "REST API for Adobe Firefly for enterprise usage"
},
"servers": [
{
"url": "https://firefly-api.adobe.io",
"description": "Production endpoint"
}
],
"security": [
{
"X-Api-Key": [],
"AccessToken": []
}
],
"paths": {
"/v3/images/generate": {
"post": {
"summary": "Generate Images API",
"operationId": "generateImages",
"description": "Generate images based on a prompt with optional reference image to match style and structure.",
"requestBody": {
"description": "image generation request body.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateImagesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Generate images response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateImagesResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"bad_request": {
"value": {
"error_code": "bad_request"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"access_error": {
"value": {
"error_code": "access_error"
}
}
}
}
}
},
"408": {
"description": "Request Timeout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"timeout_error": {
"value": {
"error_code": "timeout_error"
}
}
}
}
}
},
"415": {
"description": "Unsupported Media Type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"invalid_content_type": {
"value": {
"error_code": "invalid_content_type"
}
}
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"validation_error": {
"value": {
"error_code": "validation_error",
"validation_errors": [
{
"loc": ["body", "contentClass"],
"msg": "value is not a valid enumeration member; permitted: 'photo', 'art'",
"type": "type_error.enum",
"ctx": {
"enum_values": ["photo", "art"]
}
}
]
}
},
"prompt_unsafe": {
"value": {
"error_code": "prompt_unsafe"
}
},
"input_media_unsafe": {
"value": {
"error_code": "input_media_unsafe"
}
},
"output_media_unsafe": {
"value": {
"error_code": "output_media_unsafe"
}
},
"language_not_supported": {
"value": {
"error_code": "language_not_supported"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"runtime_error": {
"value": {
"error_code": "runtime_error"
}
}
}
}
}
},
"501": {
"description": "Not Implemented",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"not_implemented": {
"value": {
"error_code": "not_implemented"
}
}
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"model_not_loaded": {
"value": {
"error_code": "model_not_loaded"
}
}
}
}
}
}
}
}
},
"/v3/videos/generate": {
"post": {
"operationId": "generateVideoV3",
"summary": "Generate video from text",
"description": "Generate a video using a text prompt.",
"parameters": [
{
"name": "x-model-version",
"in": "header",
"description": "Specify the Firefly model version to use for the video generation.",
"required": false,
"schema": {
"type": "string",
"default": "video1_standard",
"enum": ["video1_standard"]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateVideoRequestV3"
}
}
},
"required": true,
"description": "The request body for the video generation. Any of these listed properties can be individually omitted/empty, but some kind of parameter data is required."
},
"responses": {
"202": {
"content": {
"application/json": {
"example": {
"jobId": "urn:ff:jobs:epo855230:eeb0be1f-c41f-4711-bdc1-08e66e89d96d",
"statusUrl": "https://firefly-epo855230.adobe.io/v3/status/urn:ff:jobs:epo855230:eeb0be1f-c41f-4711-bdc1-08e66e89d96d",
"cancelUrl": "https://firefly-epo855230.adobe.io/v3/cancel/urn:ff:jobs:epo855230:eeb0be1f-c41f-4711-bdc1-08e66e89d96d"
},
"schema": {
"type": "object",
"properties": {
"jobId": {
"type": "string"
},
"statusUrl": {
"type": "string"
},
"cancelUrl": {
"type": "string"
}
},
"required": ["jobId", "statusUrl", "cancelUrl"]
}
}
},
"description": "Successful Response"
},
"400": {
"content": {
"application/json": {
"example": {
"error_code": "bad_request",
"message": "Invalid request parameters",
"validation_errors": [
{
"loc": ["body", "prompt"],
"msg": "Field required",
"type": "value_error.missing"
}
]
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Bad Request"
},
"403": {
"content": {
"application/json": {
"example": {
"error_code": "access_error",
"message": "Access denied"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"example": {
"error_code": "unknown_job_id",
"message": "Job not found"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Not Found"
},
"408": {
"content": {
"application/json": {
"example": {
"error_code": "timeout_error",
"message": "Request timed out"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Request Timeout"
},
"409": {
"content": {
"application/json": {
"example": {
"error_code": "job_cancel_failed",
"message": "Failed to cancel job"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Conflict"
},
"410": {
"content": {
"application/json": {
"example": {
"error_code": "job_timeout",
"message": "Job execution timed out"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Gone"
},
"415": {
"content": {
"application/json": {
"example": {
"error_code": "invalid_content_type",
"message": "Unsupported media type"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Unsupported Media Type"
},
"422": {
"content": {
"application/json": {
"example": {
"error_code": "input_media_indecipherable",
"message": "Input media could not be processed"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Unprocessable Entity"
},
"429": {
"content": {
"application/json": {
"example": {
"error_code": "backpressure_limited",
"message": "Too many requests"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Too Many Requests"
},
"451": {
"content": {
"application/json": {
"example": {
"error_code": "reference_image_unsafe_error",
"message": "Reference image contains unsafe content"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Unavailable For Legal Reasons"
},
"499": {
"content": {
"application/json": {
"example": {
"error_code": "cancelled_error",
"message": "Request was cancelled"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Additional Response"
},
"500": {
"content": {
"application/json": {
"example": {
"error_code": "session_data_not_recovered",
"message": "Internal server error",
"stack_trace": [
"Error: Session data not recovered",
"at processRequest (/app/handlers/video.js:123:45)",
"at async handleRequest (/app/index.js:67:89)"
]
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Internal Server Error"
},
"501": {
"content": {
"application/json": {
"example": {
"error_code": "not_implemented",
"message": "Feature not implemented"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Not Implemented"
},
"503": {
"content": {
"application/json": {
"example": {
"error_code": "model_not_loaded",
"message": "Service temporarily unavailable"
},
"schema": {
"$ref": "#/components/schemas/VideoApiError"
}
}
},
"description": "Service Unavailable"
}
}
}
},
"/v2/storage/image": {
"post": {
"summary": "Upload API",
"operationId": "upload",
"requestBody": {
"content": {
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/png": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/webp": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"description": "Upload source image or mask image of types PNG/JPEG/WEBP for Image-to-Image operations, such as fill, expand. This api returns an identifier that is used to refer to uploaded content.",
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "empty_input_body"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "access_error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "unknown_job_id"
}
}
}
},
"408": {
"description": "Request Timeout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "timeout_error"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "job_completed"
}
}
}
},
"410": {
"description": "Gone",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "job_timeout"
}
}
}
},
"415": {
"description": "Unsupported Media Type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "invalid_content_type"
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "language_not_supported"
}
}
}
},
"451": {
"description": "Unavailable For Legal Reasons",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "reference_image_unsafe_error"
}
}
}
},
"499": {
"description": "Additional Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "cancelled_error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "runtime_error"
}
}
}
},
"501": {
"description": "Not Implemented",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "not_implemented"
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"example": {
"error_code": "model_not_loaded"
}
}
}
}
}
}
},
"/v3/images/generate-similar": {
"post": {
"summary": "Generate Similar Images API",
"operationId": "generateSimilarImages",
"description": "Generate similar Images based on the reference image.",
"requestBody": {
"description": "Generate similar images request body",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateSimilarImagesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Generate similar images response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateSimilarImagesResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"bad_request": {
"value": {
"error_code": "bad_request"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"access_error": {
"value": {
"error_code": "access_error"
}
}
}
}
}
},
"408": {
"description": "Request Timeout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"timeout_error": {
"value": {
"error_code": "timeout_error"
}
}
}
}
}
},
"415": {
"description": "Unsupported Media Type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"invalid_content_type": {
"value": {
"error_code": "invalid_content_type"
}
}
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"validation_error": {
"value": {
"error_code": "validation_error",
"validation_errors": [
{
"loc": ["body", "contentClass"],
"msg": "value is not a valid enumeration member; permitted: 'photo', 'art'",
"type": "type_error.enum",
"ctx": {
"enum_values": ["photo", "art"]
}
}
]
}
},
"prompt_unsafe": {
"value": {
"error_code": "prompt_unsafe"
}
},
"input_media_unsafe": {
"value": {
"error_code": "input_media_unsafe"
}
},
"output_media_unsafe": {
"value": {
"error_code": "output_media_unsafe"
}
},
"language_not_supported": {
"value": {
"error_code": "language_not_supported"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"runtime_error": {
"value": {
"error_code": "runtime_error"
}
}
}
}
}
},
"501": {
"description": "Not Implemented",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"not_implemented": {
"value": {
"error_code": "not_implemented"
}
}
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"model_not_loaded": {
"value": {
"error_code": "model_not_loaded"
}
}
}
}
}
}
}
}
},
"/v3/images/expand": {
"post": {
"summary": "Expand Image API",
"operationId": "expandImage",
"description": "Change the aspect ratio or size of an image and expand its contents with or without a text prompt.",
"requestBody": {
"description": "image expansion request body.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExpandImageRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Expand Image Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExpandImageResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"bad_request": {
"value": {
"error_code": "bad_request"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"access_error": {
"value": {
"error_code": "access_error"
}
}
}
}
}
},
"408": {
"description": "Request Timeout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"timeout_error": {
"value": {
"error_code": "timeout_error"
}
}
}
}
}
},
"415": {
"description": "Unsupported Media Type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"invalid_content_type": {
"value": {
"error_code": "invalid_content_type"
}
}
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"validation_error": {
"value": {
"error_code": "validation_error",
"validation_errors": [
{
"loc": ["body", "contentClass"],
"msg": "value is not a valid enumeration member; permitted: 'photo', 'art'",
"type": "type_error.enum",
"ctx": {
"enum_values": ["photo", "art"]
}
}
]
}
},
"prompt_unsafe": {
"value": {
"error_code": "prompt_unsafe"
}
},
"input_media_unsafe": {
"value": {
"error_code": "input_media_unsafe"
}
},
"output_media_unsafe": {
"value": {
"error_code": "output_media_unsafe"
}
},
"language_not_supported": {
"value": {
"error_code": "language_not_supported"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"runtime_error": {
"value": {
"error_code": "runtime_error"
}
}
}
}
}
},
"501": {
"description": "Not Implemented",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"not_implemented": {
"value": {
"error_code": "not_implemented"
}
}
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"model_not_loaded": {
"value": {
"error_code": "model_not_loaded"
}
}
}
}
}
}
}
}
},
"/v3/images/fill": {
"post": {
"summary": "Fill Image API",
"operationId": "fillImage",
"description": "Fill the masked area of an image with an optional prompt.",
"requestBody": {
"description": "image fill request body.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FillImageRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Fill Image Response",
"content": {
"application/json": {