AILabTools API - Querying credits - API
Request
- URL:
https://www.ailabapi.com/api/common/query-credits
- Method:
GET
Header
Field | Required | Type | Description |
---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Response
Processing Flow
-
Handle
Public Parameters
:First, parse and validate the
Public Parameters
, checking the status code or response message to ensure the request is successful and no errors are present. -
Handle
Business Parameters
:If the public parameters are valid and no exceptions are found, proceed to process the business logic in the
Business Parameters
.
Public Parameters
Viewing Public Parameters and Error CodesBusiness Parameters
Field | Type | Scope | Description |
---|---|---|---|
data | array | ||
+unique_sign | string | Scope | Unique identification. More Details |
+name | string | Name. | |
+balance | float | Credit Balance. | |
+total | float | Total Credits. | |
+last_recharge_balance | float | Balance after last purchase. | |
+balance_warning | float | Credit Balance Early Warning Value. | |
+first_buy_time | integer | Time of first purchase. | |
+last_update_time | integer | Last update time. |
unique_sign
- COMMON
- AI IMAGE
- AI PORTRAIT
- AI BACKGROUND REMOVAL
Name | Unique identification |
---|---|
Universal credits (all APIs supported) | common |
Category | API Name | Unique identification |
---|---|---|
Image Enhancement | Image Dehaze | image_dehazing |
Image Upscaler | image_lossless_enlargement | |
Stretched Image Restoration | image_distortion_correction | |
Image sharpness enhancement | image_clarity_enhancement | |
Image contrast enhancement | image_contrast_enhancement | |
Image color enhancement | image_color_enhancement | |
Image Effects | AI Cartoon Generator | image_ai_cartoon_generator |
AI Photo Colorize | image_coloring | |
Photo to Painting | image_style_transfer | |
Style transfer | image_style_migration | |
Color Migration | image_color_migration | |
HD color migration | image_hd_color_migration | |
Image Micro Motion | image_micro_motion | |
Image Editing | AI Image cropping | image_cropping |
Intelligent Composition | image_intelligent_composition | |
Photo retouch | image_photo_editing | |
Image Invisible Picture Watermark | image_invisible_image_watermark | |
Image Invisible Text Watermark | image_invisible_text_watermark | |
Image Erasure | image_erasure | |
Remove Objects | image_remove_objects | |
Remove Objects Advanced | image_remove_objects_advanced | |
Remove Objects Pro | image_remove_objects_pro | |
AI Object Replacer | image_ai_object_replacer | |
AI Image Extender | image_ai_image_extender | |
Image scoring | Image composition aesthetics score | image_composition_aesthetics_rating |
Image exposure score | image_exposure_rating |
Category | API Name | Unique identification |
---|---|---|
Portrait Effects | Cartoon yourself | portrait_cartoonization |
Merge Portraits | portrait_face_fusion | |
Smart Beauty | portrait_intelligent_beautification | |
AI Skin Beauty | portrait_intelligent_skin_retouching | |
AI Face Slimming | portrait_intelligent_face_slimming | |
Face Beauty | portrait_facial_beautification | |
Face Beauty Advanced | portrait_facial_beautification_advanced | |
Face Beauty Pro | portrait_facial_beautification_pro | |
AI Makeup | portrait_facial_makeup | |
Face Filters | portrait_facial_filters | |
Facial aesthetics | portrait_facial_shaping | |
Change facial expressions | portrait_expression_editing | |
Hairstyle changer | portrait_hairstyle_editing | |
Hairstyle changer Pro | portrait_hairstyle_editing_pro | |
Live Photos | portrait_live_photos | |
Hitchcock special effects | portrait_hitchcock_effect | |
Face Blur | portrait_facial_blurring | |
Age & Gender swap | portrait_face_attribute_editing | |
AI Face Enhancer | portrait_face_restoration_enhancement | |
Lips Color Changer | portrait_lips_color_changer | |
Portrait Analysis | Facial Landmarks | portrait_facial_keypoints |
Detect Skin Disease | portrait_skin_disease_detection | |
Skin analyze | portrait_skin_analysis_basic | |
Skin analyze Advanced | portrait_skin_analysis_advanced | |
Skin analyze Pro | portrait_skin_analysis_professional | |
Face Analyzer | portrait_face_analyzer | |
Portrait Editing | Try on Clothes | portrait_try_on_clothes |
Try on Clothes Pro | portrait_try_on_clothes_pro | |
Portrait Enhance | Try on Clothes Refiner | portrait_try_on_clothes_refiner |
Category | API Name | Unique identification |
---|---|---|
General | Universal Background Removal | cutout_general_background_removal |
Food Background Removal | cutout_food_background_removal | |
Product background removal | cutout_product_background_removal | |
Costume background removal | cutout_clothing_background_removal | |
Portrait | Human background removal | cutout_human_body_background_removal |
Head Extraction | cutout_avatar_extraction | |
Hairstyle Extraction | cutout_hair_extraction |
Example
{
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"error_detail": {
"status_code": 200,
"code": "",
"code_message": "",
"message": ""
},
"data": [
{
"unique_sign": "",
"name": "",
"balance": 0,
"total": 0,
"last_recharge_balance": 0,
"balance_warning": 0,
"first_buy_time": 0,
"last_update_time": 0
}
]
}