Sample code
// Requires Alamofire 5 to be installed (see https://github.com/Alamofire/Alamofire)
AF.request(
URL(string: "https://api.remove.bg/v1.0/removebg")!,
method: .post,
parameters: ["image_url": "https://www.remove.bg/example.jpg"],
encoding: URLEncoding(),
headers: [
"X-Api-Key": "INSERT_YOUR_API_KEY_HERE"
]
)
.responseData { imageResponse in
guard let imageData = imageResponse.data,
let image = UIImage(data: imageData)
else { return }
self.imageView.image = image
}
Ready to transform your cloud experience? Let's connect and tailor the perfect solution for your needs.
Schedule a session with our experts at your convenience and start your journey with CloudBox.