[Important: API Service Retirement Notice]Dear Developers,Thank you for your continued trust and support of the AILabTools API.To better focus on delivering more efficient, stable, and future-ready solutions, we are announcing the retirement of this API.Due to its outdated architecture and limitations in performance and scalability, this API will be permanently discontinued and will no longer be available starting from the date of this announcement. Any applications or integrations that still rely on this API may experience service interruptions if no action is taken.We strongly recommend that you evaluate alternative solutions and plan your migration as soon as possible to ensure a smooth transition and uninterrupted service for your users.If you have any questions or need assistance during this transition, our support team is ready to help:
📧 support@ailabtools.comWe sincerely appreciate your understanding and cooperation. Thank you for being part of AILabTools. We remain committed to providing you with more powerful and reliable services.Best regards,AILabTools Support Team
Request
- URL:
https://www.ailabapi.com/api/portrait/effects/hairstyle-editor - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGPNGBMP - Image size: No more than 5 MB.
- Image resolution: Less than 4096x4096px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
image_target | YES | file | |||
hair_type | NO | integer | 101, 201, 301, 401, 402, 403, 502, 503, 603, 801, 901, 1001, 1101, 1201, 1301 | 101 | 101`: Bangs (default)`, 201: Long hair, 301`: Bangs with long hair`, 401: Medium hair increase, 402`: Light hair increase`, 403: Heavy hair increase, 502`: Light curling`, 503: Heavy curling, 801`: Blonde`, 901: Straight hair, 1001`: Oil-free hair (slight effect, recommended for images with noticeable issues)`, 1101: Hairline fill (slight effect, recommended for images with noticeable issues of a high hairline), 1201`: Smooth hair (slight effect, recommended for images with a large hairstyle area)`, 1301: Fill hair gap (slight effect, fills the scalp part in the hair area, recommended for images with noticeable issues) |
Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+image | string | The result image, returning the Base64 encoding of the image. |

