Age Changer
Overview
Age Changer is a powerful AI tool that lets you see how someone would look at different ages. Here's how it works:
- Upload any photo with a clear face
- Choose the desired age option:
- Baby: Transform into a cute baby version
- Teenager: See how they'd look as a teen
- Adult: View them in their prime adult years
- Old: Preview an elderly appearance
- Within moments, you'll receive a naturally aged or de-aged version of the photo
API Reference
- URL: https://api.maxstudio.ai/age-changer
- Method: POST
API Parameters
Name | Type | Required | Description |
---|---|---|---|
image | string | yes | Base64 encoded image |
age | (baby, teenager, adult, old) | yes | Desired age |
⚠️ Important: When sending the base64 image, do not include the prefix (e.g., 'data:image/jpeg;base64,'). Send only the raw base64 string.
Header
Name | Type | Required | Description |
---|---|---|---|
x-api-key | string | yes | Your API key obtained from the MaxStudio APIs Dashboard (opens in a new tab). Generate this key by logging into your account and navigating to the API Keys section. |
Code Examples
// TypeScript implementationinterface Params { image: string; age: string;}async function AgeChanger(params: Params): Promise<any> { try { const response = await fetch('https://api.maxstudio.ai/age-changer', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ image: params.image, age: params.age }) }); const jobId = await response.json(); return jobId; } catch (error) { console.error('Error:', error); throw error; }}
Success Response
{
"jobId": "<job_id>"
}
Error Response Examples
// Rate Limit Error
{
"status": 429,
"error": "Rate limit exceeded. Please try again later."
}
// Insufficient Credits
{
"status": 402,
"error": "Insufficient credits. Please Buy credits."
}
// Invalid Input
{
"status": 400,
"error": "Image size must be less than 5MB"
}
Get Job Status
Header
Name | Type | Required | Description |
---|---|---|---|
x-api-key | string | yes | Your API key obtained from the MaxStudio APIs Dashboard (opens in a new tab). Generate this key by logging into your account and navigating to the API Keys section. |
To check the status of your job, use the following examples:
// TypeScript implementationasync function getJobStatus(jobId: string): Promise<any> { const url = `https://api.maxstudio.ai/age-changer/${jobId}`; try { const response = await axios.get(url); const jobId = await response.json(); return jobId; } catch (error) { console.error('Error:', error); throw error; }}
Job Status Reference
Status | Description |
---|---|
creating | Job is being initialized |
pending | Job is in processing queue |
running | Job is actively processing |
completed | Processing finished successfully |
failed | Processing encountered an error |
not-found | Invalid or expired job ID |
Output
{
"status": "<status>", // One of the status values from the table above
"result": "<result>" // Base64 encoded image data when status is 'completed'
}