{"error_code":0,"error_detail":{"status_code":200,"code":"","code_message":"","message":""},"log_id":"3204516709","request_id":"3204516709","_note":"Response truncated for documentation purposes"}
curl --location 'https://zylalabs.com/api/4463/age+or+gender+swap+api/5476/age+swap?target=Required' \
--header 'Content-Type: application/json' \
--form 'image=@"FILE_PATH"'
{"error_code":0,"error_detail":{"status_code":200,"code":"","code_message":"","message":""},"log_id":"2258461338","request_id":"2258461338","_note":"Response truncated for documentation purposes"}
curl --location 'https://zylalabs.com/api/4463/age+or+gender+swap+api/5477/gender+swap?target=Required' \
--header 'Content-Type: application/json' \
--form 'image=@"FILE_PATH"'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Age or Gender Swap API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime.
The Age & Gender Swap API allows users to transform facial features by swapping genders and altering ages, providing a range of captivating photo effects. This advanced service offers three key functions:
Ideal for social media, entertainment, digital marketing, and creative projects, the Age & Gender Swap API delivers high-quality, engaging photo transformations. Enhance user engagement and provide unique, personalized experiences with our powerful, scalable, and easy-to-integrate API, designed to meet the diverse needs of modern digital applications.



The Age & Gender Swap API allows users to transform facial features by swapping genders and altering ages, providing a range of captivating photo effects. Ideal for social media, entertainment, digital marketing, and creative projects, the Age & Gender Swap API delivers high-quality, engaging photo transformations. Enhance user engagement and provide unique, personalized experiences with our powerful, scalable, and easy-to-integrate API, designed to meet the diverse needs of modern digital applications.
Fun social: In the social field, you can use the face attribute editing ability to create creative social activities and fun ideas to form pop-up activities through community fission. Short video: Realize the production of short video with fun face attribute editing, which is fun and at the same time can meet the user's demand for cognition and display of their own image. Marketing: Apply face attribute editing effects to produce creative content, allowing users to experience "fun" technology while independently spreading marketing activities or advertising to achieve the effect of brand promotion.
Key point positioning: The algorithm accurately includes eyes, eyebrows, lips, nose and face contour, providing 72 high-precision key points FDDB official measurement. Fast response time: Using advanced neural portrait editing technology, the single image feature extraction speed (GPU), on average, reaches 100 ms, enabling fast response to face attribute transformation and generating a new face with the desired attributes. Excellent effect: the output face's expression, angle, background and other attributes are highly compatible with the input face, generating a unique artificial intelligence face effect with high image generation quality to meet the demand for visual effects.
We can activate your Pay-as-you-go plan.
Yes, you can ask for more details about the API.
Each endpoint returns a JSON response containing the edited image in BASE64 format, along with metadata such as request ID, log ID, and error details if applicable.
The key fields in the response data include `request_id`, `log_id`, `error_code`, `error_msg`, and `data`, where `data` contains the `image` field with the BASE64 encoded edited image.
Parameters include `image` (required), `action_type` (required, e.g., `V2_AGE` or `V2_GENDER`), `target` (required for age or gender), `quality_control` (optional), and `face_location` (optional for multiple faces).
Users can customize requests by specifying the `action_type` for age or gender transformation, setting the `target` age or gender, and adjusting `quality_control` for image processing based on their needs.
The response data is organized in a JSON structure, with public parameters at the top level and business parameters nested under the `data` field, which includes the edited image.
Typical use cases include creating engaging social media content, producing entertaining short videos, and generating unique marketing materials that showcase innovative technology.
Data accuracy is maintained through advanced algorithms that utilize high-density facial key points for transformations, ensuring realistic and high-quality output images.
Users can expect consistent output patterns, where the edited image retains the original's expression and background while reflecting the specified age or gender changes accurately.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund