@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Background Removal API
@base https://api.remove.bg/v1.0
@version 1.0.0
@auth ApiKey X-API-Key in header
@endpoints 3
@toc removebg(1), improve(1), account(1)

@group removebg
@endpoint POST /removebg
@optional {image_file_b64: str, image_url: str, size: str(preview/full/auto)=preview, type: str(auto/car/product/person/animal/graphic/transportation)=auto, type_level: str(none/1/2/latest)=1, format: str(auto/png/jpg/zip/webp)=auto, roi: str=0% 0% 100% 100%, crop: bool=false, crop_margin: str=0, scale: str=original, position: str=original, channels: str(rgba/alpha)=rgba, add_shadow: bool, shadow_type: str, shadow_opacity: str, semitransparency: bool=true, bg_color: str, bg_image_url: str}
@returns(200) {data: map{result_b64: str, foreground_top: int, foreground_left: int, foreground_width: int, foreground_height: int}}
@errors {400, 402, 403, 429}

@endgroup

@group improve
@endpoint POST /improve
@optional {image_file_b64: str, image_url: str, image_filename: str, tag: str}
@returns(200)
@errors {400, 403, 429}

@endgroup

@group account
@endpoint GET /account
@returns(200)
@errors {403, 429}

@endgroup

@end
