AILabTools API - Querying Credits - API
draft: true
Important Announcement: The API Documentation Has Been Fully Updated
This API documentation has been completely restructured with an improved and clearer format. The current page will no longer receive active updates or maintenance. For the most accurate and up-to-date information, please switch to the new documentation.
View New DocsRequest
- URL:
https://www.ailabapi.com/api/common/query-credits - Method:
GET
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | String | Application API KEY. Get API KEY |
Response
Response Field Handling Flow
-
Handle
Public Response FieldsParse and validate the
Public Response Fields, checking the status code or response message to ensure the request is successful and error-free. -
Handle
Business Response FieldsIf the
Public Response Fieldsare valid and error-free, proceed with processing the business logic in theBusiness Response Fields.
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Scope | Description |
|---|---|---|---|
data | array | ||
+unique_sign | string | View | Unique identification. |
+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 Identification
- 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 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 | |
| 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 | |
| Face Filters | portrait_facial_filters | |
| 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 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 |
| 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 | |
| Face Analyzer Advanced | portrait_face_analyzer_advanced |
| 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 |
| HD Human Background Removal | cutout_hd_human_body_background_removal | |
| Head Extraction | cutout_avatar_extraction | |
| Hairstyle Extraction | cutout_hair_extraction |
Response Example
{
"error_code": 0,
"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
}
]
}