Skip to content

API Reference

Vision Studio API Documentation

This document provides details on the Vision Studio API, a comprehensive set of endpoints for image generation, editing, captioning, video processing, and analysis across multiple AI providers.

Table of Contents

Introduction & Setup
API Endpoints

Introduction

The Vision Studio API provides a unified interface organized by functional tags that span multiple providers. High-level capabilities include:

  • Prompt Enhancement: AI-powered prompt optimization for better image generation results
  • Media Captioning: Image and video captioning utilities
  • Image Editing / Image Editing Generation: Deterministic edits and generative edits for images
  • Image Generation: Text-to-image and guided image generation
  • Video Editing / Video Editing Generation: Deterministic and generative video operations
  • Video Generation: Text/image/video-to-video generation
  • Audio Generation: Text-to-speech
  • Upload: Provider-specific asset upload helpers
  • Status: Async job status and cancellation
  • LoRA Project Management / LoRA Training: Tailored model lifecycle and training APIs

All providers support both synchronous and asynchronous processing where applicable.

Authentication

The endpoints in this API require authentication. Use the X-API-Key header with your API key:

X-API-Key: your_api_key_here

API Reference

Vision Studio API 1.0.0

Prompt Enhancement


POST /api/v1/prompt/enhance-prompt

Enhance Prompt

Description

Enhance an existing prompt to create more beautiful and professional image generation results.

This endpoint takes a basic image generation prompt and transforms it into a detailed, professional photography description with rich visual details, lighting conditions, and atmospheric elements.

Args:

  • prompt : The original basic prompt to enhance
  • temperature (float): Temperature for prompt generation (0.0-2.0), controls randomness
  • model_provider : Model provider to use ("openai" or "gemini")

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "The original prompt to enhance for better image generation results",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior",
                "Professional headshot of a business person"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "PromptEnhancementRequest",
    "description": "Request model for prompt enhancement."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/prompt/adapt-background-prompt

Prompt Background Adapt

Description

Generate a prompt to adapt an existing background image for specific audience and location.

This endpoint creates concise prompts that describe how to modify an existing background image with location-specific color palettes, visual elements, and mood that resonates with the target audience.

Args:

  • audience : Target audience for the image (e.g., "families", "young adults", "professionals")
  • location : Geographic location for the image (e.g., "Paris", "Tokyo", "Morocco")
  • temperature (float): Temperature for prompt generation (0.0-2.0), it controls the randomness of the prompt. Higher values create more varied prompts.
  • model_provider : Model provider to use ("openai" or "gemini")

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "audience": "string",
    "location": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "audience": {
            "type": "string",
            "minLength": 1,
            "title": "Audience",
            "description": "Target audience for the image",
            "examples": [
                "families",
                "young adults",
                "professionals"
            ]
        },
        "location": {
            "type": "string",
            "minLength": 1,
            "title": "Location",
            "description": "Geographic location for the image",
            "examples": [
                "Paris",
                "Tokyo",
                "Morocco"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "audience",
        "location"
    ],
    "title": "BackgroundAssetAdaptationRequest",
    "description": "Request model for background asset adaptation prompt generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/prompt/generate-background-prompt

Prompt Generate Background

Description

Generate a prompt to create a background image from scratch for specific audience and location.

This endpoint creates detailed prompts for generating background images that capture the essence of a specific location while appealing to the target audience's preferences.

Args:

  • audience : Target audience for the image (e.g., "families", "children", "seniors")
  • location : Geographic location for the image (e.g., "Southern France", "Japan", "Italy")
  • temperature (float): Temperature for prompt generation (0.0-2.0), it controls the randomness of the prompt. Higher values create more varied prompts.
  • model_provider : Model provider to use ("openai" or "gemini")

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "audience": "string",
    "location": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "audience": {
            "type": "string",
            "minLength": 1,
            "title": "Audience",
            "description": "Target audience for the image",
            "examples": [
                "families",
                "children",
                "seniors"
            ]
        },
        "location": {
            "type": "string",
            "minLength": 1,
            "title": "Location",
            "description": "Geographic location for the image",
            "examples": [
                "Southern France",
                "Japan",
                "Italy"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "audience",
        "location"
    ],
    "title": "BackgroundCreationRequest",
    "description": "Request model for background creation prompt generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/prompt/generate-image-prompt

Prompt Generate Image Creation

Description

Generate a prompt for image creation from scratch for specific audience and location.

This endpoint creates detailed prompts for generating complete images that resonate with the target audience and capture the essence of a specific location.

Args:

  • audience : Target audience for the image (e.g., "families", "young adults", "professionals")
  • location : Geographic location for the image (e.g., "Paris", "Tokyo", "Morocco")
  • temperature (float): Temperature for prompt generation (0.0-2.0), it controls the randomness of the prompt. Higher values create more varied prompts.
  • model_provider : Model provider to use ("openai" or "gemini")

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "audience": "string",
    "location": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "audience": {
            "type": "string",
            "minLength": 1,
            "title": "Audience",
            "description": "Target audience for the image",
            "examples": [
                "families",
                "young adults",
                "professionals"
            ]
        },
        "location": {
            "type": "string",
            "minLength": 1,
            "title": "Location",
            "description": "Geographic location for the image",
            "examples": [
                "Paris",
                "Tokyo",
                "Morocco"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "audience",
        "location"
    ],
    "title": "ImageCreationRequest",
    "description": "Request model for image creation prompt generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/prompt/adapt-subject-prompt

Prompt Adapt Subject

Description

Generate a prompt for a custom model based on subject, target audience, and location.

This endpoint creates image generation prompts specifically tailored to generate images of the specified subject that resonate with the specified audience in the given location context.

Args:

  • subject : Main subject for the image (e.g., "cat", "dog", "person")
  • audience : Target audience for the image (e.g., "families", "professionals", "children")
  • location : Geographic location for the image (e.g., "Paris", "Tokyo", "New York")
  • model_provider : Model provider to use ("openai" or "gemini")
  • temperature (float): Temperature for prompt generation (0.0-2.0), it controls the randomness of the prompt. Higher values create more varied prompts.

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "subject": "string",
    "audience": "string",
    "location": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "subject": {
            "type": "string",
            "minLength": 1,
            "title": "Subject",
            "description": "Main subject for the image",
            "examples": [
                "cat",
                "dog",
                "person"
            ]
        },
        "audience": {
            "type": "string",
            "minLength": 1,
            "title": "Audience",
            "description": "Target audience for the image",
            "examples": [
                "families",
                "professionals",
                "children"
            ]
        },
        "location": {
            "type": "string",
            "minLength": 1,
            "title": "Location",
            "description": "Geographic location for the image",
            "examples": [
                "Paris",
                "Tokyo",
                "New York"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "subject",
        "audience",
        "location"
    ],
    "title": "SubjectEnhancementRequest",
    "description": "Request model for subject enhancement prompt generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/prompt/generate-subject-pose-prompt

Prompt Generate Subject Pose

Description

Generate a detailed image generation prompt for a subject in a specific pose and viewshot.

This endpoint creates prompts for generating images of subjects with unique poses and viewshot angles, ensuring the subject is complete and fully visible against a pure white background.

Args:

  • subject : The subject to generate a pose prompt for (e.g., "cat", "dog", "person")
  • temperature (float): Temperature for prompt generation (0.0-2.0), it controls the randomness of the prompt. Higher values create more varied prompts.
  • model_provider : Model provider to use ("openai" or "gemini")

Returns: Json response with success status and the result containing the generated prompt and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "subject": "string",
    "temperature": 10.12,
    "model_provider": "openai"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "subject": {
            "type": "string",
            "minLength": 1,
            "title": "Subject",
            "description": "The subject to generate a pose prompt for",
            "examples": [
                "cat",
                "dog",
                "person"
            ]
        },
        "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "description": "Temperature for prompt generation",
            "default": 0.7
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        }
    },
    "type": "object",
    "required": [
        "subject"
    ],
    "title": "SubjectPosePromptRequest",
    "description": "Request model for subject pose prompt generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/prompt/enhance-prompt

Bria Enhance Prompt

Description

Enhance a prompt using LLama 3.

Args:

  • prompt: The text prompt to enhance.

Returns: Json response with success status and the result containing the generated prompt.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "title": "Prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "Body_bria_enhance_prompt_api_v1_bria_prompt_enhance_prompt_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Media Captioning


POST /api/v1/caption/image

Caption Image

Description

Generate a caption for an image from a URL.

Args:

  • image_url: URL of the image to caption.
  • Example: https://images.pexels.com/photos/31976103/pexels- photo-31976103.jpeg
  • mode: Captioning mode (simple, expert, image_tagging)
  • model_provider: Model provider (openai or gemini)
  • nbr_tags: Number of tags to generate (only relevant for image tagging mode).
  • possible_tags: List of possible tags to generate (only relevant for image tagging mode).
  • access_token: API key for authentication.
  • captioning_client: Captioning client instance.

Returns: Json response with success status and the result containing the generated caption and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": "string",
    "mode": "simple",
    "model_provider": "openai",
    "nbr_tags": 0,
    "possible_tags": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the image to caption",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg",
                "https://images.pexels.com/photos/1234567/pexels-photo-1234567.jpeg"
            ]
        },
        "mode": {
            "$ref": "#/components/schemas/ImageCaptionMode",
            "description": "Captioning mode",
            "default": "simple"
        },
        "model_provider": {
            "$ref": "#/components/schemas/LlmProvider",
            "description": "Model provider to use",
            "default": "openai"
        },
        "nbr_tags": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Nbr Tags",
            "description": "Number of tags to generate (only for image_tagging mode)",
            "default": 5
        },
        "possible_tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Possible Tags",
            "description": "Possible tags to choose from (only for image_tagging mode)",
            "examples": [
                [
                    "nature",
                    "landscape",
                    "city",
                    "architecture"
                ]
            ]
        }
    },
    "type": "object",
    "required": [
        "image_url",
        "possible_tags"
    ],
    "title": "ImageCaptionRequest",
    "description": "Request model for image captioning."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/caption/video

Caption Video

Description

Generate a caption or a list of tags for a video using Google Gemini.

Args:

  • video_url: URL of the video to caption.
  • Example: https://media.w3.org/2010/05/sintel/trailer.mp4
  • mode: Captioning mode. Possible values: simple, expert, detailed, tagging, segment_timestamps, segment_timestamps_descriptive, segment_timestamps_tags
  • nbr_tags: Number of tags to generate (only relevant for image tagging mode).
  • storage_client: Google Cloud Storage client instance.
  • gemini_client: Vertex AI Gemini client instance.

Returns: Json response with success status and the result containing the generated caption and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "video_url": "string",
    "mode": "simple",
    "nbr_tags": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "video_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Video Url",
            "description": "URL of the video to caption",
            "examples": [
                "https://media.w3.org/2010/05/sintel/trailer.mp4"
            ]
        },
        "mode": {
            "$ref": "#/components/schemas/VideoCaptionMode",
            "description": "Video captioning mode",
            "default": "simple"
        },
        "nbr_tags": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Nbr Tags",
            "description": "Number of tags to generate (only for tagging modes)",
            "default": 5
        }
    },
    "type": "object",
    "required": [
        "video_url"
    ],
    "title": "VideoCaptionRequest",
    "description": "Request model for video captioning."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Image Generation


POST /api/v1/bria/image/generation/generate-image

Bria Generate Image

Description

Generate high-quality images using BRIA's base model.

Args:

  • bria_model_version: Model version to use.
  • prompt: Text description of the desired image (English only).
  • num_results: Number of images to generate. Use 1 when using guidance methods. Maximum value is 4.
  • aspect_ratio: Image aspect ratio.
  • sync: If True, wait for results. If False, return URLs immediately.
  • steps_num: Number of refinement iterations (20-50).
  • text_guidance_scale: Text adherence strength (1-10).
  • prompt_enhancement: Use LLama 3 to enhance prompt.
  • seed (optional): Seed for reproducible results.
  • negative_prompt (optional): Elements to exclude from generation.
  • medium (optional): Output medium type ("photography" or "art").
  • guidance_method_1 (optional): First guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_1_scale (optional): Impact of first guidance method (0.0-1.0).
  • guidance_method_1_image_file (optional): Base64 encoded image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_1_image_url (optional): URL of image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_2 (optional): Second guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_2_scale (optional): Impact of second guidance method (0.0-1.0).
  • guidance_method_2_image_file (optional): Base64 encoded image for second guidance method. Required if guidance_method_2 is specified.
  • guidance_method_2_image_url (optional): URL of image for second guidance method. Required if guidance_method_2 is specified.
  • image_prompt_mode (optional): IP-Adapter mode. Supported modes are : "regular", "style_only".
  • image_prompt_file (optional): Base64 encoded image for IP-Adapter.
  • image_prompt_urls (optional): List of image URLs for IP-Adapter.
  • image_prompt_scale (optional): Impact of IP-Adapter (0.0-1.0).
  • access_token: API key for authentication.
  • bria_client: BRIA API client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "2.3",
    "prompt": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "sync": true,
    "steps_num": 0,
    "text_guidance_scale": 10.12,
    "prompt_enhancement": true,
    "enhance_image": true,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "negative_prompt": null,
    "medium": null,
    "guidance_method_1": null,
    "guidance_method_1_scale": null,
    "guidance_method_1_image_url": null,
    "guidance_method_1_image_file": null,
    "guidance_method_2": null,
    "guidance_method_2_scale": null,
    "guidance_method_2_image_url": null,
    "guidance_method_2_image_file": null,
    "image_prompt_mode": null,
    "image_prompt_file": null,
    "image_prompt_urls": null,
    "image_prompt_scale": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "enum": [
                "2.3",
                "3.2"
            ],
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "3.2"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of the desired image (English only).",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior",
                "Professional headshot of a business person"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 20.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 30
        },
        "text_guidance_scale": {
            "type": "number",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Text Guidance Scale",
            "description": "Text adherence strength",
            "default": 5.0
        },
        "prompt_enhancement": {
            "type": "boolean",
            "title": "Prompt Enhancement",
            "description": "Use LLama 3 to enhance prompt",
            "default": false
        },
        "enhance_image": {
            "type": "boolean",
            "title": "Enhance Image",
            "description": "Generates images with richer details, sharper textures, and enhanced clarity",
            "default": false
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled (default: true), the input prompt is scanned for NSFW or ethically restricted terms before image generation.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "medium": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "photography",
                        "art"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Medium",
            "description": "Output medium type"
        },
        "guidance_method_1": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 1",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_1_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Scale",
            "description": "Impact of first guidance method"
        },
        "guidance_method_1_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image Url",
            "description": "URL of the image to use for guidance method 1",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "guidance_method_1_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image File",
            "description": "Base64 encoded input image for guidance method 1"
        },
        "guidance_method_2": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 2",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_2_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Scale",
            "description": "Impact of second guidance method"
        },
        "guidance_method_2_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image Url",
            "description": "URL of the image to use for guidance method 2",
            "examples": [
                "https://images.pexels.com/photos/33217722/pexels-photo-33217722.jpeg"
            ]
        },
        "guidance_method_2_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image File",
            "description": "Base64 encoded input image for guidance method 2"
        },
        "image_prompt_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ImagePromptMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image prompt mode",
            "examples": [
                "regular",
                "style_only"
            ]
        },
        "image_prompt_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt File",
            "description": "Base64 encoded input image for image prompt"
        },
        "image_prompt_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Urls",
            "description": "URLs of the images to use for image prompt",
            "examples": [
                "https://images.pexels.com/photos/31448898/pexels-photo-31448898.jpeg",
                "https://images.pexels.com/photos/33017020/pexels-photo-33017020.jpeg"
            ]
        },
        "image_prompt_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Scale",
            "description": "Scale of the image prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateImageRequest",
    "description": "Request model for BRIA image generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/generation/generate-image-fast

Bria Generate Image Fast

Description

Generate images quickly using BRIA's fast model.

Args:

  • bria_model_version: Model version to use (e.g. "2.3").
  • prompt: Text description of the desired image (English only).
  • num_results: Number of images to generate. Use 1 when using guidance methods. Maximum value is 4.
  • aspect_ratio: Image aspect ratio.
  • sync: If True, wait for results. If False, return URLs immediately.
  • steps_num: Number of refinement iterations (4-10).
  • prompt_enhancement: Use LLama 3 to enhance prompt.
  • seed (optional): Seed for reproducible results.
  • medium (optional): Output medium type ("photography" or "art").
  • guidance_method_1 (optional): First guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_1_scale (optional): Impact of first guidance method (0.0-1.0).
  • guidance_method_1_image_file (optional): Base64 encoded image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_1_image_url (optional): URL of image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_2 (optional): Second guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_2_scale (optional): Impact of second guidance method (0.0-1.0).
  • guidance_method_2_image_file (optional): Base64 encoded image for second guidance method. Required if guidance_method_2 is specified.
  • guidance_method_2_image_url (optional): URL of image for second guidance method. Required if guidance_method_2 is specified.
  • image_prompt_mode (optional): IP-Adapter mode. Supported modes are : "regular", "style_only".
  • image_prompt_file (optional): Base64 encoded image for IP-Adapter.
  • image_prompt_urls (optional): List of image URLs for IP-Adapter.
  • image_prompt_scale (optional): Impact of IP-Adapter (0.0-1.0).
  • access_token: API key for authentication.
  • bria_client: BRIA API client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "string",
    "prompt": "string",
    "num_results": 0,
    "aspect_ratio": "1:1",
    "sync": true,
    "steps_num": 0,
    "prompt_enhancement": true,
    "enhance_image": true,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "medium": null,
    "guidance_method_1": null,
    "guidance_method_1_scale": null,
    "guidance_method_1_image_url": null,
    "guidance_method_1_image_file": null,
    "guidance_method_2": null,
    "guidance_method_2_scale": null,
    "guidance_method_2_image_url": null,
    "guidance_method_2_image_file": null,
    "image_prompt_mode": null,
    "image_prompt_file": null,
    "image_prompt_urls": null,
    "image_prompt_scale": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "const": "2.3",
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "2.3"
        },
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description of the desired image (English only).",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior",
                "Professional headshot of a business person"
            ]
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return URLs immediately",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 4.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 8
        },
        "prompt_enhancement": {
            "type": "boolean",
            "title": "Prompt Enhancement",
            "description": "Use LLama 3 to enhance prompt",
            "default": false
        },
        "enhance_image": {
            "type": "boolean",
            "title": "Enhance Image",
            "description": "Generates images with richer details, sharper textures, and enhanced clarity",
            "default": false
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled (default: true), the input prompt is scanned for NSFW or ethically restricted terms before image generation.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "medium": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "photography",
                        "art"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Medium",
            "description": "Output medium type"
        },
        "guidance_method_1": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 1",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_1_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Scale",
            "description": "Impact of first guidance method"
        },
        "guidance_method_1_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image Url",
            "description": "URL of the image to use for guidance method 1",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "guidance_method_1_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image File",
            "description": "Base64 encoded input image for guidance method 1"
        },
        "guidance_method_2": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 2",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_2_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Scale",
            "description": "Impact of second guidance method"
        },
        "guidance_method_2_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image Url",
            "description": "URL of the image to use for guidance method 2",
            "examples": [
                "https://images.pexels.com/photos/33217722/pexels-photo-33217722.jpeg"
            ]
        },
        "guidance_method_2_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image File",
            "description": "Base64 encoded input image for guidance method 2"
        },
        "image_prompt_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ImagePromptMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image prompt mode",
            "examples": [
                "regular",
                "style_only"
            ]
        },
        "image_prompt_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt File",
            "description": "Base64 encoded input image for image prompt"
        },
        "image_prompt_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Urls",
            "description": "URLs of the images to use for image prompt",
            "examples": [
                "https://images.pexels.com/photos/31448898/pexels-photo-31448898.jpeg",
                "https://images.pexels.com/photos/33017020/pexels-photo-33017020.jpeg"
            ]
        },
        "image_prompt_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Scale",
            "description": "Scale of the image prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateImageFastRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/generation/generate-image-hd

Bria Generate Image Hd

Description

Generate high-resolution images using BRIA's HD model.

Args:

  • bria_model_version: Model version to use (e.g. "2.2").
  • prompt: Text description of the desired image (English only).
  • num_results: Number of images to generate. Maximum value is 4.
  • aspect_ratio: Image aspect ratio.
  • sync: If True, wait for results. If False, return URLs immediately.
  • steps_num: Number of refinement iterations (20-50).
  • text_guidance_scale: Text adherence strength (1-10).
  • prompt_enhancement: Use LLama 3 to enhance prompt.
  • seed (optional): Seed for reproducible results.
  • negative_prompt (optional): Elements to exclude from generation.
  • medium (optional): Output medium type ("photography" or "art").
  • access_token: API key for authentication.
  • bria_client: BRIA API client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "string",
    "prompt": "string",
    "num_results": 0,
    "aspect_ratio": "1:1",
    "sync": true,
    "steps_num": 0,
    "text_guidance_scale": 10.12,
    "prompt_enhancement": true,
    "enhance_image": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "negative_prompt": null,
    "medium": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "const": "2.2",
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "2.2"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of the desired image (English only).",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior",
                "Professional headshot of a business person"
            ]
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 20.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 30
        },
        "text_guidance_scale": {
            "type": "number",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Text Guidance Scale",
            "description": "Text adherence strength",
            "default": 5.0
        },
        "prompt_enhancement": {
            "type": "boolean",
            "title": "Prompt Enhancement",
            "description": "Use LLama 3 to enhance prompt",
            "default": false
        },
        "enhance_image": {
            "type": "boolean",
            "title": "Enhance Image",
            "description": "Generates images with richer details, sharper textures, and enhanced clarity",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "medium": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "photography",
                        "art"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Medium",
            "description": "Output medium type"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateImageHDRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/generation/generate-vector-base

Bria Generate Vector Base

Description

Generate high-quality vector graphics using BRIA's base model (Beta). This endpoint provides vector graphic generation that is highly customizable and supports various guidance methods.

Args:

  • bria_model_version: Model version to use (e.g. "2.3").
  • prompt: Text description of desired vector graphic (English only).
  • num_results: Number of images to generate. Use 1 when using guidance methods. Maximum value is 4.
  • aspect_ratio: Image aspect ratio.
  • sync: If True, wait for results. If False, return URLs immediately.
  • steps_num: Number of refinement iterations (20-50).
  • text_guidance_scale: Text adherence strength (1-10).
  • seed (optional): Seed for reproducible results.
  • negative_prompt (optional): Elements to exclude from generation.
  • guidance_method_1 (optional): First guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_1_scale (optional): Impact of first guidance method (0.0-1.0).
  • guidance_method_1_image_file (optional): Base64 encoded image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_1_image_url (optional): URL of image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_2 (optional): Second guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_2_scale (optional): Impact of second guidance method (0.0-1.0).
  • guidance_method_2_image_file (optional): Base64 encoded image for second guidance method. Required if guidance_method_2 is specified.
  • image_prompt_mode (optional): IP-Adapter mode. Supported modes are : "regular", "style_only".
  • image_prompt_file (optional): Base64 encoded image for IP-Adapter.
  • image_prompt_urls (optional): List of image URLs for IP-Adapter.
  • image_prompt_scale (optional): Impact of IP-Adapter (0.0-1.0).
  • access_token: API key for authentication.
  • bria_client: BRIA API client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "2.3",
    "prompt": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "sync": true,
    "steps_num": 0,
    "text_guidance_scale": 10.12,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "negative_prompt": null,
    "guidance_method_1": null,
    "guidance_method_1_scale": null,
    "guidance_method_1_image_url": null,
    "guidance_method_1_image_file": null,
    "guidance_method_2": null,
    "guidance_method_2_scale": null,
    "guidance_method_2_image_url": null,
    "guidance_method_2_image_file": null,
    "image_prompt_mode": null,
    "image_prompt_file": null,
    "image_prompt_urls": null,
    "image_prompt_scale": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "enum": [
                "2.3",
                "3.2"
            ],
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "3.2"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of desired vector graphic (English only)",
            "examples": [
                "A fox in the mountains",
                "A man in the city"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 20.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 30
        },
        "text_guidance_scale": {
            "type": "number",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Text Guidance Scale",
            "description": "Text adherence strength",
            "default": 5.0
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "guidance_method_1": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 1",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_1_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Scale",
            "description": "Impact of first guidance method"
        },
        "guidance_method_1_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image Url",
            "description": "URL of the image to use for guidance method 1",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "guidance_method_1_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image File",
            "description": "Base64 encoded input image for guidance method 1"
        },
        "guidance_method_2": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 2",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_2_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Scale",
            "description": "Impact of second guidance method"
        },
        "guidance_method_2_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image Url",
            "description": "URL of the image to use for guidance method 2",
            "examples": [
                "https://images.pexels.com/photos/33217722/pexels-photo-33217722.jpeg"
            ]
        },
        "guidance_method_2_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image File",
            "description": "Base64 encoded input image for guidance method 2"
        },
        "image_prompt_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ImagePromptMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image prompt mode",
            "examples": [
                "regular",
                "style_only"
            ]
        },
        "image_prompt_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt File",
            "description": "Base64 encoded input image for image prompt"
        },
        "image_prompt_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Urls",
            "description": "URLs of the images to use for image prompt",
            "examples": [
                "https://images.pexels.com/photos/31448898/pexels-photo-31448898.jpeg",
                "https://images.pexels.com/photos/33017020/pexels-photo-33017020.jpeg"
            ]
        },
        "image_prompt_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Scale",
            "description": "Scale of the image prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateVectorBaseRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/generation/generate-vector-fast

Bria Vector Generation Fast

Description

Generate vector graphics quickly using BRIA's fast model (Beta). This endpoint provides rapid vector graphic generation without compromising quality. Supports the same guidance methods as the base model for enhanced control.

Args:

  • bria_model_version: Model version to use (e.g. "2.3").
  • prompt: Text description of desired vector graphic (English only).
  • num_results: Number of images to generate. Use 1 when using guidance methods. Maximum value is 4.
  • aspect_ratio: Image aspect ratio.
  • sync: If True, wait for results. If False, return URLs immediately.
  • steps_num: Number of refinement iterations (4-10).
  • seed (optional): Seed for reproducible results.
  • guidance_method_1 (optional): First guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_1_scale (optional): Impact of first guidance method (0.0-1.0).
  • guidance_method_1_image_file (optional): Base64 encoded image for first guidance method. Required if guidance_method_1 is specified.
  • guidance_method_2 (optional): Second guidance method type. Supported guidance methods are: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid".
  • guidance_method_2_scale (optional): Impact of second guidance method (0.0-1.0).
  • guidance_method_2_image_file (optional): Base64 encoded image for second guidance method. Required if guidance_method_2 is specified.
  • guidance_method_2_image_url (optional): URL of image for second guidance method. Required if guidance_method_2 is specified.
  • image_prompt_mode (optional): IP-Adapter mode. Supported modes are : "regular", "style_only".
  • image_prompt_file (optional): Base64 encoded image for IP-Adapter.
  • image_prompt_urls (optional): List of image URLs for IP-Adapter.
  • image_prompt_scale (optional): Impact of IP-Adapter (0.0-1.0).
  • access_token: API key for authentication.
  • bria_client: BRIA API client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "string",
    "prompt": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "sync": true,
    "steps_num": 0,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "guidance_method_1": null,
    "guidance_method_1_scale": null,
    "guidance_method_1_image_url": null,
    "guidance_method_1_image_file": null,
    "guidance_method_2": null,
    "guidance_method_2_scale": null,
    "guidance_method_2_image_url": null,
    "guidance_method_2_image_file": null,
    "image_prompt_mode": null,
    "image_prompt_file": null,
    "image_prompt_urls": null,
    "image_prompt_scale": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "const": "2.3",
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "2.3"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of desired vector graphic (English only)",
            "examples": [
                "A fox in the mountains",
                "A man in the city"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 4.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 8
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "guidance_method_1": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 1",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_1_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Scale",
            "description": "Impact of first guidance method"
        },
        "guidance_method_1_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image Url",
            "description": "URL of the image to use for guidance method 1",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "guidance_method_1_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image File",
            "description": "Base64 encoded input image for guidance method 1"
        },
        "guidance_method_2": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 2",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_2_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Scale",
            "description": "Impact of second guidance method"
        },
        "guidance_method_2_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image Url",
            "description": "URL of the image to use for guidance method 2",
            "examples": [
                "https://images.pexels.com/photos/33217722/pexels-photo-33217722.jpeg"
            ]
        },
        "guidance_method_2_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image File",
            "description": "Base64 encoded input image for guidance method 2"
        },
        "image_prompt_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ImagePromptMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image prompt mode",
            "examples": [
                "regular",
                "style_only"
            ]
        },
        "image_prompt_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt File",
            "description": "Base64 encoded input image for image prompt"
        },
        "image_prompt_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Urls",
            "description": "URLs of the images to use for image prompt",
            "examples": [
                "https://images.pexels.com/photos/31448898/pexels-photo-31448898.jpeg",
                "https://images.pexels.com/photos/33017020/pexels-photo-33017020.jpeg"
            ]
        },
        "image_prompt_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Scale",
            "description": "Scale of the image prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateVectorFastRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/generation/generate-variation

Bria Generate Variation

Description

Guides image generation using both prompts and a reference image, maintaining the original structure while applying new styles. This method allows for controlled image generation by using an input image's structure and depth as a reference, while incorporating new materials, colors, and textures based on the provided prompt.

Args:

  • prompt: Text description of desired output image.
  • num_results : Number of images to generate (1-4). Only 1 supported when fast=False. Maximum value is 4.
  • sync: If True, wait for results. If False, return URLs immediately. Recommended False when fast=False.
  • fast: Use fast generation mode for speed/quality balance. Regular mode used when False.
  • steps_num: Number of refinement iterations. Fast mode: 4-20, default
  • Regular mode: 20-50, default 30.
  • seed (optional): Seed for reproducible results.
  • image_url (optional): URL of reference image. Takes precedence over image_file. Max 12MB. Formats: jpeg, jpg, png, webp.
  • image_file (optional): Base64 encoded reference image. Used if image_url not provided. Max 12MB. Formats: jpeg, jpg, png, webp.
  • ref_image_influence (float, optional): Weight of reference image in generation (0-1). Higher values mean stronger adherence to reference.
  • tailored_model_id (optional): ID of custom trained model to use. 'Max' training version models not supported.
  • tailored_model_influence (float, optional): Weight of tailored model in generation (0-1). Only used with tailored_model_id. If used, default is 0.5.
  • include_generation_prefix (optional): Auto-prepend model's training prefix to prompt. Only relevant with tailored models. Set False to use custom prefix.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "num_results": 0,
    "sync": true,
    "fast": true,
    "steps_num": 0,
    "ref_image_influence": 10.12,
    "include_generation_prefix": true,
    "enhance_image": true,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "ip_signal": true,
    "seed": null,
    "image_url": null,
    "image_file": null,
    "tailored_model_id": null,
    "tailored_model_influence": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of desired output image.",
            "examples": [
                "Beautiful sunset colors",
                "Black and white vintage photo"
            ]
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return URLs immediately",
            "default": true
        },
        "fast": {
            "type": "boolean",
            "title": "Fast",
            "description": "Use fast generation mode for speed/quality balance",
            "default": true
        },
        "steps_num": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 20.0,
            "title": "Steps Num",
            "description": "Number of refinement iterations",
            "default": 30
        },
        "ref_image_influence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Ref Image Influence",
            "description": "Weight of reference image in generation",
            "default": 0.75
        },
        "include_generation_prefix": {
            "type": "boolean",
            "title": "Include Generation Prefix",
            "description": "Auto-prepend Custom Model's training prefix to prompt",
            "default": true
        },
        "enhance_image": {
            "type": "boolean",
            "title": "Enhance Image",
            "description": "Generates images with richer details, sharper textures, and enhanced clarity",
            "default": false
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled (default: true), the input prompt is scanned for NSFW or ethically restricted terms before image generation.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "ip_signal": {
            "type": "boolean",
            "title": "Ip Signal",
            "description": "When enabled, adds an IP signature to the generated images.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        },
        "tailored_model_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tailored Model Id",
            "description": "ID of Custom Model trained model to use"
        },
        "tailored_model_influence": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tailored Model Influence",
            "description": "Weight of tailored model in generation"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "BriaGenerateVariationRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria-lora/image/generation/generate-image

Generate Images

Description

Generate images using a specified model.

Args:

  • model_id: ID of the model to use for generation
  • prompt: Text prompt for image generation
  • num_results: Number of images to generate (default: 1)
  • seed: Random seed for reproducibility (optional)
  • sync: Whether to perform synchronous generation (default: False)
  • fast: Whether to use fast generation mode (default: False) At the moment, tailored models trained using the 'Max'/3.2 training version, do not support fast generation.
  • steps_num: Number of steps for the generation process (default: 20)
  • model_influence: Influence of the model on the generation (default: 1.0)
  • include_generation_prefix: Whether to include a prefix in the generated images (default: False)

Returns: - JSONResponse: Response containing the generated images or an error message

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "model_id": "string",
    "prompt": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "sync": true,
    "fast": true,
    "steps_num": null,
    "model_influence": null,
    "include_generation_prefix": true,
    "seed": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "model_id": {
            "type": "string",
            "title": "Model Id",
            "description": "ID of the Lora model to use"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text prompt for generation (English only)",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "fast": {
            "type": "boolean",
            "title": "Fast",
            "description": "Use fast generation mode for speed/quality balance",
            "default": false
        },
        "steps_num": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 50.0,
                    "minimum": 4.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Steps Num",
            "description": "Number of refinement iterations. When fast=false, the default value is 30, the minimum is 20 and the maximum is 50"
        },
        "model_influence": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Model Influence",
            "description": "Influence of the Lora model"
        },
        "include_generation_prefix": {
            "type": "boolean",
            "title": "Include Generation Prefix",
            "description": "Auto-prepend Custom Model's training prefix to prompt",
            "default": true
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        }
    },
    "type": "object",
    "required": [
        "model_id",
        "prompt"
    ],
    "title": "BriaLoraGenerateImagesRequest",
    "description": "Request model for generating images with Bria Lora (BRIA API v2).\n\nThis model only includes fields supported by the generate_images API method.\nFor advanced features like guidance methods, use BriaLoraGenerateVectorRequest."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria-lora/image/generation/generate-vector

Generate Vector

Description

Generate a vector using a specified model.

Args:

  • model_id: ID of the model to use for vector generation
  • prompt: Text prompt for vector generation
  • num_results: Number of vectors to generate (default: 1)
  • seed: Random seed for reproducibility (optional)
  • sync: Whether to perform synchronous generation (default: True)
  • fast: Whether to use fast generation mode (default: True) At the moment, tailored models trained using the 'Max'/3.2 training version, do not support fast generation. Therefore, steps_num minimum is 20.
  • steps_num: Number of steps for the generation process (optional)
  • model_influence: Influence of the model on the generation (optional)
  • include_generation_prefix: Whether to include a prefix in the generated vector (default: True)

Returns: - JSONResponse: Response containing the generated vector or an error message

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "bria_model_version": "2.3",
    "model_id": "string",
    "prompt": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "sync": true,
    "steps_num": null,
    "text_guidance_scale": null,
    "prompt_content_moderation": true,
    "content_moderation": true,
    "seed": null,
    "negative_prompt": null,
    "model_influence": null,
    "include_generation_prefix": true,
    "guidance_method_1": null,
    "guidance_method_1_scale": null,
    "guidance_method_1_image_url": null,
    "guidance_method_1_image_file": null,
    "guidance_method_2": null,
    "guidance_method_2_scale": null,
    "guidance_method_2_image_url": null,
    "guidance_method_2_image_file": null,
    "image_prompt_mode": null,
    "image_prompt_file": null,
    "image_prompt_urls": null,
    "image_prompt_scale": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "bria_model_version": {
            "type": "string",
            "enum": [
                "2.3",
                "3.2"
            ],
            "title": "Bria Model Version",
            "description": "BRIA model version to use",
            "default": "3.2"
        },
        "model_id": {
            "type": "string",
            "title": "Model Id",
            "description": "ID of the Lora model to use"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of desired vector graphic (English only)",
            "examples": [
                "A fox in the mountains",
                "A man in the city"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of vectors to generate",
            "default": 1
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "steps_num": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 50.0,
                    "minimum": 20.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Steps Num",
            "description": "Number of refinement iterations"
        },
        "text_guidance_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 10.0,
                    "minimum": 1.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Text Guidance Scale",
            "description": "Text adherence strength"
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "When enabled, the input prompt is scanned for NSFW or ethically restricted terms before image generation.",
            "default": false
        },
        "content_moderation": {
            "type": "boolean",
            "title": "Content Moderation",
            "description": "When enabled, applies content moderation to both input visuals and generated outputs.",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "model_influence": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Model Influence",
            "description": "Influence of the Lora model"
        },
        "include_generation_prefix": {
            "type": "boolean",
            "title": "Include Generation Prefix",
            "description": "Auto-prepend Custom Model's training prefix to prompt",
            "default": true
        },
        "guidance_method_1": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 1",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_1_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Scale",
            "description": "Impact of first guidance method"
        },
        "guidance_method_1_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image Url",
            "description": "URL of the image to use for guidance method 1",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "guidance_method_1_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 1 Image File",
            "description": "Base64 encoded input image for guidance method 1"
        },
        "guidance_method_2": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ControlnetType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Guidance method 2",
            "examples": [
                "controlnet_canny",
                "controlnet_depth"
            ]
        },
        "guidance_method_2_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Scale",
            "description": "Impact of second guidance method"
        },
        "guidance_method_2_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image Url",
            "description": "URL of the image to use for guidance method 2",
            "examples": [
                "https://images.pexels.com/photos/33217722/pexels-photo-33217722.jpeg"
            ]
        },
        "guidance_method_2_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Guidance Method 2 Image File",
            "description": "Base64 encoded input image for guidance method 2"
        },
        "image_prompt_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ImagePromptMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image prompt mode",
            "examples": [
                "regular",
                "style_only"
            ]
        },
        "image_prompt_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt File",
            "description": "Base64 encoded input image for image prompt"
        },
        "image_prompt_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Urls",
            "description": "URLs of the images to use for image prompt",
            "examples": [
                "https://images.pexels.com/photos/31448898/pexels-photo-31448898.jpeg",
                "https://images.pexels.com/photos/33017020/pexels-photo-33017020.jpeg"
            ]
        },
        "image_prompt_scale": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Prompt Scale",
            "description": "Scale of the image prompt"
        }
    },
    "type": "object",
    "required": [
        "model_id",
        "prompt"
    ],
    "title": "BriaLoraGenerateVectorRequest",
    "description": "Request model for generating vector graphics with Bria Lora (BRIA API v2)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/generation/generate-image

Imagen Generate Image With Prompt

Description

Generate images using Vertex AI Imagen.

Args: - prompt : Image generation prompt. - number_of_images (optional): Number of images to generate (1-4). Defaults to 1. - aspect_ratio (optional): Desired aspect ratio. Options: - 1:1 (SQUARE): Square format - 9:16 (PORTRAIT): Vertical portrait format - 16:9 (LANDSCAPE): Horizontal landscape format - 3:4 (PORTRAIT_STANDARD): Standard portrait format - 4:3 (LANDSCAPE_STANDARD): Standard landscape format - model_name (optional): Model to use: - imagen-3.0-generate-002 (IMAGEN_3_STANDARD): Standard Imagen 3.0 model - imagen-4.0-generate-preview-06-06 (IMAGEN_4_STANDARD): Standard Imagen 4.0 model - imagen-4.0-ultra-generate-preview-06-06 (IMAGEN_4_ULTRA): Ultra high-quality Imagen 4.0 model - imagen-4.0-fast-generate-preview-06-06 (IMAGEN_4_FAST): Fast Imagen 4.0 model - use_fast_model (optional, bool): When enabled, uses the fast generation model and ignores the model_name parameter. - add_watermark (optional, bool): Whether to add a watermark to the generated images. - safety_filter_level (optional): Safety filtering level: - BLOCK_LOW_AND_ABOVE (HIGH): Highest safety threshold - BLOCK_MEDIUM_AND_ABOVE (MEDIUM): Medium safety threshold - BLOCK_ONLY_HIGH (LOW): Reduced safety threshold - person_generation (optional): Person generation control: - ALLOW_ALL (ALL): Allow people of all ages - ALLOW_ADULT (ADULT): Allow only adults - DONT_ALLOW (NONE): Disable people/faces in generated images

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "model_name": null,
    "prompt": "string",
    "aspect_ratio": "1:1",
    "number_of_images": 0,
    "use_fast_model": true,
    "add_watermark": true,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "model_name": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ModelName"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Imagen model to use",
            "default": "imagen-4.0-fast-generate-preview-06-06"
        },
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description of the desired image",
            "default": "A beautiful sunset over mountains"
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "9:16",
                "16:9",
                "3:4",
                "4:3"
            ],
            "title": "Aspect Ratio",
            "description": "Desired aspect ratio",
            "default": "1:1"
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of images to generate",
            "default": 1
        },
        "use_fast_model": {
            "type": "boolean",
            "title": "Use Fast Model",
            "description": "Use faster model variant when available",
            "default": true
        },
        "add_watermark": {
            "type": "boolean",
            "title": "Add Watermark",
            "description": "Add watermark to generated images",
            "default": false
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "title": "ImagenGenerateImageRequest",
    "description": "Request model for Imagen image generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/generation/generate-with-image-guidance

Imagen Generate With Image

Description

Generate images with image guidance (style or subject).

Args: - guidance_type : Type of guidance ("style" or "subject"). - prompt : Generation prompt. For prompting guidelines see examples style , subject. - ref_image_1_url : URL of the first reference image. - ref_image_1_description : Description of the first reference image, if guidance_type is style, describe only the style of the reference image, if guidance_type is subject, describe only the subject of the reference image. - ref_image_2_url (optional): URL of the second reference image. - ref_image_2_description (optional): Description of the second reference image. - subject_type (optional): Required when guidance_type is 'subject', else leave empty. Type of subject: - SUBJECT_TYPE_PERSON: Person subject type (portraits, etc.) - SUBJECT_TYPE_ANIMAL: Animal subject type - SUBJECT_TYPE_PRODUCT: Product subject type (for e-commerce, etc.) - aspect_ratio (optional): Desired aspect ratio. Options: - 1:1 (SQUARE): Square format - 9:16 (PORTRAIT): Vertical portrait format - 16:9 (LANDSCAPE): Horizontal landscape format - 3:4 (PORTRAIT_STANDARD): Standard portrait format - 4:3 (LANDSCAPE_STANDARD): Standard landscape format - safety_filter_level (optional): Safety filtering level: - BLOCK_LOW_AND_ABOVE (HIGH): Highest safety threshold - BLOCK_MEDIUM_AND_ABOVE (MEDIUM): Medium safety threshold - BLOCK_ONLY_HIGH (LOW): Reduced safety threshold - person_generation (optional): Person generation control: - ALLOW_ALL (ALL): Allow people of all ages - ALLOW_ADULT (ADULT): Allow only adults - DONT_ALLOW (NONE): Disable people/faces in generated images

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "guidance_type": "style",
    "ref_image_1_url": "string",
    "ref_image_1_description": null,
    "ref_image_2_url": null,
    "ref_image_2_description": null,
    "subject_type": null,
    "prompt": null,
    "aspect_ratio": null,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "guidance_type": {
            "type": "string",
            "enum": [
                "style",
                "subject"
            ],
            "title": "Guidance Type",
            "description": "Type of guidance",
            "examples": [
                "style",
                "subject"
            ]
        },
        "ref_image_1_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Ref Image 1 Url",
            "description": "URL of the first reference image",
            "examples": [
                "https://images.pexels.com/photos/1876876/pexels-photo-1876876.jpeg"
            ]
        },
        "ref_image_1_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 20
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Image 1 Description",
            "description": "Description of the first reference image, if guidance_type is style, describe only the style of the reference image, if guidance_type is subject, describe only the subject of the reference image",
            "examples": [
                "neon vintage",
                "A portrait of a caucasian young woman"
            ]
        },
        "ref_image_2_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Image 2 Url",
            "description": "URL of the second reference image",
            "examples": [
                "https://images.pexels.com/photos/5990682/pexels-photo-5990682.jpeg"
            ]
        },
        "ref_image_2_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 20
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Image 2 Description",
            "description": "Description of the second reference image",
            "examples": [
                "black and white",
                "A asian man in a suit"
            ]
        },
        "subject_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/SubjectReferenceType"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Subject type (required when guidance_type='subject')"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 3
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Generation prompt. For prompting guidelines see examples [style](https://cloud.google.com/vertex-ai/generative-ai/docs/image/style-customization) , [subject](https://cloud.google.com/vertex-ai/generative-ai/docs/image/subject-customization)",
            "examples": [
                "generate an image of a neon sign [1] with the words: have a great day in black and white [2]"
            ]
        },
        "aspect_ratio": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "1:1",
                        "9:16",
                        "16:9",
                        "3:4",
                        "4:3"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Aspect Ratio",
            "description": "Desired aspect ratio",
            "examples": [
                "1:1",
                "9:16",
                "16:9",
                "3:4",
                "4:3"
            ]
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "required": [
        "guidance_type",
        "ref_image_1_url"
    ],
    "title": "ImagenImageGuidanceRequest",
    "description": "Request model for Imagen image guidance (style/subject)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/generation/generate-variation

Imagen Generate Variation

Description

Apply controlled editing to an image.

Args: - image_url: URL or path to the source image to edit. - prompt: The prompt that describes the desired edits to the image. - control_type (optional): Type of control to apply: - CONTROL_TYPE_CANNY: Edge detection control - CONTROL_TYPE_SCRIBBLE: Scribble-based control - number_of_images (optional): Number of images to generate (1-4). Defaults to 1. - aspect_ratio (optional): Desired aspect ratio. Options: - 1:1 (SQUARE): Square format - 9:16 (PORTRAIT): Vertical portrait format - 16:9 (LANDSCAPE): Horizontal landscape format - 3:4 (PORTRAIT_STANDARD): Standard portrait format - 4:3 (LANDSCAPE_STANDARD): Standard landscape format - safety_filter_level (optional): Safety filtering level: - BLOCK_LOW_AND_ABOVE (HIGH): Highest safety threshold - BLOCK_MEDIUM_AND_ABOVE (MEDIUM): Medium safety threshold - BLOCK_ONLY_HIGH (LOW): Reduced safety threshold - person_generation (optional): Person generation control: - ALLOW_ALL (ALL): Allow people of all ages - ALLOW_ADULT (ADULT): Allow only adults - DONT_ALLOW (NONE): Disable people/faces in generated images

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": "string",
    "prompt": null,
    "control_type": "CONTROL_TYPE_DEFAULT",
    "number_of_images": 0,
    "aspect_ratio": null,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the source image",
            "examples": [
                "https://images.pexels.com/photos/18373303/pexels-photo-18373303.jpeg"
            ]
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 3
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Text prompt describing the desired changes",
            "examples": [
                "Add sunglasses and change the background to a beach scene"
            ]
        },
        "control_type": {
            "$ref": "#/components/schemas/ControlReferenceType",
            "description": "Control type for variation",
            "default": "CONTROL_TYPE_CANNY",
            "examples": [
                "CONTROL_TYPE_CANNY",
                "CONTROL_TYPE_SCRIBBLE"
            ]
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of images to generate",
            "default": 1
        },
        "aspect_ratio": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "1:1",
                        "9:16",
                        "16:9",
                        "3:4",
                        "4:3"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Aspect Ratio",
            "description": "Desired aspect ratio",
            "examples": [
                "1:1",
                "9:16",
                "16:9",
                "3:4",
                "4:3"
            ]
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "required": [
        "image_url"
    ],
    "title": "ImagenVariationRequest",
    "description": "Request model for Imagen image variations."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/generation/gemini-generate-image

Gemini Generate Image

Description

Generate images using Gemini 2.0 Flash with optional input images for composition.

Args: - prompt: Text description of the desired image. To generate multiple images, specify in the prompt (e.g., "Generate 3 images of cats"). - image_urls (optional): Array of input image URLs to use as reference/composition elements. Supports both HTTP/HTTPS URLs and GCS URIs (gs://). - safety_method (optional): Safety method for the image generation. Options: - PROBABILITY : Use probability-based safety - SEVERITY : Use severity-based safety - HARM_BLOCK_METHOD_UNSPECIFIED : Use harm block method - safety_category (optional): Safety category for the image generation. Options: - HARM_CATEGORY_UNSPECIFIED : Unspecified safety category - HARM_CATEGORY_HATE_SPEECH: Hate speech category - HARM_CATEGORY_DANGEROUS_CONTENT: Dangerous content category - HARM_CATEGORY_HARASSMENT: Harassment category - HARM_CATEGORY_SEXUALLY_EXPLICIT: Sexually explicit content category - HARM_CATEGORY_CIVIC_INTEGRITY: Civic integrity category - safety_threshold (optional): Safety threshold for the image generation. Options: - HARM_BLOCK_THRESHOLD_UNSPECIFIED : Unspecified safety threshold - BLOCK_LOW_AND_ABOVE (BLOCK_LOW_AND_ABOVE): Low and above threshold - BLOCK_MEDIUM_AND_ABOVE (BLOCK_MEDIUM_AND_ABOVE): Medium and above threshold - BLOCK_ONLY_HIGH (BLOCK_ONLY_HIGH): Only high threshold - BLOCK_NONE (BLOCK_NONE): No threshold - OFF (OFF): Off threshold

Examples:

1. Text-only generation:

{
  "prompt": "A beautiful sunset over mountains"
}

2. Image composition with reference:

{
  "prompt": "Combine these images into an artistic collage",
  "image_urls": ["https://images.pexels.com/photos/370473/pexels-
photo-370473.jpeg", "https://images.pexels.com/photos/1687678/pexels-
photo-1687678.jpeg"]
}

Returns: - Json response with success status and the result containing generated image URLs and optional text content.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "image_urls": null,
    "safety_method": null,
    "safety_category": null,
    "safety_threshold": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description of the desired image. To generate multiple images, specify in the prompt.",
            "examples": [
                "A beautiful sunset over mountains",
                "Combine these images into an artistic collage"
            ]
        },
        "image_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Urls",
            "description": "Optional array of input image URLs to use as reference/composition elements",
            "examples": [
                [
                    "https://images.pexels.com/photos/370473/pexels-photo-370473.jpeg",
                    "https://images.pexels.com/photos/1687678/pexels-photo-1687678.jpeg"
                ]
            ]
        },
        "safety_method": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockMethod"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety filtering method",
            "examples": [
                "PROBABILITY",
                "SEVERITY"
            ]
        },
        "safety_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmCategory"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety category to filter",
            "examples": [
                "HARM_CATEGORY_UNSPECIFIED",
                "HARM_CATEGORY_HATE_SPEECH",
                "HARM_CATEGORY_DANGEROUS_CONTENT",
                "HARM_CATEGORY_HARASSMENT",
                "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                "HARM_CATEGORY_CIVIC_INTEGRITY"
            ]
        },
        "safety_threshold": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockThreshold"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety threshold level",
            "examples": [
                "BLOCK_LOW_AND_ABOVE",
                "BLOCK_MEDIUM_AND_ABOVE",
                "BLOCK_ONLY_HIGH",
                "BLOCK_NONE"
            ]
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "GeminiGenerateImageRequest",
    "description": "Request model for Gemini image generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/generation/generate-image-sequence

Gemini Generate Image Sequence

Description

Generate interleaved text and images using Gemini 2.0 Flash.

This endpoint creates rich content that mixes text explanations with generated images, perfect for storytelling, tutorials, or step-by-step guides.

Args: - prompt: Text prompt for interleaved content generation. Be specific about wanting both text and images. - safety_method (optional): Safety method for the image generation. Options: - PROBABILITY : Use probability-based safety - SEVERITY : Use severity-based safety - HARM_BLOCK_METHOD_UNSPECIFIED : Use harm block method - safety_category (optional): Safety category for the image generation. Options: - HARM_CATEGORY_UNSPECIFIED : Unspecified safety category - HARM_CATEGORY_HATE_SPEECH: Hate speech category - HARM_CATEGORY_DANGEROUS_CONTENT: Dangerous content category - HARM_CATEGORY_HARASSMENT: Harassment category - HARM_CATEGORY_SEXUALLY_EXPLICIT: Sexually explicit content category - HARM_CATEGORY_CIVIC_INTEGRITY: Civic integrity category - safety_threshold (optional): Safety threshold for the image generation. Options: - HARM_BLOCK_THRESHOLD_UNSPECIFIED : Unspecified safety threshold - BLOCK_LOW_AND_ABOVE (BLOCK_LOW_AND_ABOVE): Low and above threshold - BLOCK_MEDIUM_AND_ABOVE (BLOCK_MEDIUM_AND_ABOVE): Medium and above threshold - BLOCK_ONLY_HIGH (BLOCK_ONLY_HIGH): Only high threshold - BLOCK_NONE (BLOCK_NONE): No threshold - OFF (OFF): Off threshold

Prompt Examples: - "Tell a short story about a magical forest with images illustrating key scenes" - "Explain how to bake a chocolate cake with step-by-step images showing the process"

Returns: - Json response with success status and the result containing both text content and generated image URLs in sequence.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "safety_method": null,
    "safety_category": null,
    "safety_threshold": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text prompt for interleaved text and image generation",
            "examples": [
                "Tell a short story about a magical forest with images illustrating key scenes",
                "Explain how to bake a chocolate cake with step-by-step images showing the process"
            ]
        },
        "safety_method": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockMethod"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety filtering method",
            "examples": [
                "PROBABILITY",
                "SEVERITY"
            ]
        },
        "safety_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmCategory"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety category to filter",
            "examples": [
                "HARM_CATEGORY_UNSPECIFIED",
                "HARM_CATEGORY_HATE_SPEECH",
                "HARM_CATEGORY_DANGEROUS_CONTENT",
                "HARM_CATEGORY_HARASSMENT",
                "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                "HARM_CATEGORY_CIVIC_INTEGRITY"
            ]
        },
        "safety_threshold": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockThreshold"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety threshold level",
            "examples": [
                "BLOCK_LOW_AND_ABOVE",
                "BLOCK_MEDIUM_AND_ABOVE",
                "BLOCK_ONLY_HIGH",
                "BLOCK_NONE"
            ]
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "GeminiGenerateImageSequenceRequest",
    "description": "Request model for Gemini image sequence generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/openai/image/generation/generate-image

Gpt Generate Image

Description

Generate an image using GPT Image API.

Args:

  • request: GPT image generation request containing:
  • prompt: The prompt for image generation.
  • number_of_images: Number of images to generate (1-10).
  • aspect_ratio: The aspect ratio of the image. Options:
  • "1:1" (square)
  • "2:3" (landscape)
  • "3:2" (portrait)
  • quality: The quality of the image (medium, high, auto).
  • background: Background handling (transparent, auto).
  • access_token: API key for authentication.
  • gpt_image_client: GPTImageAPI client instance.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "number_of_images": 0,
    "aspect_ratio": "1:1",
    "quality": "medium",
    "background": "transparent"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description of the desired image",
            "examples": [
                "beautiful flowers in the garden",
                "A futuristic city skyline at night"
            ]
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of images to generate",
            "default": 1
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2"
            ],
            "title": "Aspect Ratio",
            "description": "Desired aspect ratio",
            "default": "1:1"
        },
        "quality": {
            "$ref": "#/components/schemas/GPTImageQuality",
            "description": "Image quality setting",
            "default": "auto",
            "examples": [
                "medium",
                "high"
            ]
        },
        "background": {
            "$ref": "#/components/schemas/GPTImageBackground",
            "description": "Background handling",
            "default": "auto",
            "examples": [
                "transparent",
                "auto"
            ]
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "GPTGenerateImageRequest",
    "description": "Request model for GPT image generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/firefly/image/generation/generate-image

Generate Images Async

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "x_model_version": "image3",
    "prompt": "string",
    "content_class": "photo",
    "custom_model_id": null,
    "negative_prompt": null,
    "prompt_biasing_locale_code": null,
    "seeds": null,
    "size": {
        "height": 0,
        "width": 0
    },
    "structure": null,
    "style": null,
    "visual_intensity": null,
    "upsampler_type": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "x_model_version": {
            "$ref": "#/components/schemas/CustomModel"
        },
        "prompt": {
            "type": "string",
            "title": "Prompt"
        },
        "content_class": {
            "$ref": "#/components/schemas/ContentClass",
            "default": "photo"
        },
        "custom_model_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Custom Model Id"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "prompt_biasing_locale_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt Biasing Locale Code"
        },
        "seeds": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seeds"
        },
        "size": {
            "$ref": "#/components/schemas/SizeImagesAsyncModel",
            "default": {
                "height": 2048,
                "width": 2048
            }
        },
        "structure": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/StructureModel"
                },
                {
                    "type": "null"
                }
            ]
        },
        "style": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/StyleModel"
                },
                {
                    "type": "null"
                }
            ]
        },
        "visual_intensity": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Visual Intensity"
        },
        "upsampler_type": {
            "type": "string",
            "title": "Upsampler Type",
            "default": "default"
        }
    },
    "type": "object",
    "required": [
        "x_model_version",
        "prompt"
    ],
    "title": "Body_generate_images_async_api_v1_firefly_image_generation_generate_image_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/firefly/image/generation/generate-variation

Generate Similar Images Async

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "x_model_version": "image3",
    "image": {
        "source": {
            "upload_id": null,
            "url": null
        }
    },
    "seeds": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "x_model_version": {
            "$ref": "#/components/schemas/CustomModel"
        },
        "image": {
            "$ref": "#/components/schemas/ImageReferenceModel"
        },
        "seeds": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seeds"
        }
    },
    "type": "object",
    "required": [
        "x_model_version",
        "image"
    ],
    "title": "Body_generate_similar_images_async_api_v1_firefly_image_generation_generate_variation_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/runway/image/generation/generate-image

Generate Image

Description

Generate an image from a text prompt or using reference images.

Args:

  • request (RunwayGenerateImageRequest):
  • prompt (str): Description of the desired image.
  • aspect_ratio (ImageAspectRatio): Output resolution ratio.
  • model ("gen4_image" | "gen4_image_turbo"): Model variant.
  • reference_images_url (list[ReferenceImage] | None): Optional list of reference images with optional tags.
  • seed (int | None): Seed for reproducible results.
  • content_moderation (ContentModeration | None): Moderation settings.

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "aspect_ratio": "1920:1080",
    "model": "gen4_image",
    "reference_images_url": null,
    "seed": null,
    "content_moderation": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Prompt To Generate Image",
            "description": "A non-empty string up to 1000 characters describing what should appear in the output.",
            "examples": [
                "A beautiful sea view"
            ]
        },
        "aspect_ratio": {
            "$ref": "#/components/schemas/ImageAspectRatio",
            "title": "Aspect ratio",
            "description": "The resolution of the output image.",
            "default": "1920:1080"
        },
        "model": {
            "type": "string",
            "enum": [
                "gen4_image",
                "gen4_image_turbo"
            ],
            "title": "Model Variant",
            "description": "The model variant to use for image generation.",
            "default": "gen4_image"
        },
        "reference_images_url": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ReferenceImage"
                    },
                    "type": "array",
                    "maxItems": 3
                },
                {
                    "type": "null"
                }
            ],
            "title": "Reference Images",
            "description": "An array of up to three images to be used as references for the generated image output.",
            "examples": [
                [
                    {
                        "tag": "sea",
                        "uri": "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
                    }
                ]
            ]
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 4294967295.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results for the same other request parameters."
        },
        "content_moderation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ContentModeration"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Settings that affect the behavior of the content moderation system."
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "RunwayGenerateImageRequest",
    "description": "Request model for Runway text/image to image generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Image Editing


POST /api/v1/bria/image/editing/get-masks

Bria Get Masks

Description

Generate segmentation masks for an image. Creates segmentation masks that identify different objects within the image. The result url contains a zip file with k mask files in the zip.

Args:

  • image_url (optional): URL of input image. Used if file not provided.
  • image_file (optional): The file of the input image, in base64 format. Accepted formats are jpeg, jpg, png, webp.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": null,
    "image_file": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        }
    },
    "type": "object",
    "title": "BriaGetMasksRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing/remove-background

Bria Remove Background

Description

Remove background from an image using Bria's RMBG 2.0 model.

Args:

  • image: The image to remove background from. Accepts URL or base64 encoded string.
  • Supported formats: JPEG, JPG, PNG, WEBP.
  • preserve_alpha (bool): Controls whether partially transparent areas are retained in output.
  • sync (bool): If True, wait for results. If False, return status URL immediately.
  • visual_input_content_moderation (bool): Enable content moderation on input visual.
  • visual_output_content_moderation (bool): Enable content moderation on output visual.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "preserve_alpha": true,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to remove background from. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether partially transparent areas from input are retained in output",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaRemoveBackgroundRequest",
    "description": "Request model for BRIA Remove Background."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing/product-cutout

Bria Product Cutout

Description

Create a precise cutout of a product from any given image.

Args:

  • image_url (optional): URL of input image. Used if file not provided.
  • image_file (optional): The file of the input image, in base64 format. Accepted formats are jpeg, jpg, png, webp.
  • force_rmbg (optional): Forces background removal, even if the original image already contains an alpha channel. Useful for refining existing foreground/background separation or ignoring unnecessary alpha channels.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": null,
    "image_file": null,
    "force_rmbg": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        },
        "force_rmbg": {
            "type": "boolean",
            "title": "Force Rmbg",
            "description": "Force background removal even if alpha channel exists",
            "default": false
        }
    },
    "type": "object",
    "title": "BriaProductCutoutRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing/crop-foreground

Bria Crop Foreground

Description

Crop the foreground from an image.

Args:

  • image_url: URL of input image. Takes precedence over image_file.
  • image_file: Base64 encoded input image. Used if image_url not provided.
  • padding: Amount of padding around the foreground in pixels.
  • force_rmbg: Force background removal even if alpha channel exists.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "padding": 0,
    "force_background_detection": true,
    "preserve_alpha": true,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to crop foreground from. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "padding": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Padding",
            "description": "Amount of padding around the foreground in pixels",
            "default": 0
        },
        "force_background_detection": {
            "type": "boolean",
            "title": "Force Background Detection",
            "description": "Force background detection and removal even if alpha channel exists",
            "default": false
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether alpha channel values are retained in output",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaCropForegroundRequest",
    "description": "Request model for BRIA Crop Foreground."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Image Editing Generation


POST /api/v1/bria/image/editing-generation/erase

Bria Erase

Description

Erase objects from an image using mask guidance.

Args:

  • image: The image to erase objects from (URL or base64).
  • mask: The mask image indicating areas to erase (URL or base64).
  • mask_type: Type of mask - "manual" for user-drawn or "automatic" for algorithm-generated.
  • preserve_alpha: Controls whether alpha channel values are retained in output.
  • sync: If True, wait for results. If False, return status URL immediately.
  • visual_input_content_moderation: Enable content moderation on input visual.
  • visual_output_content_moderation: Enable content moderation on output visual.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "mask": null,
    "mask_type": "manual",
    "preserve_alpha": true,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to erase objects from. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "mask": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Mask",
            "description": "The mask image indicating areas to erase. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/mask.png",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "mask_type": {
            "$ref": "#/components/schemas/MaskType",
            "description": "Type of mask - manual for user-drawn or automatic for algorithm-generated",
            "default": "manual",
            "examples": [
                "manual",
                "automatic"
            ]
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether alpha channel values are retained in output",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image",
        "mask"
    ],
    "title": "BriaEraserRequest",
    "description": "Request model for BRIA Eraser."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/erase-foreground

Bria Erase Foreground

Description

Erase foreground from an image.

Args:

  • image: The image to erase foreground from (URL or base64).
  • preserve_alpha: Controls whether alpha channel values are retained in output.
  • sync: If True, wait for results. If False, return status URL immediately.
  • visual_input_content_moderation: Enable content moderation on input visual.
  • visual_output_content_moderation: Enable content moderation on output visual.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "preserve_alpha": true,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to erase foreground from. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether alpha channel values are retained in output",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaEraseForegroundRequest",
    "description": "Request model for BRIA Erase Foreground."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/inpaint

Bria Inpainting

Description

Generate objects by prompt in a specific masked region (gen_fill). Supports custom border_only mask generation for backward compatibility.

Args:

  • image: The image to apply generative fill to. Accepts URL or base64 encoded string.
  • Supported formats: JPEG, JPG, PNG, WEBP.
  • mask: The mask image indicating areas to fill. Accepts URL or base64 encoded string. Optional when mask_type is 'border_only'.
  • prompt: Text description for object generation in masked region.
  • mask_type: Type of mask - manual, automatic, or border_only for custom border processing.
  • sync: If True, wait for results. If False, return status URL immediately.
  • negative_prompt (optional): Text description of elements to avoid.
  • seed (optional): Seed for reproducible results.
  • preserve_alpha: Controls whether alpha channel values are retained in output.
  • prompt_content_moderation: Enable content moderation on prompts.
  • visual_input_content_moderation: Enable content moderation on input visual.
  • visual_output_content_moderation: Enable content moderation on output visual.
  • border_percentage (optional): Percentage of the border to inpaint when using border_only mode.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "mask": null,
    "prompt": "string",
    "mask_type": "manual",
    "sync": true,
    "negative_prompt": null,
    "seed": null,
    "preserve_alpha": true,
    "prompt_content_moderation": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true,
    "border_percentage": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to apply generative fill to. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "mask": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mask",
            "description": "The mask image indicating areas to fill. Accepts URL or base64 encoded string. Optional when mask_type is 'border_only'."
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description for the object generation.",
            "examples": [
                "A camera on the beach"
            ]
        },
        "mask_type": {
            "$ref": "#/components/schemas/MaskType",
            "description": "Type of mask - manual, automatic, or border_only for custom border processing",
            "default": "manual",
            "examples": [
                "manual",
                "automatic",
                "border_only"
            ]
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude from generation",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether alpha channel values are retained in output",
            "default": true
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "Enable content moderation on prompts",
            "default": true
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        },
        "border_percentage": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 0.3,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Border Percentage",
            "description": "Percentage of border to inpaint when using border_only mode"
        }
    },
    "type": "object",
    "required": [
        "image",
        "prompt"
    ],
    "title": "BriaInpaintingRequest",
    "description": "Request model for BRIA Generative Fill (gen_fill)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/expand-image

Bria Expand Image

Description

Expand an image to a specified canvas size with flexible positioning options.

This method supports two modes: 1. Canvas Size Mode: Provide canvas_size with position or padding percentages 2. Aspect Ratio Mode: Provide aspect_ratio with position or padding percentages

Args: - image (required): Input image (URL or base64).

Canvas/Aspect Ratio Parameters: - canvas_size (optional): Target canvas size as tuple (width, height). If provided, overrides aspect_ratio. - aspect_ratio (optional): Target aspect ratio for automatic canvas sizing.

Positioning Parameters (choose one): - position (optional): Predefined positioning ("upper_left", "upper_right", "bottom_left", "bottom_right", "right_center", "left_center", "upper_center", "bottom_center", "center_vertical", "center_horizontal"). - padding_left (optional): Percentage of left padding (0.0-1.0). - padding_right (optional): Percentage of right padding (0.0-1.0). - padding_top (optional): Percentage of top padding (0.0-1.0). - padding_bottom (optional): Percentage of bottom padding (0.0-1.0).

Generation Parameters: - prompt (optional): Text description for expanded area generation. - seed (optional): Seed for reproducible results. - negative_prompt (optional): Elements to exclude from generation.

V2 API Parameters: - preserve_alpha (bool, default=True): Preserve alpha channel in the output. - visual_input_content_moderation (bool, default=False): Content moderation for input visuals. - visual_output_content_moderation (bool, default=False): Content moderation for output visuals. - prompt_content_moderation (bool, default=False): Content moderation for prompts. - sync (bool, default=False): If True, wait for results.

Examples:

1. Canvas Size with Predefined Position:

{
  "image":
"https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-
logo-v2.svg/1920px-Wikipedia-logo-v2.svg.png",
  "canvas_size": [1024, 1024],
  "position": "center_vertical",
  "prompt": "beautiful sunset background",
  "sync": true,
  "preserve_alpha": true,
  "visual_input_content_moderation": false,
  "visual_output_content_moderation": false,
  "prompt_content_moderation": false
}

2. Aspect Ratio with Predefined Position:

{
  "image":
"https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-
logo-v2.svg/1920px-Wikipedia-logo-v2.svg.png",
  "aspect_ratio": "4:3",
  "position": "upper_center",
  "prompt": "sky and clouds above",
  "negative_prompt": "buildings, urban elements",
  "sync": true,
  "preserve_alpha": true,
  "visual_input_content_moderation": false,
  "visual_output_content_moderation": false,
  "prompt_content_moderation": false
}

3. Aspect Ratio with Custom Padding:

{
  "image":
"https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-
logo-v2.svg/1920px-Wikipedia-logo-v2.svg.png",
  "aspect_ratio": "9:16",
  "padding_left": 0.1,
  "padding_right": 0.1,
  "padding_top": 0.2,
  "padding_bottom": 0.05,
  "prompt": "green mountain landscape background",
  "sync": true,
  "preserve_alpha": true,
  "visual_input_content_moderation": false,
  "visual_output_content_moderation": false,
  "prompt_content_moderation": false
}

4. Canvas Size with Custom Padding:

{
  "image":
"https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-
logo-v2.svg/1920px-Wikipedia-logo-v2.svg.png",
  "canvas_size": [1600, 900],
  "padding_left": 0.15,
  "padding_right": 0.15,
  "padding_top": 0.4,
  "padding_bottom": 0.1,
  "prompt": "forest environment",
  "sync": true,
  "preserve_alpha": true,
  "visual_input_content_moderation": false,
  "visual_output_content_moderation": false,
  "prompt_content_moderation": false
}

Returns: Json response with success status and the result containing the expanded image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "canvas_size": null,
    "aspect_ratio": null,
    "position": null,
    "padding_left": null,
    "padding_right": null,
    "padding_top": null,
    "padding_bottom": null,
    "prompt": null,
    "seed": null,
    "negative_prompt": null,
    "preserve_alpha": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true,
    "prompt_content_moderation": true,
    "sync": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "Input image (URL or base64)",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "canvas_size": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Canvas Size",
            "description": "Canvas size (width, height)",
            "examples": [
                [
                    2048,
                    2048
                ],
                [
                    3072,
                    2048
                ]
            ]
        },
        "aspect_ratio": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "1:1",
                        "2:3",
                        "3:2",
                        "3:4",
                        "4:3",
                        "16:9",
                        "9:16",
                        "4:5",
                        "5:4"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Aspect Ratio",
            "description": "Target aspect ratio for automatic mode"
        },
        "position": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ManualPlacement"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image positioning for automatic mode",
            "examples": [
                "center_horizontal",
                "center_vertical"
            ]
        },
        "padding_left": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Left",
            "description": "Percentage of left padding to add"
        },
        "padding_right": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Right",
            "description": "Percentage of right padding to add"
        },
        "padding_top": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Top",
            "description": "Percentage of top padding to add"
        },
        "padding_bottom": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Bottom",
            "description": "Percentage of bottom padding to add"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 4
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Text description for expanded area generation",
            "default": "",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior",
                "Professional headshot of a business person"
            ]
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Preserve alpha channel in the output",
            "default": true
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Content moderation for input visuals",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Content moderation for output visuals",
            "default": false
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "Content moderation for prompts",
            "default": false
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaExpandImageRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/blur-background

Bria Blur Background

Description

Blur the background of an image . Automatically detects and blurs the background while keeping the foreground subjects in focus.

Args:

  • image: The image to blur background from. Accepts URL or base64 encoded string.
  • Supported formats: JPEG, JPG, PNG, WEBP.
  • scale: Scale for determining how blurry the background should be (1-5).
  • preserve_alpha: Controls whether alpha channel values are retained in output.
  • sync: If True, wait for results. If False, return status URL immediately.
  • visual_input_content_moderation: Enable content moderation on input visual.
  • visual_output_content_moderation: Enable content moderation on output visual.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "scale": 0,
    "preserve_alpha": true,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to blur background from. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "scale": {
            "type": "integer",
            "maximum": 5.0,
            "minimum": 1.0,
            "title": "Scale",
            "description": "Scale for determining how blurry the background should be (1-5)",
            "default": 5
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether alpha channel values are retained in output",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaBlurBackgroundRequest",
    "description": "Request model for BRIA Blur Background."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/generate-solid-background

Bria Generate Solid Background

Description

Creates a professional packshot of a product with consistent size and positioning. The output is a 2000x2000 px image, with the product size and location according to best practices.

Args:

  • image_url (optional): URL of product image. Max 12MB. Formats: jpeg, jpg, png, webp.
  • image_file (optional): Base64 encoded product image. Max 12MB. Formats: jpeg, jpg, png, webp.
  • background_color (optional): Hex color code for background. Use 'transparent' for transparent background.
  • force_rmbg: Forces background removal even if the original image already contains an alpha channel. Useful for refining existing foreground/background separation.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": null,
    "image_file": null,
    "background_color": "string",
    "force_rmbg": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        },
        "background_color": {
            "type": "string",
            "title": "Background Color",
            "description": "Hex color code for background or 'transparent'",
            "default": "#FFFFFF"
        },
        "force_rmbg": {
            "type": "boolean",
            "title": "Force Rmbg",
            "description": "Force background removal even if alpha channel exists",
            "default": false
        }
    },
    "type": "object",
    "title": "BriaGenerateSolidBackgroundRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/generate-background

Bria Generate Background

Description

Replace image background (replace_background). Places foreground subjects on new backgrounds generated based on a reference image or text prompt.

Args:

  • image: The image to replace background for. Accepts URL or base64 encoded string.
  • Supported formats: JPEG, JPG, PNG, WEBP.
  • ref_images (optional): Reference image(s) for background generation. Accepts URL or base64 encoded string.
  • enhance_ref_images: Process reference image for optimal results.
  • prompt (optional): Text description of desired background. Either ref_images or prompt required.
  • refine_prompt: Use LLM to optimize prompt for better results.
  • prompt_content_moderation: Enable content moderation on prompts.
  • negative_prompt (optional): Elements to exclude from generation (only when fast=false).
  • original_quality: Maintain original image size, otherwise scale to 1MP.
  • force_background_detection: Force background detection even if alpha channel exists.
  • sync: If True, wait for results. If False, return status URL immediately.
  • fast: Use fast generation mode for speed/quality balance.
  • visual_input_content_moderation: Enable content moderation on input visual.
  • visual_output_content_moderation: Enable content moderation on output visual.
  • seed (optional): Seed for reproducible results.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "ref_images": null,
    "enhance_ref_images": true,
    "prompt": null,
    "refine_prompt": true,
    "prompt_content_moderation": true,
    "negative_prompt": null,
    "original_quality": true,
    "force_background_detection": true,
    "sync": true,
    "fast": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true,
    "seed": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to replace background for. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/1787235/pexels-photo-1787235.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "ref_images": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Images",
            "description": "Reference image(s) for background generation. Accepts single image (URL or base64) or list of images.",
            "examples": [
                [
                    "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg",
                    "https://images.pexels.com/photos/32480719/pexels-photo-32480719.jpeg"
                ],
                [
                    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
                ]
            ]
        },
        "enhance_ref_images": {
            "type": "boolean",
            "title": "Enhance Ref Images",
            "description": "Process reference image for optimal results",
            "default": true
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 4
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Text description of desired background. Either ref_images or prompt required.",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior"
            ]
        },
        "refine_prompt": {
            "type": "boolean",
            "title": "Refine Prompt",
            "description": "Use LLM to optimize prompt for better results",
            "default": true
        },
        "prompt_content_moderation": {
            "type": "boolean",
            "title": "Prompt Content Moderation",
            "description": "Enable content moderation on prompts",
            "default": true
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Elements to exclude from generation (only when fast=false)",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "original_quality": {
            "type": "boolean",
            "title": "Original Quality",
            "description": "Maintain original image size, otherwise scale to 1MP",
            "default": false
        },
        "force_background_detection": {
            "type": "boolean",
            "title": "Force Background Detection",
            "description": "Force background detection even if alpha channel exists",
            "default": false
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "fast": {
            "type": "boolean",
            "title": "Fast",
            "description": "Use fast generation mode for speed/quality balance",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaGenerateBackgroundRequest",
    "description": "Request model for BRIA Generate Background (replace_background)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/generate-product-shadow

Bria Generate Product Shadow

Description

Creates a shadow effect for a product image with a transparent background. Note: Input image must have transparent background. Use product cutout endpoint first if needed.

Args:

  • shadow_type (optional): Type of shadow.
  • shadow_color (optional): Hex color code for shadow.
  • shadow_intensity (optional): Shadow intensity from 0-100.
  • shadow_offset (optional): [x,y] position of shadow relative to object in pixels.
  • shadow_blur (optional): Controls the blur level of the shadow's edges. Default for 'shadow_type'=regular is 15, while for 'shadow_type'=float is 20.
  • shadow_width (optional): Width of elliptical shadow in pixels for floating shadows. Could be positive or negative.
  • shadow_height: (optional): Height of elliptical shadow in pixels. Default is 70.
  • background_color (optional): Hex color code for background. Omit for transparent background.
  • force_rmbg: Forces background removal even if the original image already contains an alpha channel. Useful for refining existing foreground/background separation.
  • image_url (optional): URL of product image/cutout. Takes precedence over image_file. Max 12MB. Formats: jpeg, jpg, png, webp.
  • image_file (optional): Base64 encoded product image/cutout. Used if image_url not provided. Max 12MB. Formats: jpeg, jpg, png, webp.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": null,
    "image_file": null,
    "shadow_type": null,
    "shadow_color": null,
    "shadow_intensity": null,
    "shadow_offset": null,
    "shadow_blur": null,
    "shadow_width": null,
    "shadow_height": null,
    "background_color": null,
    "force_rmbg": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of input image",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded input image"
        },
        "shadow_type": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "regular",
                        "float"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Type",
            "description": "Type of shadow",
            "default": "regular"
        },
        "shadow_color": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Color",
            "description": "Hex color code for shadow",
            "default": "#000000"
        },
        "shadow_intensity": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 100.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Intensity",
            "description": "Shadow intensity",
            "default": 60
        },
        "shadow_offset": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Offset",
            "description": "Shadow position relative to object in pixels (x, y)",
            "default": [
                0,
                15
            ]
        },
        "shadow_blur": {
            "anyOf": [
                {
                    "type": "integer",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Blur",
            "description": "Blur level of shadow edges",
            "examples": [
                10,
                20,
                30
            ]
        },
        "shadow_width": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Width",
            "description": "Width of elliptical shadow in pixels",
            "examples": [
                100,
                200,
                300
            ]
        },
        "shadow_height": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shadow Height",
            "description": "Height of elliptical shadow in pixels",
            "examples": [
                100,
                200,
                300
            ]
        },
        "background_color": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background Color",
            "description": "Hex color code for background",
            "examples": [
                "#FF0000",
                "#00FF00",
                "#0000FF"
            ]
        },
        "force_rmbg": {
            "type": "boolean",
            "title": "Force Rmbg",
            "description": "Force background removal even if alpha channel exists",
            "default": false
        }
    },
    "type": "object",
    "title": "BriaGenerateProductShadowRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/generate-product-background-by-text

Bria Generate Product Background By Text

Description

Creates enriched product shots by placing them in various environments using textual descriptions. Additionally, you can change the image size of the final result as well as the positioning of the product in the image. Uses BRIA 2.3 ControlNet BG-Gen.

Args:

  • scene_description: Text description of desired scene/background (English only).
  • image_url (optional): URL of product shot to place in lifestyle scene. Max 12MB JPEG/PNG/WEBP.
  • image_file (optional): Base64 encoded product shot if no image_url. Max 12MB JPEG/PNG/WEBP.
  • sync: When True, responses are synchronous. Default False for asynchronous responses with immediate URLs.
  • fast: When True, uses fast generation mode balancing speed and quality.
  • optimize_description: When True, optimizes scene description using Meta Llama 3.
  • num_results: Number of lifestyle shots to generate. Maximum value is 4.
  • placement_type: Controls product positioning. Options are 'original', 'automatic', 'manual_placement', 'manual_padding', 'custom_coordinates', 'automatic_aspect_ratio'.
  • original_quality: For placement_type="original", preserves input image size.
  • shot_size: Desired output dimensions [width, height]. For optimal results, the total number of pixels should be around 1,000,000.
  • manual_placement_selection: Placement positions for manual_placement.
  • padding_values: Padding [left,right,top,bottom] for manual_padding.
  • force_rmbg: Forces background removal even if the original image already contains an alpha channel. Useful for refining existing foreground/background separation.
  • exclude_elements (optional): Elements to exclude from scene. English only, requires fast=False.
  • foreground_image_size (optional): Desired foreground image dimensions [width, height].
  • foreground_image_location (optional): Desired foreground image position [x,y].
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "scene_description": "string",
    "aspect_ratio": "1:1",
    "num_results": 0,
    "image_url": null,
    "image_file": null,
    "fast": true,
    "sync": true,
    "optimize_description": true,
    "original_quality": true,
    "force_rmbg": true,
    "placement_type": "original",
    "manual_placement_selection": "upper_left",
    "padding_values": [],
    "exclude_elements": null,
    "canvas_for_packshot_size": null,
    "foreground_image_size": null,
    "foreground_image_location": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "scene_description": {
            "type": "string",
            "minLength": 4,
            "title": "Scene Description",
            "description": "Text description of desired scene/background (English only).",
            "examples": [
                "A mountain landscape with a lake",
                "A cozy coffee shop interior"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        },
        "fast": {
            "type": "boolean",
            "title": "Fast",
            "description": "Use fast generation mode",
            "default": true
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "optimize_description": {
            "type": "boolean",
            "title": "Optimize Description",
            "description": "Optimize scene description using Meta Llama 3",
            "default": false
        },
        "original_quality": {
            "type": "boolean",
            "title": "Original Quality",
            "description": "Preserve input image size for 'original' placement",
            "default": false
        },
        "force_rmbg": {
            "type": "boolean",
            "title": "Force Rmbg",
            "description": "Force background removal even if alpha channel exists",
            "default": false
        },
        "placement_type": {
            "$ref": "#/components/schemas/PlacementType",
            "description": "Controls product positioning.",
            "default": "original",
            "examples": [
                "original",
                "automatic"
            ]
        },
        "manual_placement_selection": {
            "$ref": "#/components/schemas/ManualPlacement",
            "description": "Placement position for manual_placement",
            "default": "center_horizontal",
            "examples": [
                "upper_left",
                "bottom_left"
            ]
        },
        "padding_values": {
            "prefixItems": [
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                }
            ],
            "type": "array",
            "maxItems": 4,
            "minItems": 4,
            "title": "Padding Values",
            "description": "Padding [left,right,top,bottom] for manual_padding",
            "default": [
                0,
                0,
                0,
                0
            ]
        },
        "exclude_elements": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Exclude Elements",
            "description": "Elements to exclude from scene (English only)",
            "examples": [
                "text",
                "logo",
                "watermark",
                "background"
            ]
        },
        "canvas_for_packshot_size": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Canvas For Packshot Size",
            "description": "Desired canvas for packshot size",
            "examples": [
                [
                    2048,
                    2048
                ],
                [
                    3072,
                    2048
                ]
            ]
        },
        "foreground_image_size": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Foreground Image Size",
            "description": "Desired foreground image dimensions [width, height]",
            "examples": [
                [
                    2048,
                    2048
                ],
                [
                    3072,
                    2048
                ]
            ]
        },
        "foreground_image_location": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Foreground Image Location",
            "description": "Desired foreground image position [x,y]",
            "examples": [
                [
                    100,
                    100
                ],
                [
                    200,
                    200
                ]
            ]
        }
    },
    "type": "object",
    "required": [
        "scene_description"
    ],
    "title": "BriaGenerateProductBackgroundByTextRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/generate-product-background-by-image

Bria Generate Product Background By Image

Description

Creates enriched product shots by placing them in various environments using reference images. Additionally, you can change the image size of the final result as well as the positioning of the product in the image. Uses BRIA 2.3 ControlNet BG-Gen.

Args:

  • image_url (optional): URL of product shot to place in lifestyle scene. Max 12MB JPEG/PNG/WEBP.
  • image_file (optional): Base64 encoded product shot if no image_url. Max 12MB JPEG/PNG/WEBP.
  • ref_image_urls (optional): URLs of reference images to generate from.
  • ref_image_file (optional): Base64 encoded reference images if no ref_image_urls.
  • sync: When True, responses are synchronous.
  • enhance_ref_image: Process reference image for optimal results.
  • ref_image_influence: Weight of reference image in generation.
  • num_results: Number of lifestyle shots to generate. Maximum value is 4.
  • placement_type: Controls product positioning. Options are 'original', 'automatic', 'manual_placement', 'manual_padding', 'custom_coordinates', 'automatic_aspect_ratio'.
  • original_quality: For placement_type="original", preserves input image size.
  • shot_size: Desired output dimensions.
  • manual_placement_selection: Placement positions for manual_placement.
  • padding_values: Padding for manual_padding.
  • force_rmbg: Forces background removal even if the original image already has an alpha channel.
  • foreground_image_size (optional): Desired foreground image dimensions.
  • foreground_image_location (optional): Desired foreground image position.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "aspect_ratio": "1:1",
    "num_results": 0,
    "image_url": null,
    "image_file": null,
    "ref_image_urls": null,
    "ref_image_file": null,
    "sync": true,
    "enhance_ref_image": true,
    "ref_image_influence": 10.12,
    "original_quality": true,
    "force_rmbg": true,
    "placement_type": "original",
    "manual_placement_selection": "upper_left",
    "padding_values": [],
    "canvas_for_packshot_size": null,
    "foreground_image_size": null,
    "foreground_image_location": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2",
                "3:4",
                "4:3",
                "16:9",
                "9:16",
                "4:5",
                "5:4"
            ],
            "title": "Aspect Ratio",
            "description": "Image aspect ratio",
            "default": "1:1"
        },
        "num_results": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Num Results",
            "description": "Number of images to generate",
            "default": 1
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of reference image",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded reference image"
        },
        "ref_image_urls": {
            "anyOf": [
                {
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "format": "uri"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Image Urls",
            "description": "URLs of reference images to generate from",
            "examples": [
                [
                    "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
                ],
                [
                    "https://images.pexels.com/photos/33344545/pexels-photo-33344545.jpeg"
                ]
            ]
        },
        "ref_image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ref Image File",
            "description": "Base64 encoded reference images"
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": true
        },
        "enhance_ref_image": {
            "type": "boolean",
            "title": "Enhance Ref Image",
            "description": "Process reference image for optimal results",
            "default": true
        },
        "ref_image_influence": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Ref Image Influence",
            "description": "Weight of reference image in generation",
            "default": 1.0
        },
        "original_quality": {
            "type": "boolean",
            "title": "Original Quality",
            "description": "Preserve input image size for 'original' placement",
            "default": false
        },
        "force_rmbg": {
            "type": "boolean",
            "title": "Force Rmbg",
            "description": "Force background removal even if alpha channel exists",
            "default": false
        },
        "placement_type": {
            "$ref": "#/components/schemas/PlacementType",
            "description": "Controls product positioning.",
            "default": "original",
            "examples": [
                "original",
                "automatic"
            ]
        },
        "manual_placement_selection": {
            "$ref": "#/components/schemas/ManualPlacement",
            "description": "Placement position for manual_placement",
            "default": "center_horizontal",
            "examples": [
                "upper_left",
                "bottom_left"
            ]
        },
        "padding_values": {
            "prefixItems": [
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                },
                {
                    "type": "integer"
                }
            ],
            "type": "array",
            "maxItems": 4,
            "minItems": 4,
            "title": "Padding Values",
            "description": "Padding [left,right,top,bottom] for manual_padding",
            "default": [
                0,
                0,
                0,
                0
            ]
        },
        "canvas_for_packshot_size": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Canvas For Packshot Size",
            "description": "Desired canvas for packshot size",
            "examples": [
                [
                    2048,
                    2048
                ],
                [
                    3072,
                    2048
                ]
            ]
        },
        "foreground_image_size": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Foreground Image Size",
            "description": "Desired foreground image dimensions [width, height]",
            "examples": [
                [
                    2048,
                    2048
                ],
                [
                    3072,
                    2048
                ]
            ]
        },
        "foreground_image_location": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Foreground Image Location",
            "description": "Desired foreground image position [x,y]",
            "examples": [
                [
                    100,
                    100
                ],
                [
                    200,
                    200
                ]
            ]
        }
    },
    "type": "object",
    "title": "BriaGenerateProductBackgroundByImageRequest"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/enhance-image

Bria Enhance Image

Description

Enhance an image by improving visual quality, generating richer details, and sharper textures.

This endpoint supports upscaling to higher resolutions while enhancing image quality. Unlike the upscale endpoint, this regenerates the image to enhance visual richness.

Args: - image (required): Input image (URL or base64). Supported formats: JPEG, JPG, PNG, WEBP.

Enhancement Parameters: - steps_num (int, 10-50, default=20): Number of enhancement steps. Higher values improve quality but increase processing time. - resolution (str, default="1MP"): Target output resolution. Options: "1MP", "2MP", "4MP". - seed (int, optional): Seed for reproducible results.

Content Moderation: - visual_input_content_moderation (bool, default=False): Scan input image for inappropriate content. - visual_output_content_moderation (bool, default=False): Evaluate enhanced image output for safety.

Processing Options: - sync (bool, default=False): If True, wait for results. If False, return status URL immediately. - preserve_alpha (bool, default=True): Preserve alpha channel in output if present in input.

Returns: Json response with success status and the result containing the enhanced image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true,
    "seed": null,
    "steps_num": null,
    "resolution": "1MP",
    "preserve_alpha": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "Input image (URL or base64)",
            "examples": [
                "https://images.pexels.com/photos/31976103/pexels-photo-31976103.jpeg"
            ]
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Content moderation for input visuals",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Content moderation for output visuals",
            "default": false
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for reproducible results"
        },
        "steps_num": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 50.0,
                    "minimum": 10.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Steps Num",
            "description": "Number of enhancement steps. Higher values improve quality but increase processing time.",
            "default": 20
        },
        "resolution": {
            "$ref": "#/components/schemas/EnhanceResolution",
            "description": "Target output resolution of the enhanced image",
            "default": "1MP"
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Preserve alpha channel in the output",
            "default": true
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaEnhanceImageRequest",
    "description": "Request model for BRIA Enhance Image."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria/image/editing-generation/upscale-image

Bria Upscale Image

Description

Increases the resolution of an image by a factor of 2 or 4. The input image should be less than 2 megapixels. Maximum output resolution: 8192x8192 pixels.

Args:

  • image: The image to upscale. Accepts URL or base64 encoded string.
  • Supported formats: JPEG, JPG, PNG, WEBP.
  • preserve_alpha (bool): Controls whether alpha channel values are retained in output. When true, maintains original transparency. When false, output is fully opaque.
  • Default: true.
  • desired_increase (int): Factor by which to increase resolution (2 or 4). Default: 2.
  • sync (bool): If True, wait for results. If False, return status URL immediately.
  • Note: sync=true requires input ≤ 2 megapixels. Default: false.
  • visual_input_content_moderation (bool): Enable content moderation on input visual. Default: false.
  • visual_output_content_moderation (bool): Enable content moderation on output visual. Default: false.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URL.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": null,
    "preserve_alpha": true,
    "desired_increase": 0,
    "sync": true,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "string"
                }
            ],
            "title": "Image",
            "description": "The image to upscale. Accepts URL or base64 encoded string.",
            "examples": [
                "https://images.pexels.com/photos/733835/pexels-photo-733835.jpeg",
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
            ]
        },
        "preserve_alpha": {
            "type": "boolean",
            "title": "Preserve Alpha",
            "description": "Controls whether the alpha channel values from input are retained in output",
            "default": true
        },
        "desired_increase": {
            "type": "integer",
            "enum": [
                2,
                4
            ],
            "title": "Desired Increase",
            "description": "Factor by which to increase resolution (2 or 4)",
            "default": 2
        },
        "sync": {
            "type": "boolean",
            "title": "Sync",
            "description": "If True, wait for results. If False, return status URL immediately",
            "default": false
        },
        "visual_input_content_moderation": {
            "type": "boolean",
            "title": "Visual Input Content Moderation",
            "description": "Enable content moderation on input visual",
            "default": false
        },
        "visual_output_content_moderation": {
            "type": "boolean",
            "title": "Visual Output Content Moderation",
            "description": "Enable content moderation on output visual",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image"
    ],
    "title": "BriaUpscaleImageRequest",
    "description": "Request model for BRIA Increase Resolution."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/editing-generation/inpaint

Imagen Inpainting

Description

Perform inpainting operations (insert or remove content from an image).

Args: - operation_type : Type of inpainting operation ('insert' or 'remove') prefer using semantic class for inpaint remove for best results. - image_url : URL of the base image. - prompt (optional): Text prompt describing what to insert (required for 'insert' operation, null prompt for 'remove' operation). - mask_mode (optional): How to apply the mask (required for 'insert' operation): - MASK_MODE_FOREGROUND (FOREGROUND): Mask the foreground objects - MASK_MODE_BACKGROUND (BACKGROUND): Mask the background - MASK_MODE_SEMANTIC (SEMANTIC): Mask based on semantic classes - MASK_MODE_USER_PROVIDED (USER_PROVIDED): Use a user-provided mask - mask_dilation (optional, float): How much to dilate the mask (0.0-1.0, required for 'insert' operation). - removal_mode (optional): Method used for operation_type 'remove' can either be 'semantic' or 'prompt' ('semantic' requires 'segmentation_classes', default is 'prompt', the prompt is always set to empty). - segmentation_classes (optional, list[int]): Segmentation class IDs (required for semantic operations). The supported classes are available at https://cloud.google.com/vertex-ai/generative-ai/docs/model- reference/imagen-api-customization?hl=fr#segment-ids

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "operation_type": "insert",
    "image_url": "string",
    "prompt": null,
    "mask_mode": null,
    "mask_dilation": null,
    "removal_mode": null,
    "segmentation_classes": null,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "operation_type": {
            "type": "string",
            "enum": [
                "insert",
                "remove"
            ],
            "title": "Operation Type",
            "description": "Type of inpainting operation",
            "examples": [
                "insert",
                "remove"
            ]
        },
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the base image",
            "examples": [
                "https://images.pexels.com/photos/29023629/pexels-photo-29023629.jpeg"
            ]
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 3
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt",
            "description": "Text prompt for insert operations",
            "examples": [
                "Add a tree to the left side"
            ]
        },
        "mask_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/MaskReferenceMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Masking mode for insert operations",
            "examples": [
                "MASK_MODE_FOREGROUND",
                "MASK_MODE_BACKGROUND",
                "MASK_MODE_SEMANTIC",
                "MASK_MODE_USER_PROVIDED"
            ]
        },
        "mask_dilation": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mask Dilation",
            "description": "Mask dilation amount",
            "default": 0.1
        },
        "removal_mode": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/RemovalMode"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Removal mode for remove operations",
            "default": "prompt",
            "examples": [
                "semantic",
                "prompt"
            ]
        },
        "segmentation_classes": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Segmentation Classes",
            "description": "Segmentation class IDs for semantic operations",
            "examples": [
                [
                    1,
                    2,
                    3
                ]
            ]
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "required": [
        "operation_type",
        "image_url"
    ],
    "title": "ImagenInpaintingRequest",
    "description": "Request model for Imagen inpainting operations."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/editing-generation/expand-image

Imagen Expand Image

Description

Expand an image by adding content around the edges (outpainting) using Google Imagen.

This endpoint uses the advanced ImageScaler system for precise positioning and supports both predefined positions and custom padding percentages for flexible image placement.

Args: - image_url: URL of the source image to expand - prompt: Text description of content to add around the edges - target_width (optional): Target width for the expanded image (500-4000px, default: 2500) - target_height (optional): Target height for the expanded image (500-4000px, default: 2500) - number_of_images (optional): Number of expanded variations to generate (1-4, default: 1) - mask_dilation (optional): Mask dilation for smoother blending (0.0-1.0, default: 0.03)

Positioning Options (choose one approach):

Option 1 - Predefined Position: - position (optional): Predefined positioning. Options: - center_vertical: Equal padding on all sides - center_horizontal: Equal padding on all sides - left_center: More padding on the left side - right_center: More padding on the right side - upper_left: Padding on right and bottom - upper_center: Padding on bottom - upper_right: Padding on left and bottom - bottom_left: Padding on right and top - bottom_center: Padding on top - bottom_right: Padding on left and top

Option 2 - Custom Padding (all four values required if using): - padding_left (optional): Percentage of left padding (0.0-1.0) - padding_right (optional): Percentage of right padding (0.0-1.0) - padding_top (optional): Percentage of top padding (0.0-1.0) - padding_bottom (optional): Percentage of bottom padding (0.0-1.0)

Examples:

1. Center positioning (default):

{
  "image_url": "https://images.pexels.com/photos/29023629/pexels-
photo-29023629.jpeg",
  "prompt": "beautiful mountain landscape",
  "target_width": 2000,
  "target_height": 2000,
  "position": "center_vertical"
}

2. Bottom center positioning for sky expansion:

{
  "image_url": "https://images.pexels.com/photos/29023629/pexels-
photo-29023629.jpeg",
  "prompt": "dramatic cloudy sky",
  "position": "bottom_left"
}

3. Custom padding for precise control:

{
  "image_url": "https://images.pexels.com/photos/29023629/pexels-
photo-29023629.jpeg",
  "prompt": "forest environment",
  "padding_left": 0.1,
  "padding_right": 0.1,
  "padding_top": 0.3,
  "padding_bottom": 0.1
}

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": "string",
    "prompt": "string",
    "target_width": 0,
    "target_height": 0,
    "number_of_images": 0,
    "mask_dilation": 10.12,
    "position": null,
    "padding_left": null,
    "padding_right": null,
    "padding_top": null,
    "padding_bottom": null,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the source image",
            "examples": [
                "https://images.pexels.com/photos/627678/pexels-photo-627678.jpeg"
            ]
        },
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Description of content to add around edges",
            "examples": [
                "beautiful mountain landscape",
                "dramatic cloudy sky"
            ]
        },
        "target_width": {
            "type": "integer",
            "maximum": 4000.0,
            "minimum": 500.0,
            "title": "Target Width",
            "description": "Target width for expanded image",
            "default": 2500
        },
        "target_height": {
            "type": "integer",
            "maximum": 4000.0,
            "minimum": 500.0,
            "title": "Target Height",
            "description": "Target height for expanded image",
            "default": 2500
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of expanded variations",
            "default": 1
        },
        "mask_dilation": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Mask Dilation",
            "description": "Mask dilation for smoother blending",
            "default": 0.03
        },
        "position": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ManualPlacement"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Image positioning for automatic mode",
            "examples": [
                "center_horizontal",
                "center_vertical"
            ]
        },
        "padding_left": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Left",
            "description": "Percentage of left padding to add",
            "examples": [
                0.1,
                0.3
            ]
        },
        "padding_right": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Right",
            "description": "Percentage of right padding to add",
            "examples": [
                0.1,
                0.3
            ]
        },
        "padding_top": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Top",
            "description": "Percentage of top padding to add",
            "examples": [
                0.3,
                0.1
            ]
        },
        "padding_bottom": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 1.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Padding Bottom",
            "description": "Percentage of bottom padding to add",
            "examples": [
                0.1,
                0.3
            ]
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "required": [
        "image_url",
        "prompt"
    ],
    "title": "ImagenExpandImageRequest",
    "description": "Request model for Imagen image expansion (outpainting)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/editing-generation/generate-background

Imagen Generate Background

Description

Generate a new background for an image while preserving the foreground.

Args: - image_url : URL or path to the source image. - prompt : Description of the new background to generate. - seed (optional): Random seed for reproducibility. - number_of_images (optional): Number of variations to generate.

Returns: - Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": "string",
    "prompt": "string",
    "number_of_images": 0,
    "seed": null,
    "safety_filter_level": "BLOCK_LOW_AND_ABOVE",
    "person_generation": "DONT_ALLOW"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the source image",
            "examples": [
                "https://images.pexels.com/photos/627678/pexels-photo-627678.jpeg"
            ]
        },
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Description of the desired background",
            "examples": [
                "Beautiful sunset over icy mountains",
                "Dramatic cloudy sky over beach"
            ]
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of background variations",
            "default": 1
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Random seed for reproducible results (auto-generated if not provided)"
        },
        "safety_filter_level": {
            "$ref": "#/components/schemas/SafetyFilterLevel",
            "description": "Content safety filtering level",
            "default": "BLOCK_MEDIUM_AND_ABOVE"
        },
        "person_generation": {
            "$ref": "#/components/schemas/google__genai__types__PersonGeneration",
            "description": "Person generation policy",
            "default": "ALLOW_ALL"
        }
    },
    "type": "object",
    "required": [
        "image_url",
        "prompt"
    ],
    "title": "ImagenBackgroundRequest",
    "description": "Request model for Imagen background generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/google-vision/image/editing-generation/edit-image

Gemini Edit Image

Description

Edit images using text prompts with Gemini 2.0 Flash.

Supports both single-step editing and multi-turn sequential editing for complex transformations.

Args: - image_url: URL of the source image to edit. Supports HTTP/HTTPS URLs and GCS URIs (gs://). - edit_prompt (optional): Text description of desired edits for single- step editing. - edit_steps (optional): Comma-separated list of edit prompts for multi- turn sequential editing. - safety_method (optional): Safety method for the image generation. Options: - PROBABILITY : Use probability-based safety - SEVERITY : Use severity-based safety - HARM_BLOCK_METHOD_UNSPECIFIED : Use harm block method - safety_category (optional): Safety category for the image generation. Options: - HARM_CATEGORY_UNSPECIFIED : Unspecified safety category - HARM_CATEGORY_HATE_SPEECH: Hate speech category - HARM_CATEGORY_DANGEROUS_CONTENT: Dangerous content category - HARM_CATEGORY_HARASSMENT: Harassment category - HARM_CATEGORY_SEXUALLY_EXPLICIT: Sexually explicit content category - HARM_CATEGORY_CIVIC_INTEGRITY: Civic integrity category - safety_threshold (optional): Safety threshold for the image generation. Options: - HARM_BLOCK_THRESHOLD_UNSPECIFIED : Unspecified safety threshold - BLOCK_LOW_AND_ABOVE (BLOCK_LOW_AND_ABOVE): Low and above threshold - BLOCK_MEDIUM_AND_ABOVE (BLOCK_MEDIUM_AND_ABOVE): Medium and above threshold - BLOCK_ONLY_HIGH (BLOCK_ONLY_HIGH): Only high threshold - BLOCK_NONE (BLOCK_NONE): No threshold - OFF (OFF): Off threshold

Note: Provide either edit_prompt OR edit_steps, not both.

Examples:

1. Single edit:

{
  "image_url":
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Mona_Lisa-
restored.jpg/800px-Mona_Lisa-restored.jpg",
  "edit_prompt": "Add sunglasses and change the background to a beach scene"
}

2. Multi-turn editing:

{
  "image_url": "https://images.pexels.com/photos/36478/amazing-beautiful-
beauty-blue.jpg",
  "edit_steps": "Add dramatic clouds to the sky, Increase saturation, Add a
rainbow"
}

3. Using GCS URI:

{
  "image_url": "gs://cloud-samples-data/generative-ai/image/mirror.png",
  "edit_prompt": "Convert to black and white and add vintage film grain
effect"
}

Returns: - Json response with success status and the result containing edited image URLs. For multi-turn editing, returns URLs for each step in the editing sequence.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image_url": "string",
    "edit_prompt": null,
    "edit_steps": null,
    "safety_method": null,
    "safety_category": null,
    "safety_threshold": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the source image to edit",
            "examples": [
                "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Mona_Lisa-restored.jpg/800px-Mona_Lisa_restored.jpg",
                "https://images.pexels.com/photos/36478/amazing-beautiful-beauty-blue.jpg"
            ]
        },
        "edit_prompt": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 3
                },
                {
                    "type": "null"
                }
            ],
            "title": "Edit Prompt",
            "description": "Text description of desired edits (for single edit)",
            "examples": [
                "Add sunglasses and change the background to a beach scene",
                "Convert to black and white and add vintage film grain effect"
            ]
        },
        "edit_steps": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Edit Steps",
            "description": "Comma-separated list of edit prompts to apply sequentially (for multi-turn editing)",
            "examples": [
                "Add dramatic clouds to the sky, Increase saturation, Add a rainbow"
            ]
        },
        "safety_method": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockMethod"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety filtering method",
            "examples": [
                "PROBABILITY",
                "SEVERITY"
            ]
        },
        "safety_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmCategory"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety category to filter",
            "examples": [
                "HARM_CATEGORY_UNSPECIFIED",
                "HARM_CATEGORY_HATE_SPEECH",
                "HARM_CATEGORY_DANGEROUS_CONTENT",
                "HARM_CATEGORY_HARASSMENT",
                "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                "HARM_CATEGORY_CIVIC_INTEGRITY"
            ]
        },
        "safety_threshold": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/HarmBlockThreshold"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Safety threshold level",
            "examples": [
                "BLOCK_LOW_AND_ABOVE",
                "BLOCK_MEDIUM_AND_ABOVE",
                "BLOCK_ONLY_HIGH",
                "BLOCK_NONE"
            ]
        }
    },
    "type": "object",
    "required": [
        "image_url"
    ],
    "title": "GeminiEditImageRequest",
    "description": "Request model for Gemini image editing."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/openai/image/editing-generation/edit-image

Gpt Generate Edit

Description

Generate an edit for an image using GPT Image API.

Args:

  • request: GPT image editing request containing:
  • prompt: The prompt for the image edit.
  • image_url: URL of the image to be edited.
  • number_of_images: Number of edited images to generate (1-10).
  • size: Output image size.
  • access_token: API key for authentication.
  • gpt_image_client: GPTImageAPI client instance.

Returns: Json response with success status and the result containing the edited image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "image_url": "string",
    "number_of_images": 0,
    "aspect_ratio": "1:1"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description for the image edit",
            "examples": [
                "Add warm sunset tones and enhance contrast"
            ]
        },
        "image_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Image Url",
            "description": "URL of the image to be edited",
            "examples": [
                "https://images.pexels.com/photos/29023629/pexels-photo-29023629.jpeg"
            ]
        },
        "number_of_images": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Number Of Images",
            "description": "Number of edited images to generate",
            "default": 1
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1:1",
                "2:3",
                "3:2"
            ],
            "title": "Aspect Ratio",
            "description": "Desired aspect ratio",
            "default": "1:1"
        }
    },
    "type": "object",
    "required": [
        "prompt",
        "image_url"
    ],
    "title": "GPTEditImageRequest",
    "description": "Request model for GPT image editing."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/openai/image/editing-generation/inpaint

Gpt Image Inpainting

Description

Edit an image using a mask with GPT Image API. You can provide a mask to indicate where the image should be edited. The transparent areas of the mask will be replaced, while the filled areas will be left unchanged.

This endpoint supports two inpainting modes: 1. Manual Mask Mode: Use your own mask image to specify exact areas to edit 2. Border-Only Mode: Automatically generate a border mask for edge inpainting

Args:

  • request: GPT inpainting request containing:
  • prompt: Text description of the desired edited image
  • image_url: URL or file path of the source image (either this or image_file required)
  • image_file: Base64 encoded source image (either this or image_url required)
  • mask_url: URL or file path of the mask image (required unless inpaint_border_only is True)
  • mask_file: Base64 encoded mask image (required unless inpaint_border_only is True)
  • inpaint_border_only: Whether to inpaint only the border areas (default: False)
  • border_percentage: Percentage of border to inpaint when using border- only mode
  • access_token: API key for authentication
  • gpt_image_client: GPTImageAPI client instance.
  • Examples:
  • 1. Manual Mask with URLs: ```json {
  • "prompt": "beautiful flowers in the garden",
  • "image_url": "https://images.pexels.com/photos/29023629/pexels- photo-29023629.jpeg",
  • "mask_url": "https://example.com/mask.png",
  • "inpaint_border_only": false } ```
  • 2. Border-Only Inpainting: ```json {
  • "prompt": "expand with forest environment",
  • "image_url": "https://images.pexels.com/photos/29023629/pexels- photo-29023629.jpeg",
  • "inpaint_border_only": true,
  • "border_percentage": 0.2 } ```

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "image_url": null,
    "image_file": null,
    "mask_url": null,
    "mask_file": null,
    "inpaint_border_only": true,
    "border_percentage": 10.12
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "minLength": 3,
            "title": "Prompt",
            "description": "Text description of the desired edit",
            "examples": [
                "beautiful flowers in the garden",
                "expand with forest environment"
            ]
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of input image",
            "examples": [
                "https://images.pexels.com/photos/29023629/pexels-photo-29023629.jpeg"
            ]
        },
        "image_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image File",
            "description": "Base64 encoded input image",
            "examples": [
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
            ]
        },
        "mask_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mask Url",
            "description": "URL of mask image",
            "examples": [
                "https://example.com/mask.png"
            ]
        },
        "mask_file": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Mask File",
            "description": "Base64 encoded mask image",
            "examples": [
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
            ]
        },
        "inpaint_border_only": {
            "type": "boolean",
            "title": "Inpaint Border Only",
            "description": "Whether to inpaint only border areas",
            "default": false
        },
        "border_percentage": {
            "type": "number",
            "maximum": 0.5,
            "minimum": 0.01,
            "title": "Border Percentage",
            "description": "Percentage of border to inpaint when using border-only mode",
            "default": 0.05,
            "examples": [
                0.05,
                0.2,
                0.3
            ]
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "GPTInpaintingRequest",
    "description": "Request model for GPT image inpainting."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/firefly/image/editing-generation/generate-product-background

Generate Object Composite Async

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "image": {
        "source": {
            "upload_id": null,
            "url": null
        }
    },
    "mask": null,
    "content_class": "photo",
    "placement": {
        "alignment": {
            "horizontal": "center",
            "vertical": "center"
        },
        "insert": {
            "center": 0,
            "top": 0,
            "bottom": 0,
            "left": 0,
            "right": 0
        }
    },
    "seeds": null,
    "size": {
        "height": 0,
        "width": 0
    },
    "style": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "title": "Prompt"
        },
        "image": {
            "$ref": "#/components/schemas/ImageReferenceModel"
        },
        "mask": {
            "$ref": "#/components/schemas/ImageReferenceModel"
        },
        "content_class": {
            "$ref": "#/components/schemas/ContentClass",
            "default": "photo"
        },
        "placement": {
            "$ref": "#/components/schemas/PlacementModel",
            "default": {
                "alignment": {
                    "horizontal": "center",
                    "vertical": "center"
                },
                "insert": {
                    "bottom": 0,
                    "center": 0,
                    "left": 0,
                    "right": 0,
                    "top": 0
                }
            }
        },
        "seeds": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seeds"
        },
        "size": {
            "$ref": "#/components/schemas/SizeImagesAsyncModel",
            "default": {
                "height": 2048,
                "width": 2048
            }
        },
        "style": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/StyleModel"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "prompt",
        "image",
        "mask"
    ],
    "title": "Body_generate_object_composite_async_api_v1_firefly_image_editing_generation_generate_product_background_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/firefly/image/editing-generation/expand-image

Expand Image Async

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": {
        "source": {
            "upload_id": null,
            "url": null
        }
    },
    "mask": {
        "invert": true,
        "source": null
    },
    "placement": {
        "alignment": {
            "horizontal": "center",
            "vertical": "center"
        },
        "insert": {
            "center": 0,
            "top": 0,
            "bottom": 0,
            "left": 0,
            "right": 0
        }
    },
    "prompt": null,
    "seeds": null,
    "size": {
        "height": 0,
        "width": 0
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "$ref": "#/components/schemas/ImageReferenceModel"
        },
        "mask": {
            "$ref": "#/components/schemas/MaskModel"
        },
        "placement": {
            "$ref": "#/components/schemas/PlacementModel",
            "default": {
                "alignment": {
                    "horizontal": "center",
                    "vertical": "center"
                },
                "insert": {
                    "bottom": 0,
                    "center": 0,
                    "left": 0,
                    "right": 0,
                    "top": 0
                }
            }
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt"
        },
        "seeds": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seeds"
        },
        "size": {
            "$ref": "#/components/schemas/SizeImagesAsyncModel",
            "default": {
                "height": 2048,
                "width": 2048
            }
        }
    },
    "type": "object",
    "required": [
        "image",
        "mask"
    ],
    "title": "Body_expand_image_async_api_v1_firefly_image_editing_generation_expand_image_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/firefly/image/editing-generation/inpaint

Fill Image Async

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "image": {
        "source": {
            "upload_id": null,
            "url": null
        }
    },
    "mask": {
        "invert": true,
        "source": null
    },
    "negative_prompt": null,
    "prompt": null,
    "prompt_biasing_locale_code": null,
    "seeds": null,
    "size": {
        "height": 0,
        "width": 0
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image": {
            "$ref": "#/components/schemas/ImageReferenceModel"
        },
        "mask": {
            "$ref": "#/components/schemas/MaskModel"
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt"
        },
        "prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt"
        },
        "prompt_biasing_locale_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt Biasing Locale Code"
        },
        "seeds": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seeds"
        },
        "size": {
            "$ref": "#/components/schemas/SizeImagesAsyncModel",
            "default": {
                "height": 2048,
                "width": 2048
            }
        }
    },
    "type": "object",
    "required": [
        "image",
        "mask"
    ],
    "title": "Body_fill_image_async_api_v1_firefly_image_editing_generation_inpaint_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Video Editing


POST /api/v1/bria/video/editing/remove-background

Bria Video Remove Background

Description

Remove background from a video.

Args:

  • video_url: URL of input video.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response with success status and the result containing the generated image URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "video": "string",
    "background_color": null,
    "output_container_and_codec": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "video": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Video",
            "description": "Publicly accessible URL of the input video. Input resolution supported up to 16000x16000 (16K)",
            "examples": [
                "https://example.com/video.mp4"
            ]
        },
        "background_color": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "Transparent",
                        "Black",
                        "White",
                        "Gray",
                        "Red",
                        "Green",
                        "Blue",
                        "Yellow",
                        "Cyan",
                        "Magenta",
                        "Orange"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background Color",
            "description": "Predefined string only - hex values are not supported",
            "default": "Transparent"
        },
        "output_container_and_codec": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "mp4_h264",
                        "mp4_h265",
                        "webm_vp9",
                        "mov_h265",
                        "mov_proresks",
                        "mkv_h264",
                        "mkv_h265",
                        "mkv_vp9",
                        "mkv_raw",
                        "gif",
                        "avi_h264"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Output Container And Codec",
            "description": "Output container and codec preset",
            "default": "webm_vp9"
        }
    },
    "type": "object",
    "required": [
        "video"
    ],
    "title": "BriaVideoRemoveBackgroundRequest",
    "description": "Request model for BRIA Video Background Removal."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Status


GET /api/v1/bria/status/{task_id}

Bria Get Status

Description

Get the status of an asynchronous Bria request.

Args:

  • task_id: Unique identifier of the request.
  • access_token: API key for authentication.
  • bria_client: BriaAPI client.

Returns: Json response containing: - status: Current status (IN_PROGRESS, COMPLETED, ERROR, UNKNOWN) - task_id: The request identifier - result (when COMPLETED): Contains image_url and optionally seed, prompt, refined_prompt - error (when ERROR): Contains message and optional error code

HTTP Status Codes: - 200: Normal operation (check status field for actual job status) - 404: Request ID not found or expired - 5XX: Status service internal error

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
task_id path string No

Response 200 OK

{
    "status": "IN_PROGRESS",
    "request_id": "string",
    "result": null,
    "error": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "IN_PROGRESS",
                "COMPLETED",
                "ERROR",
                "UNKNOWN"
            ],
            "title": "Status",
            "description": "Current status of the request"
        },
        "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "Unique identifier of the request"
        },
        "result": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Result",
            "description": "Result object when status is COMPLETED (contains image_url, seed, prompt, refined_prompt)"
        },
        "error": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error",
            "description": "Error object when status is ERROR (contains message and optional code)"
        }
    },
    "type": "object",
    "required": [
        "status",
        "request_id"
    ],
    "title": "BriaStatusResponse",
    "description": "Response model for Bria status endpoint."
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/firefly/status/{task_id}

Get Result

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
task_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/firefly/cancel/{task_id}

Cancel Job

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
task_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/runway/status/{task_id}

Fetch Task Details

Description

Fetch the details of a task by its task ID. This endpoint retrieves the current status and metadata of a previously submitted task (e.g., image or video generation) using its unique task ID.

Args:

  • task_id: The unique identifier of the RunwayML task.

Returns: Json response with success status and the result containing the generated image URLs and metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
task_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/runway/cancel/{task_id}

Delete Task

Description

Delete a task by its task ID. This endpoint allows you to cancel or delete a previously submitted task (such as image or video generation) using its unique task ID.

Args:

  • task_id: The unique identifier of the RunwayML task to be deleted.

Returns: Json response with status message or any error details if the task could not be deleted.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
task_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

LoRA Project Management


GET /api/v1/bria-lora/projects

Get All Projects

Description

Get all LoRA projects. Returns: - JSONResponse: List of all projects

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

POST /api/v1/bria-lora/projects

Create Project

Description

Create a new LoRA project. Args:

  • project_name: Name of the project
  • ip_medium: Medium of the IP (e.g., photography, illustration)
  • ip_type: Type of the IP (e.g., multi_object_set, object_variants, defined_character, style)
  • project_description: Description of the project
  • ip_name: Name of the IP (required for defined_character)
  • ip_description: Description of the IP

Returns: - JSONResponse: Response containing the created project details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "project_name": "string",
    "ip_medium": "photography",
    "ip_type": "multi_object_set",
    "project_description": null,
    "ip_name": null,
    "ip_description": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "project_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Project Name",
            "description": "Name of the project"
        },
        "ip_medium": {
            "type": "string",
            "enum": [
                "photography",
                "illustration"
            ],
            "title": "Ip Medium",
            "description": "Medium of the IP"
        },
        "ip_type": {
            "type": "string",
            "enum": [
                "multi_object_set",
                "object_variants",
                "defined_character",
                "style"
            ],
            "title": "Ip Type",
            "description": "Type of the IP"
        },
        "project_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Project Description",
            "description": "Description of the project"
        },
        "ip_name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ip Name",
            "description": "Name of the IP (required for defined_character)"
        },
        "ip_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ip Description",
            "description": "Description of the IP"
        }
    },
    "type": "object",
    "required": [
        "project_name",
        "ip_medium",
        "ip_type"
    ],
    "title": "BriaLoraCreateProjectRequest",
    "description": "Request model for creating a Bria Lora project."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/projects/{project_id}

Get Project

Description

Get a specific LoRA project by ID. Args:

  • project_id: ID of the project to retrieve

Returns: - JSONResponse: Project details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
project_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/bria-lora/projects/{project_id}

Update Project

Description

Update a LoRA project. Args:

  • project_id: ID of the project to update
  • project_name: New name of the project
  • project_description: New description of the project
  • ip_name: New name of the IP
  • ip_description: New description of the IP

Returns: - JSONResponse: Response containing the updated project details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
project_id path string No

Request body

{
    "project_id": 0,
    "project_name": null,
    "project_description": null,
    "ip_name": null,
    "ip_description": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Project Id",
            "description": "ID of the project to update"
        },
        "project_name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                },
                {
                    "type": "null"
                }
            ],
            "title": "Project Name",
            "description": "New project name"
        },
        "project_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Project Description",
            "description": "New project description"
        },
        "ip_name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ip Name",
            "description": "New IP name"
        },
        "ip_description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Ip Description",
            "description": "New IP description"
        }
    },
    "type": "object",
    "required": [
        "project_id"
    ],
    "title": "BriaLoraUpdateProjectRequest",
    "description": "Request model for updating a Bria Lora project."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/bria-lora/projects/{project_id}

Delete Project

Description

Delete a LoRA project. Args:

  • project_id: ID of the project to delete

Returns: - JSONResponse: Confirmation of deletion

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
project_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/datasets

Get All Datasets

Description

Get all datasets. Returns: - JSONResponse: List of all datasets

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

POST /api/v1/bria-lora/datasets

Create Dataset

Description

Create a new dataset in a LoRA project. Args:

  • project_id: ID of the project to which the dataset belongs
  • name: Name of the dataset

Returns: - JSONResponse: Response containing the created dataset details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "project_id": 0,
    "name": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Project Id",
            "description": "ID of the project"
        },
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Name of the dataset"
        }
    },
    "type": "object",
    "required": [
        "project_id",
        "name"
    ],
    "title": "BriaLoraCreateDatasetRequest",
    "description": "Request model for creating a dataset."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/datasets/{dataset_id}

Get Dataset

Description

Get a specific dataset by ID. Args:

  • dataset_id: ID of the dataset to retrieve

Returns: - JSONResponse: Dataset details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/bria-lora/datasets/{dataset_id}

Update Dataset

Description

Update a dataset. Args:

  • dataset_id: ID of the dataset to update
  • name: New name of the dataset
  • caption_prefix: Optional prefix for captions
  • status: Status of the dataset (draft or completed)

Returns: - JSONResponse: Response containing the updated dataset details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Request body

{
    "dataset_id": 0,
    "name": null,
    "caption_prefix": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "dataset_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Dataset Id",
            "description": "ID of the dataset to update"
        },
        "name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                },
                {
                    "type": "null"
                }
            ],
            "title": "Name",
            "description": "New dataset name"
        },
        "caption_prefix": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255
                },
                {
                    "type": "null"
                }
            ],
            "title": "Caption Prefix",
            "description": "New caption prefix"
        },
        "status": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "draft",
                        "completed"
                    ]
                },
                {
                    "type": "null"
                }
            ],
            "title": "Status",
            "description": "New status"
        }
    },
    "type": "object",
    "required": [
        "dataset_id"
    ],
    "title": "BriaLoraUpdateDatasetRequest",
    "description": "Request model for updating a dataset."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/bria-lora/datasets/{dataset_id}

Delete Dataset

Description

Delete a dataset. Args:

  • dataset_id: ID of the dataset to delete

Returns: - JSONResponse: Confirmation of deletion

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/projects/{project_id}/datasets

Get Project Datasets

Description

Get all datasets for a specific project. Args:

  • project_id: ID of the project
  • include_models: Include full model objects (default: False)
  • include_models_ids: Include model IDs (default: False)

Returns: - JSONResponse: List of datasets for the project

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
include_models query boolean False No
include_models_ids query boolean False No
project_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria-lora/datasets/{dataset_id}/images

Upload Image

Description

Upload an image to a dataset in a LoRA project. The image can be uploaded via file path or URL. Args:

  • dataset_id: ID of the dataset to upload the image to
  • file_path: Path to the image file (optional)
  • image_url: URL of the image (optional)
  • image_name: Name of the image (optional)

Returns: - JSONResponse: Response containing the result of the upload operation

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Request body

{
    "dataset_id": 0,
    "file_path": null,
    "image_url": null,
    "image_name": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "dataset_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Dataset Id",
            "description": "ID of the dataset to upload the image to"
        },
        "file_path": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Path",
            "description": "Path to the image file"
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Url",
            "description": "URL of the image"
        },
        "image_name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255
                },
                {
                    "type": "null"
                }
            ],
            "title": "Image Name",
            "description": "Name of the image"
        }
    },
    "type": "object",
    "required": [
        "dataset_id"
    ],
    "title": "BriaLoraUploadImageRequest",
    "description": "Request model for uploading an image to a dataset."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/datasets/{dataset_id}/images

Get Dataset Images

Description

Get all images in a dataset. Args:

  • dataset_id: ID of the dataset

Returns: - JSONResponse: List of images in the dataset

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/datasets/{dataset_id}/images/{image_id}

Get Dataset Image

Description

Get a specific image from a dataset. Args:

  • dataset_id: ID of the dataset
  • image_id: ID of the image

Returns: - JSONResponse: Image details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No
image_id path integer No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/bria-lora/datasets/{dataset_id}/images/{image_id}

Delete Image

Description

Delete an image from a dataset. Args:

  • dataset_id: ID of the dataset
  • image_id: ID of the image to delete

Returns: - JSONResponse: Confirmation of deletion

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No
image_id path integer No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/bria-lora/datasets/{dataset_id}/images/{image_id}/caption

Update Image Caption

Description

Update the caption of an image in a dataset. Optionally regenerate the caption using the model. Args:

  • dataset_id: ID of the dataset containing the image
  • image_id: ID of the image to update
  • caption: New manual caption (optional)
  • regenerate_caption: Whether to regenerate the caption automatically (default: False)

Returns: - JSONResponse: Response containing the result of the caption update operation

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No
image_id path integer No

Request body

{
    "image_id": 0,
    "dataset_id": 0,
    "caption": null,
    "regenerate_caption": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "image_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Image Id",
            "description": "ID of the image to update"
        },
        "dataset_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Dataset Id",
            "description": "ID of the dataset containing the image"
        },
        "caption": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Caption",
            "description": "New manual caption"
        },
        "regenerate_caption": {
            "type": "boolean",
            "title": "Regenerate Caption",
            "description": "Whether to regenerate caption automatically",
            "default": false
        }
    },
    "type": "object",
    "required": [
        "image_id",
        "dataset_id"
    ],
    "title": "BriaLoraUpdateImageCaptionRequest",
    "description": "Request model for updating image caption."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/bria-lora/datasets/{dataset_id}/images/captions

Regenerate All Captions

Description

Regenerate captions for all images in a dataset. Args:

  • dataset_id: ID of the dataset

Returns: - JSONResponse: Result of regeneration

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
dataset_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/models

Get All Models

Description

Get all models. Returns: - JSONResponse: List of all models

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

POST /api/v1/bria-lora/models

Create Model

Description

Create a new model in a LoRA project. Args:

  • name: Name of the model
  • dataset_id: ID of the dataset to use for training
  • training_version: Training version (light or max)
  • description: Description of the model

Returns: - JSONResponse: Response containing the created model details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "name": "string",
    "dataset_id": 0,
    "training_version": "light",
    "description": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Model name"
        },
        "dataset_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Dataset Id",
            "description": "Dataset ID to use for training"
        },
        "training_version": {
            "type": "string",
            "enum": [
                "light",
                "max"
            ],
            "title": "Training Version",
            "description": "Training version"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description",
            "description": "Model description"
        }
    },
    "type": "object",
    "required": [
        "name",
        "dataset_id",
        "training_version"
    ],
    "title": "BriaLoraCreateModelRequest",
    "description": "Request model for creating a model."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/models/{model_id}

Get Model

Description

Get a specific model by ID. Args:

  • model_id: ID of the model to retrieve

Returns: - JSONResponse: Model details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
model_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/bria-lora/models/{model_id}

Update Model

Description

Update a model. Args:

  • model_id: ID of the model to update
  • name: New name of the model
  • description: New description of the model

Returns: - JSONResponse: Response containing the updated model details

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
model_id path string No

Request body

{
    "model_id": 0,
    "name": null,
    "description": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "model_id": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Model Id",
            "description": "ID of the model to update"
        },
        "name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                },
                {
                    "type": "null"
                }
            ],
            "title": "Name",
            "description": "New model name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 1000
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description",
            "description": "New model description"
        }
    },
    "type": "object",
    "required": [
        "model_id"
    ],
    "title": "BriaLoraUpdateModelRequest",
    "description": "Request model for updating a model."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/bria-lora/models/{model_id}

Delete Model

Description

Delete a model. Args:

  • model_id: ID of the model to delete

Returns: - JSONResponse: Confirmation of deletion

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
model_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/bria-lora/projects/{project_id}/models

Get Project Models

Description

Get all models for a specific project. Args:

  • project_id: ID of the project

Returns: - JSONResponse: List of models for the project

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
project_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

LoRA Training


POST /api/v1/bria-lora/models/{model_id}/training/start

Start Training

Description

Start training a model. Args:

  • model_id: ID of the model to start training

Returns: - JSONResponse: Training status

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
model_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/bria-lora/models/{model_id}/training/stop

Stop Training

Description

Stop training a model. Args:

  • model_id: ID of the model to stop training

Returns: - JSONResponse: Training status

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
model_id path string No

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Video Generation


POST /api/v1/google-vision/video/generation/generate-video

Veo Generate Video

Description

Generate videos using Vertex AI VEO.

Args:

  • prompt: Text description of the desired video
  • start_image_url: Optional starting image URL for video generation
  • number_of_videos: Number of videos to generate (1-4)
  • aspect_ratio: Video aspect ratio. Options: "9:16" (PORTRAIT_9_16), "16:9" (LANDSCAPE_16_9)
  • duration: Video duration in seconds. Options: 5 (SHORT), 10 (MEDIUM)
  • person_generation: Person generation control. Options: "allow" (ALL), "allow_adult" (ADULT), "dont_allow" (NONE)
  • enhance_prompt: Whether to enhance the input prompt using LLM
  • prefix: Prefix for generated video files (default: "veo2_generations")
  • access_token: Special VEO authentication token for video generation
  • veo_client: VEO API client instance

Returns: Json response with success status and the result containing the generated video URLs.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "model": "veo-2.0-generate-001",
    "prompt": "string",
    "aspect_ratio": "9:16",
    "duration": 0,
    "start_image_url": null,
    "person_generation": null,
    "enhance_prompt": null,
    "negative_prompt": null,
    "seed": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "model": {
            "$ref": "#/components/schemas/VeoModel",
            "description": "Model to use for video generation",
            "default": "veo-2.0-generate-001"
        },
        "prompt": {
            "type": "string",
            "minLength": 4,
            "title": "Prompt",
            "description": "Text description of the desired video",
            "examples": [
                "A cinematic timelapse of a city skyline at dusk",
                "A serene ocean wave crashing in slow motion"
            ]
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "9:16",
                "16:9"
            ],
            "title": "Aspect Ratio",
            "description": "Video aspect ratio",
            "default": "16:9"
        },
        "duration": {
            "$ref": "#/components/schemas/VeoDuration",
            "description": "Video duration in seconds",
            "default": 5
        },
        "start_image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Start Image Url",
            "description": "URL of starting image for video",
            "examples": [
                "https://images.pexels.com/photos/421927/pexels-photo-421927.jpeg",
                "gs://bucket/path/to/starting_image.png"
            ]
        },
        "person_generation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/src__models__veo__PersonGeneration"
                },
                {
                    "type": "null"
                }
            ],
            "description": "People generation controls",
            "default": "allow"
        },
        "enhance_prompt": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Enhance Prompt",
            "description": "Whether to enhance the input prompt",
            "default": false
        },
        "negative_prompt": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Negative Prompt",
            "description": "Text description of what to avoid in the video",
            "examples": [
                "No text overlays",
                "Avoid fast cuts and shaky camera"
            ]
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "Seed for video generation"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "VeoGenerateVideoRequest",
    "description": "Request model for VEO video generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/runway/video/generation/generate-video-from-text

Generate Video From Text

Description

Generate a video from a text prompt. This endpoint uses the VEO3 model to generate a video purely from a text description, without requiring any input images or videos.

Args:

  • request (RunwayGenerateVideoFromTextRequest):
  • prompt (str): Description of the desired video.
  • model ("veo3"): Model variant.
  • aspect_ratio ("1280:720" | "720:1280"): Output aspect ratio.
  • duration (8): Video duration in seconds.
  • seed (int | None): Seed for reproducible results.

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "model": "string",
    "aspect_ratio": "1280:720",
    "duration": 0,
    "seed": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Prompt To Generate Video",
            "description": "A non-empty string up to 1000 characters describing what should appear in the output.",
            "examples": [
                "Cinematic short video of a sleek black sports car driving smoothly on a snowy mountain road. The car kicks up snow powder as it speeds along the icy suface."
            ]
        },
        "model": {
            "type": "string",
            "const": "veo3",
            "title": "Model Variant",
            "description": "The model variant to use. Currently only veo3 is supported for text-to-video.",
            "default": "veo3"
        },
        "aspect_ratio": {
            "type": "string",
            "enum": [
                "1280:720",
                "720:1280"
            ],
            "title": "Aspect ratio",
            "description": "A string representing the aspect ratio of the output video.",
            "default": "1280:720"
        },
        "duration": {
            "type": "integer",
            "const": 8,
            "title": "Duration",
            "description": "Veo 3 videos must be 8 seconds long.",
            "default": 8
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 4294967295.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results."
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "RunwayGenerateVideoFromTextRequest",
    "description": "Request model for Runway text to video generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/runway/video/generation/generate-video-from-image

Generate Video From Image

Description

Generate a video from an input image.

Args:

  • request (RunwayGenerateVideoFromImageRequest):
  • prompt (str): Description of the desired video.
  • image_url (HttpUrl | None): Optional first-frame image.
  • aspect_ratio (VideoAspectRatio): Output aspect ratio.
  • duration (5 | 10): Video duration in seconds.
  • model ("gen4_turbo" | "gen3a_turbo" | "veo3"): Model variant.
  • seed (int | None): Seed for reproducible results.
  • content_moderation (ContentModeration | None): Moderation settings (not for "veo3").

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "image_url": null,
    "aspect_ratio": "1280:720",
    "duration": 0,
    "model": "gen4_turbo",
    "seed": null,
    "content_moderation": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Prompt To Generate Video",
            "description": "A non-empty string up to 1000 characters describing what should appear in the output.",
            "examples": [
                "a man walking on the beach"
            ]
        },
        "image_url": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 2048,
                    "minLength": 1,
                    "format": "uri"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Prompt Image",
            "description": "HTTPS URL or data URI containing an encoded image to be used as the first frame of the generated video.",
            "examples": [
                "https://images.pexels.com/photos/21836744/pexels-photo-21836744.jpeg"
            ]
        },
        "aspect_ratio": {
            "$ref": "#/components/schemas/VideoAspectRatio",
            "title": "Aspect ratio",
            "description": "The resolution of the output video.",
            "default": "1280:720"
        },
        "duration": {
            "type": "integer",
            "enum": [
                5,
                10
            ],
            "title": "Duration of Video",
            "description": "The number of seconds of duration for the output video.",
            "default": 10,
            "examples": [
                5,
                10
            ]
        },
        "model": {
            "type": "string",
            "enum": [
                "gen4_turbo",
                "gen3a_turbo",
                "veo3"
            ],
            "title": "Model Variant",
            "description": "The model variant to use for video generation.",
            "default": "gen4_turbo"
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 4294967295.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results."
        },
        "content_moderation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ContentModeration"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Settings that affect the behavior of the content moderation system. Only allowed for gen4_turbo and gen3a_turbo models."
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "RunwayGenerateVideoFromImageRequest",
    "description": "Request model for Runway image to video generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/runway/video/generation/generate-video-from-motion

Generate Video From Motion

Description

Generate a video from a reference video for motion and expression transfer.

Args:

  • request (RunwayGenerateVideoFromMotionRequest):
  • character (CharacterInput): {type: "image" | "video", uri: HttpUrl}.
  • reference_url (HttpUrl): Reference performance video (3–30s).
  • aspect_ratio (VideoAspectRatio): Output aspect ratio.
  • body_control (bool): Enable non-facial movement transfer.
  • expression_intensity (int 1–5): Expression intensity.
  • seed (int | None): Seed for reproducible results.
  • content_moderation (ContentModeration | None): Moderation settings.

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "character": {
        "type": "image",
        "uri": "string"
    },
    "reference_url": "string",
    "aspect_ratio": "1280:720",
    "body_control": true,
    "expression_intensity": 0,
    "seed": null,
    "content_moderation": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "character": {
            "$ref": "#/components/schemas/CharacterInput",
            "title": "Character",
            "description": "The character to control. You can either provide a video or an image."
        },
        "reference_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "format": "uri",
            "title": "Reference Video URL",
            "description": "HTTPS URL pointing to a video of a person performing in the manner that you would like your character to perform. The video must be between 3 and 30 seconds in duration.",
            "examples": [
                "https://sample-videos.com/zip/10/mp4/SampleVideo_1280x720_1mb.mp4"
            ]
        },
        "aspect_ratio": {
            "$ref": "#/components/schemas/VideoAspectRatio",
            "title": "Aspect ratio",
            "description": "The resolution of the output video.",
            "default": "1280:720"
        },
        "body_control": {
            "type": "boolean",
            "title": "Body Control",
            "description": "A boolean indicating whether to enable body control. When enabled, non-facial movements and gestures will be applied to the character in addition to facial expressions.",
            "default": true
        },
        "expression_intensity": {
            "type": "integer",
            "maximum": 5.0,
            "minimum": 1.0,
            "title": "Expression Intensity",
            "description": "An integer between 1 and 5 (inclusive). A larger value increases the intensity of the character's expression.",
            "default": 3
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 4294967295.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results."
        },
        "content_moderation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ContentModeration"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Settings that affect the behavior of the content moderation system."
        }
    },
    "type": "object",
    "required": [
        "character",
        "reference_url"
    ],
    "title": "RunwayGenerateVideoFromMotionRequest",
    "description": "Request model for Runway character performance (act-two model)."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/runway/video/generation/generate-video-from-video

Generate Video From Video

Description

Generate a new video based on a given input video and a reference image.

Args:

  • request (RunwayGenerateVideoFromVideoRequest):
  • prompt (str): Description of the desired transformation/styling.
  • video_uri (HttpUrl): Source video (3–30s).
  • reference_image_url (HttpUrl): Style reference image.
  • aspect_ratio (VideoAspectRatio): Output aspect ratio.
  • seed (int | None): Seed for reproducible results.
  • content_moderation (ContentModeration | None): Moderation settings.

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "video_uri": "string",
    "reference_image_url": "string",
    "aspect_ratio": "1280:720",
    "seed": null,
    "content_moderation": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Prompt To Generate Video",
            "description": "A non-empty string up to 1000 characters describing what should appear in the output.",
            "examples": [
                "Children playing in the train"
            ]
        },
        "video_uri": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "format": "uri",
            "title": "Video URI",
            "description": "HTTPS URL pointing to a video or a data URI containing a video."
        },
        "reference_image_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "format": "uri",
            "title": "Reference Image URL",
            "description": "HTTPS URL pointing to an image to use as style reference."
        },
        "aspect_ratio": {
            "$ref": "#/components/schemas/VideoAspectRatio",
            "title": "Aspect ratio",
            "description": "The resolution of the output video.",
            "default": "1280:720"
        },
        "seed": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 4294967295.0,
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Seed",
            "description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results."
        },
        "content_moderation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ContentModeration"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Settings that affect the behavior of the content moderation system."
        }
    },
    "type": "object",
    "required": [
        "prompt",
        "video_uri",
        "reference_image_url"
    ],
    "title": "RunwayGenerateVideoFromVideoRequest",
    "description": "Request model for Runway video to video generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Upload


POST /api/v1/firefly/upload

Upload

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "file": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
        }
    },
    "type": "object",
    "required": [
        "file"
    ],
    "title": "Body_upload_api_v1_firefly_upload_post"
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Video Editing Generation


POST /api/v1/runway/video/editing-generation/video-upscale

Upscale Video

Description

Upscale a video using the RunwayML video up-scaling model. This endpoint accepts a video URL and enhances its quality/resolution using the RunwayML up-scaling service.

Args:

  • request (RunwayVideoUpscaleRequest):
  • video_url (HttpUrl): Video to upscale (<= 40s; each side < 4096px).

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "video_url": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "video_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "format": "uri",
            "title": "Video URL",
            "description": "HTTPS URL pointing to a video or a data URI containing a video. The video must be less than 4096px on each side and duration may not exceed 40 seconds."
        }
    },
    "type": "object",
    "required": [
        "video_url"
    ],
    "title": "RunwayVideoUpscaleRequest",
    "description": "Request model for Runway video upscaling."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Audio Generation


POST /api/v1/runway/audio/generation/text-to-speech

Text To Speech

Description

Generate speech from text.

Args:

  • request (RunwayTextToSpeechRequest):
  • prompt (str): Text to convert to speech.
  • voice (RunwayVoice): Voice configuration (type, preset_id).
  • model ("eleven_multilingual_v2"): TTS model.

Returns: Json response with success status and the result containing the response, including task ID, status, and result URL (if available), or any error details.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key

Request body

{
    "prompt": "string",
    "voice": {
        "type": "string",
        "preset_id": "Maya"
    },
    "model": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "prompt": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Text to Convert",
            "description": "A non-empty string up to 1000 characters to convert to speech.",
            "examples": [
                "The quick brown fox jumps over the lazy dog"
            ]
        },
        "voice": {
            "$ref": "#/components/schemas/RunwayVoice",
            "title": "Voice Configuration",
            "description": "The voice to use for the generated speech."
        },
        "model": {
            "type": "string",
            "const": "eleven_multilingual_v2",
            "title": "Model",
            "description": "The model variant to use. Currently only eleven_multilingual_v2 is supported.",
            "default": "eleven_multilingual_v2"
        }
    },
    "type": "object",
    "required": [
        "prompt",
        "voice"
    ],
    "title": "RunwayTextToSpeechRequest",
    "description": "Request model for Runway text to speech generation."
}

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Response 422 Unprocessable Content

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Health


GET /health

Health Check

Description

Health check endpoint.

Response 200 OK

{
    "status": "success",
    "result": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "enum": [
                "success"
            ]
        },
        "result": {
            "oneOf": [
                {
                    "type": "object"
                },
                {
                    "type": "array"
                },
                {
                    "type": "string"
                },
                {
                    "type": "number"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "required": [
        "status",
        "result"
    ],
    "additionalProperties": false
}

Schemas

AlignmentModel

Name Type
horizontal HorizontalAlignmentModel
vertical VerticalAlignmentModel

BackgroundAssetAdaptationRequest

Name Type
audience string
location string
model_provider LlmProvider
temperature number

BackgroundCreationRequest

Name Type
audience string
location string
model_provider LlmProvider
temperature number

Body_bria_enhance_prompt_api_v1_bria_prompt_enhance_prompt_post

Name Type
prompt string

Body_expand_image_async_api_v1_firefly_image_editing_generation_expand_image_post

Name Type
image ImageReferenceModel
mask MaskModel
placement PlacementModel
prompt
seeds
size SizeImagesAsyncModel

Body_fill_image_async_api_v1_firefly_image_editing_generation_inpaint_post

Name Type
image ImageReferenceModel
mask MaskModel
negative_prompt
prompt
prompt_biasing_locale_code
seeds
size SizeImagesAsyncModel

Body_generate_images_async_api_v1_firefly_image_generation_generate_image_post

Name Type
content_class ContentClass
custom_model_id
negative_prompt
prompt string
prompt_biasing_locale_code
seeds
size SizeImagesAsyncModel
structure
style
upsampler_type string
visual_intensity
x_model_version CustomModel

Body_generate_object_composite_async_api_v1_firefly_image_editing_generation_generate_product_background_post

Name Type
content_class ContentClass
image ImageReferenceModel
mask ImageReferenceModel
placement PlacementModel
prompt string
seeds
size SizeImagesAsyncModel
style

Body_generate_similar_images_async_api_v1_firefly_image_generation_generate_variation_post

Name Type
image ImageReferenceModel
seeds
x_model_version CustomModel

Body_upload_api_v1_firefly_upload_post

Name Type
file string(binary)

BriaBlurBackgroundRequest

Name Type
image
preserve_alpha boolean
scale integer
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaCropForegroundRequest

Name Type
force_background_detection boolean
image
padding integer
preserve_alpha boolean
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaEnhanceImageRequest

Name Type
image
preserve_alpha boolean
resolution EnhanceResolution
seed
steps_num
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaEraseForegroundRequest

Name Type
image
preserve_alpha boolean
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaEraserRequest

Name Type
image
mask
mask_type MaskType
preserve_alpha boolean
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaExpandImageRequest

Name Type
aspect_ratio
canvas_size
image
negative_prompt
padding_bottom
padding_left
padding_right
padding_top
position
preserve_alpha boolean
prompt
prompt_content_moderation boolean
seed
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaGenerateBackgroundRequest

Name Type
enhance_ref_images boolean
fast boolean
force_background_detection boolean
image
negative_prompt
original_quality boolean
prompt
prompt_content_moderation boolean
ref_images
refine_prompt boolean
seed
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaGenerateImageFastRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
enhance_image boolean
guidance_method_1
guidance_method_1_image_file
guidance_method_1_image_url
guidance_method_1_scale
guidance_method_2
guidance_method_2_image_file
guidance_method_2_image_url
guidance_method_2_scale
image_prompt_file
image_prompt_mode
image_prompt_scale
image_prompt_urls
ip_signal boolean
medium
num_results integer
prompt string
prompt_content_moderation boolean
prompt_enhancement boolean
seed
steps_num integer
sync boolean

BriaGenerateImageHDRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
enhance_image boolean
ip_signal boolean
medium
negative_prompt
num_results integer
prompt string
prompt_enhancement boolean
seed
steps_num integer
sync boolean
text_guidance_scale number

BriaGenerateImageRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
enhance_image boolean
guidance_method_1
guidance_method_1_image_file
guidance_method_1_image_url
guidance_method_1_scale
guidance_method_2
guidance_method_2_image_file
guidance_method_2_image_url
guidance_method_2_scale
image_prompt_file
image_prompt_mode
image_prompt_scale
image_prompt_urls
ip_signal boolean
medium
negative_prompt
num_results integer
prompt string
prompt_content_moderation boolean
prompt_enhancement boolean
seed
steps_num integer
sync boolean
text_guidance_scale number

BriaGenerateProductBackgroundByImageRequest

Name Type
aspect_ratio string
canvas_for_packshot_size
enhance_ref_image boolean
force_rmbg boolean
foreground_image_location
foreground_image_size
image_file
image_url
manual_placement_selection ManualPlacement
num_results integer
original_quality boolean
padding_values Array<>
placement_type PlacementType
ref_image_file
ref_image_influence number
ref_image_urls
sync boolean

BriaGenerateProductBackgroundByTextRequest

Name Type
aspect_ratio string
canvas_for_packshot_size
exclude_elements
fast boolean
force_rmbg boolean
foreground_image_location
foreground_image_size
image_file
image_url
manual_placement_selection ManualPlacement
num_results integer
optimize_description boolean
original_quality boolean
padding_values Array<>
placement_type PlacementType
scene_description string
sync boolean

BriaGenerateProductShadowRequest

Name Type
background_color
force_rmbg boolean
image_file
image_url
shadow_blur
shadow_color
shadow_height
shadow_intensity
shadow_offset
shadow_type
shadow_width

BriaGenerateSolidBackgroundRequest

Name Type
background_color string
force_rmbg boolean
image_file
image_url

BriaGenerateVariationRequest

Name Type
content_moderation boolean
enhance_image boolean
fast boolean
image_file
image_url
include_generation_prefix boolean
ip_signal boolean
num_results integer
prompt string
prompt_content_moderation boolean
ref_image_influence number
seed
steps_num integer
sync boolean
tailored_model_id
tailored_model_influence

BriaGenerateVectorBaseRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
guidance_method_1
guidance_method_1_image_file
guidance_method_1_image_url
guidance_method_1_scale
guidance_method_2
guidance_method_2_image_file
guidance_method_2_image_url
guidance_method_2_scale
image_prompt_file
image_prompt_mode
image_prompt_scale
image_prompt_urls
ip_signal boolean
negative_prompt
num_results integer
prompt string
prompt_content_moderation boolean
seed
steps_num integer
sync boolean
text_guidance_scale number

BriaGenerateVectorFastRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
guidance_method_1
guidance_method_1_image_file
guidance_method_1_image_url
guidance_method_1_scale
guidance_method_2
guidance_method_2_image_file
guidance_method_2_image_url
guidance_method_2_scale
image_prompt_file
image_prompt_mode
image_prompt_scale
image_prompt_urls
ip_signal boolean
num_results integer
prompt string
prompt_content_moderation boolean
seed
steps_num integer
sync boolean

BriaGetMasksRequest

Name Type
image_file
image_url

BriaInpaintingRequest

Name Type
border_percentage
image
mask
mask_type MaskType
negative_prompt
preserve_alpha boolean
prompt string
prompt_content_moderation boolean
seed
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaLoraCreateDatasetRequest

Name Type
name string
project_id integer

BriaLoraCreateModelRequest

Name Type
dataset_id integer
description
name string
training_version string

BriaLoraCreateProjectRequest

Name Type
ip_description
ip_medium string
ip_name
ip_type string
project_description
project_name string

BriaLoraGenerateImagesRequest

Name Type
aspect_ratio string
fast boolean
include_generation_prefix boolean
model_id string
model_influence
num_results integer
prompt string
seed
steps_num
sync boolean

BriaLoraGenerateVectorRequest

Name Type
aspect_ratio string
bria_model_version string
content_moderation boolean
guidance_method_1
guidance_method_1_image_file
guidance_method_1_image_url
guidance_method_1_scale
guidance_method_2
guidance_method_2_image_file
guidance_method_2_image_url
guidance_method_2_scale
image_prompt_file
image_prompt_mode
image_prompt_scale
image_prompt_urls
include_generation_prefix boolean
model_id string
model_influence
negative_prompt
num_results integer
prompt string
prompt_content_moderation boolean
seed
steps_num
sync boolean
text_guidance_scale

BriaLoraUpdateDatasetRequest

Name Type
caption_prefix
dataset_id integer
name
status

BriaLoraUpdateImageCaptionRequest

Name Type
caption
dataset_id integer
image_id integer
regenerate_caption boolean

BriaLoraUpdateModelRequest

Name Type
description
model_id integer
name

BriaLoraUpdateProjectRequest

Name Type
ip_description
ip_name
project_description
project_id integer
project_name

BriaLoraUploadImageRequest

Name Type
dataset_id integer
file_path
image_name
image_url

BriaProductCutoutRequest

Name Type
force_rmbg boolean
image_file
image_url

BriaRemoveBackgroundRequest

Name Type
image
preserve_alpha boolean
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaStatusResponse

Name Type
error
request_id string
result
status string

BriaUpscaleImageRequest

Name Type
desired_increase integer
image
preserve_alpha boolean
sync boolean
visual_input_content_moderation boolean
visual_output_content_moderation boolean

BriaVideoRemoveBackgroundRequest

Name Type
background_color
output_container_and_codec
video string(uri)

CharacterInput

Name Type
type string
uri string(uri)

ContentClass

Type: string

ContentModeration

Name Type
public_figure_threshold string

ControlnetType

Type: string

ControlReferenceType

Type: string

CustomModel

Type: string

EnhanceResolution

Type: string

GeminiEditImageRequest

Name Type
edit_prompt
edit_steps
image_url string(uri)
safety_category
safety_method
safety_threshold

GeminiGenerateImageRequest

Name Type
image_urls
prompt string
safety_category
safety_method
safety_threshold

GeminiGenerateImageSequenceRequest

Name Type
prompt string
safety_category
safety_method
safety_threshold

google__genai__types__PersonGeneration

Type: string

GPTEditImageRequest

Name Type
aspect_ratio string
image_url string(uri)
number_of_images integer
prompt string

GPTGenerateImageRequest

Name Type
aspect_ratio string
background GPTImageBackground
number_of_images integer
prompt string
quality GPTImageQuality

GPTImageBackground

Type: string

GPTImageQuality

Type: string

GPTInpaintingRequest

Name Type
border_percentage number
image_file
image_url
inpaint_border_only boolean
mask_file
mask_url
prompt string

HarmBlockMethod

Type: string

HarmBlockThreshold

Type: string

HarmCategory

Type: string

HorizontalAlignmentModel

Type: string

HTTPValidationError

Name Type
detail Array<ValidationError>

ImageAspectRatio

Type: string

ImageCaptionMode

Type: string

ImageCaptionRequest

Name Type
image_url string(uri)
mode ImageCaptionMode
model_provider LlmProvider
nbr_tags integer
possible_tags

ImageCreationRequest

Name Type
audience string
location string
model_provider LlmProvider
temperature number

ImagenBackgroundRequest

Name Type
image_url string(uri)
number_of_images integer
person_generation google__genai__types__PersonGeneration
prompt string
safety_filter_level SafetyFilterLevel
seed

ImagenExpandImageRequest

Name Type
image_url string(uri)
mask_dilation number
number_of_images integer
padding_bottom
padding_left
padding_right
padding_top
person_generation google__genai__types__PersonGeneration
position
prompt string
safety_filter_level SafetyFilterLevel
target_height integer
target_width integer

ImagenGenerateImageRequest

Name Type
add_watermark boolean
aspect_ratio string
model_name
number_of_images integer
person_generation google__genai__types__PersonGeneration
prompt string
safety_filter_level SafetyFilterLevel
use_fast_model boolean

ImagenImageGuidanceRequest

Name Type
aspect_ratio
guidance_type string
person_generation google__genai__types__PersonGeneration
prompt
ref_image_1_description
ref_image_1_url string(uri)
ref_image_2_description
ref_image_2_url
safety_filter_level SafetyFilterLevel
subject_type

ImagenInpaintingRequest

Name Type
image_url string(uri)
mask_dilation
mask_mode
operation_type string
person_generation google__genai__types__PersonGeneration
prompt
removal_mode
safety_filter_level SafetyFilterLevel
segmentation_classes

ImagenVariationRequest

Name Type
aspect_ratio
control_type ControlReferenceType
image_url string(uri)
number_of_images integer
person_generation google__genai__types__PersonGeneration
prompt
safety_filter_level SafetyFilterLevel

ImagePromptMode

Type: string

ImageReferenceModel

Name Type
source SourceModel

InsertModel

Name Type
bottom integer
center integer
left integer
right integer
top integer

LlmProvider

Type: string

ManualPlacement

Type: string

MaskModel

Name Type
invert boolean
source SourceModel

MaskReferenceMode

Type: string

MaskType

Type: string

ModelName

Type: string

PlacementModel

Name Type
alignment AlignmentModel
insert InsertModel

PlacementType

Type: string

PromptEnhancementRequest

Name Type
model_provider LlmProvider
prompt string
temperature number

ReferenceImage

Name Type
tag
uri

RemovalMode

Type: string

RunwayGenerateImageRequest

Name Type
aspect_ratio ImageAspectRatio
content_moderation
model string
prompt string
reference_images_url
seed

RunwayGenerateVideoFromImageRequest

Name Type
aspect_ratio VideoAspectRatio
content_moderation
duration integer
image_url
model string
prompt string
seed

RunwayGenerateVideoFromMotionRequest

Name Type
aspect_ratio VideoAspectRatio
body_control boolean
character CharacterInput
content_moderation
expression_intensity integer
reference_url string(uri)
seed

RunwayGenerateVideoFromTextRequest

Name Type
aspect_ratio string
duration integer
model string
prompt string
seed

RunwayGenerateVideoFromVideoRequest

Name Type
aspect_ratio VideoAspectRatio
content_moderation
prompt string
reference_image_url string(uri)
seed
video_uri string(uri)

RunwayTextToSpeechRequest

Name Type
model string
prompt string
voice RunwayVoice

RunwayVideoUpscaleRequest

Name Type
video_url string(uri)

RunwayVoice

Name Type
preset_id string
type string

SafetyFilterLevel

Type: string

SizeImagesAsyncModel

Name Type
height integer
width integer

SourceModel

Name Type
upload_id
url

src__models__veo__PersonGeneration

Type: string

StructureModel

Name Type
image_reference ImageReferenceModel
strength integer

StyleModel

Name Type
image_reference ImageReferenceModel
presets Array<string>
strength integer

SubjectEnhancementRequest

Name Type
audience string
location string
model_provider LlmProvider
subject string
temperature number

SubjectPosePromptRequest

Name Type
model_provider LlmProvider
subject string
temperature number

SubjectReferenceType

Type: string

ValidationError

Name Type
loc Array<>
msg string
type string

VeoDuration

Type: integer

VeoGenerateVideoRequest

Name Type
aspect_ratio string
duration VeoDuration
enhance_prompt
model VeoModel
negative_prompt
person_generation
prompt string
seed
start_image_url

VeoModel

Type: string

VerticalAlignmentModel

Type: string

VideoAspectRatio

Type: string

VideoCaptionMode

Type: string

VideoCaptionRequest

Name Type
mode VideoCaptionMode
nbr_tags integer
video_url string(uri)

Security schemes

Name Type Scheme Description
APIKeyHeader apiKey

Tags

Name Description
Health Health check endpoints
Status Status check endpoints
Upload Upload endpoints
Prompt Enhancement Prompt generation and enhancement services
Media Captioning Image and video captioning services
Image Editing Basic image editing operations
Image Generation Image generation services
Image Editing Generation Advanced image editing with AI generation
Video Editing Basic video editing operations
Video Generation Video generation services
Video Editing Generation Advanced video editing with AI generation
LoRA Project Management LoRA project management services
LoRA Training LoRA training services
Audio Generation Audio generation services

Health

  • Lightweight probe for service uptime.
  • Endpoints: GET /health.
  • See OpenAPI tag: Health in the reference above.

Status

  • Check async job state and cancel running jobs across providers.
  • Endpoints:
  • Firefly: GET /api/v1/firefly/status/{task_id}, DELETE /api/v1/firefly/cancel/{task_id}
  • Runway: GET /api/v1/runway/status/{task_id}, DELETE /api/v1/runway/cancel/{task_id}
  • BRIA: GET /api/v1/bria/status/{task_id}
  • See OpenAPI tag: Status.

Upload

  • Provider upload helpers (e.g., Firefly image upload).
  • Endpoints: POST /api/v1/firefly/upload (multipart).
  • See OpenAPI tag: Upload.

Prompt Enhancement

  • Generate or adapt prompts (background, subject, pose) for better generations.
  • Endpoints: /api/v1/prompt/*, and POST /api/v1/bria/prompt/enhance-prompt.
  • See OpenAPI tag: Prompt Enhancement.

Media Captioning

  • Create captions/tags for images and videos.
  • Endpoints: POST /api/v1/caption/image, POST /api/v1/caption/video.
  • See OpenAPI tag: Media Captioning.

Image Editing

  • Deterministic edits like background removal, cutout, cropping, masks.
  • Representative endpoints (BRIA):
  • POST /api/v1/bria/image/editing/remove-background
  • POST /api/v1/bria/image/editing/product-cutout
  • POST /api/v1/bria/image/editing/crop-foreground
  • POST /api/v1/bria/image/editing/get-masks
  • See OpenAPI tag: Image Editing.

Image Generation

  • Text-to-image and guided image generations across providers.
  • Representative endpoints:
  • BRIA: POST /api/v1/bria/image/generation/*
  • Firefly: POST /api/v1/firefly/image/generation/*
  • Google Vision (Imagen/Gemini): POST /api/v1/google-vision/image/generation/*
  • OpenAI (GPT Image): POST /api/v1/openai/image/generation/generate-image
  • Bria LoRA: POST /api/v1/bria-lora/image/generation/*
  • See OpenAPI tag: Image Generation.

Image Editing Generation

  • Generative edits (inpaint/fill/expand/enhance/background synthesis).
  • Representative endpoints:
  • BRIA: POST /api/v1/bria/image/editing-generation/*
  • Firefly: POST /api/v1/firefly/image/editing-generation/*
  • Google Vision (Imagen/Gemini): POST /api/v1/google-vision/image/editing-generation/*
  • OpenAI (GPT Image): POST /api/v1/openai/image/editing-generation/*
  • See OpenAPI tag: Image Editing Generation.

Video Editing

  • Deterministic video edits (e.g., background removal).
  • Representative endpoints:
  • BRIA: POST /api/v1/bria/video/editing/remove-background (alias also available)
  • See OpenAPI tag: Video Editing.

Video Generation

  • Text/image/video-to-video generation.
  • Representative endpoints:
  • Runway: POST /api/v1/runway/video/generation/*
  • Google Vision (VEO): POST /api/v1/google-vision/video/generation/generate-video
  • See OpenAPI tag: Video Generation.

Video Editing Generation

  • Generative video operations (e.g., upscaling/enhancement).
  • Endpoints: POST /api/v1/runway/video/editing-generation/video-upscale.
  • See OpenAPI tag: Video Editing Generation.

Audio Generation

  • Text-to-speech.
  • Endpoints: POST /api/v1/runway/audio/generation/text-to-speech.
  • See OpenAPI tag: Audio Generation.

LoRA Project Management

  • Manage LoRA projects, datasets, and models.
  • Representative endpoints: /api/v1/bria-lora/projects, /api/v1/bria-lora/datasets, /api/v1/bria-lora/models (+ resource subpaths).
  • See OpenAPI tag: LoRA Project Management.

LoRA Training

  • Start/stop LoRA model training.
  • Endpoints: POST /api/v1/bria-lora/models/{model_id}/training/{start|stop}.
  • See OpenAPI tag: LoRA Training.