Replace-Background(更换背景)
POST
/sd/v2beta/stable-image/edit/replace-background-and-relight更换图片背景并重新适配光线
详细用法请参考官方文档:https://platform.stability.ai/docs/api-reference#tag/Edit/paths/~1v2beta~1stable-image~1edit~1replace-background-and-relight/post
价格:0.1PTC/次
请求参数
The image to generate a 3D model from.
An image whose style you wish to use in the background. Similar to the Control: Style API, stylistic elements from this image are added to the background.
What you wish to see in the background of the output image. This could be a description of the desired background scene, or just a description of the lighting if modifying the light source through light_source_direction or light_reference.
Description of the subject. Use this to prevent elements of the background from bleeding into the subject. For example, if you find your subject is turning green with a forest in the background, try putting a short description of the subject in this field.
0-1. How much to overlay the original subject to exactly match the original image. A 1.0 is an exact pixel match for the subject, and 0.0 is a close match but will have new lighting qualities. This is an advanced feature.
0-1. Controls the generated background to have the same depth as the original subject image. This is an advanced feature.
above below left right
An image with the desired lighting. Lighter sections of the light_reference image will correspond to sections with brighter lighting in the output image.
0-1. If using light_reference_image or light_source_direction, controls the strength of the light source. 1.0 is brighter and 0.0 is dimmer. This is an advanced feature.
jpeg png webp
示例代码
返回响应
{}