Background Cleanup Verification💡

Our engine removes or edits the background of an image to enhance visual clarity or isolate the main subject.

Overview

The Background Cleanup Service API allows you to remove the background from an image and replace it with a transparent or solid color background.

🚧

Important!

Before you proceed, ensure you review the prerequisites for integrating to our APIs for a more detailed guide.

API Endpoint

(https://api.verified.africa/sfx-v4-verify/v4/id-service)

Headers

Our service accepts headers for authentication. See below the headers to pass to the API

HeaderTypeDescription
useridStringThis is your user id retrieved from the portal. Check the getting started article to understand how to retrieve your user ID
apiKeyStringThis is your api key retrieved from the portal. Check the getting started article to understand how to retrieve your apiKey

Request Parameters

ParameterRequiredDescriptionTest Data
verificationTypeyesThis field is used to identify the service being called. Ensure to use the value provided exactly as providedBACKGROUND-CLEANUP-VERIFICATION
selfieyesThe selfie imageBase64 image
{
    "verificationType" : "BACKGROUND-CLEANUP-VERIFICATION",
    "selfie": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/"
}

Response Parameter

The API returns the processed image file in a base64 string format.

ParameterTypeDescription
responseCodeStringPlease reference Response Codes page for details on all possible responses
descriptionStringThis is a description of the response received.
verificationTypeStringThe same verificationType passed in request will be returned here
verificationStatusStringThis field lets you know if the identity verification was successful. Options are:

VERIFIED: This means that the image background cleanup is successful.
NOT VERIFIED This means that the image background cleanup is not successful.
PENDING This status means that the verification could not be completed. Refer to the responseCode for the specific failure reason
transactionStatusStringThis indicates the wallet debit status. The options are successful or failed.
transactionReferenceStringIf you supplied a transactionReference, the same will be returned here. Else, we would generate a reference and return that to you in this field.
transactionDateStringDate the transaction was done
responseJsonimage_1 is retrieved from the service provider.
{
    "responseCode": "00",
    "description": "Success",
    "verificationType": "BACKGROUND-CLEANUP-VERIFICATION",
    "verificationStatus": "VERIFIED",
    "transactionStatus": "SUCCESSFUL",
    "transactionReference": "1628016393774-LFQTBIJQ",
    "transactionDate": "1679920553488",
    "searchParameter": null,
    "callBackUrl": null,
    "livenessScore": 0.0,
    "paymentRef": null,
    "response": {
        "image_1": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgI"
    },
    "faceMatch": null
}

Error Responses

Status CodeDescription
400Bad Request - Invalid input parameters
401Unauthorized - Invalid API Key
500Internal Server Error - Something went wrong on the server side