Age Filter Agent Skill - AI Pass API
Age Filter Agent Skill
This agent skill enables AI agents to apply age transformation filters to photos using AI Pass API. Perfect for automated image editing, character development workflows, and age progression projects.
Skill Overview
The Age Filter skill provides:
- Automated age transformations – De-aging and aging photos
- Multiple age ranges – Child, teen, adult, senior
- Intensity control – Adjust transformation strength
- Both directions – Make younger or older
- High-quality output – Preserve image resolution
Installation
Add this skill to your agent by including the following skillContent:
{
"skillName": "age-filter",
"skillVersion": "1.0.0",
"description": "Apply age transformation filters to photos using AI Pass API",
"skillContent": {
"name": "applyAgeFilter",
"description": "Transform a photo to appear younger or older",
"parameters": {
"type": "object",
"properties": {
"imageUrl": {
"type": "string",
"description": "URL of the photo to transform"
},
"ageDirection": {
"type": "string",
"enum": ["younger", "older"],
"description": "Direction of age transformation",
"default": "older"
},
"targetAge": {
"type": "string",
"enum": ["child", "teen", "adult", "senior"],
"description": "Target age range",
"default": "adult"
},
"intensity": {
"type": "number",
"description": "Transformation intensity (1-100)",
"default": 70,
"minimum": 1,
"maximum": 100
},
"quality": {
"type": "string",
"enum": ["standard", "high", "ultra"],
"description": "Output quality",
"default": "high"
}
},
"required": ["imageUrl"]
},
"apiEndpoint": "https://aipass.one/api/v1/edit/image",
"model": "gemini/gemini-3-pro-image-preview",
"temperature": 1
}
}
API Authentication
To use this skill, you need an AI Pass API key:
- Go to AI Pass Developer Dashboard
- Navigate to API Keys section
- Click Generate New API Key
- Copy your API key
- IMPORTANT: Never hardcode API keys in your agent code. Use environment variables.
Usage Example
async function applyAgeFilter(imageUrl, options = {}) {
const API_KEY = process.env.AIPASS_API_KEY || '$AIPASS_API_KEY';
const {
ageDirection = 'older',
targetAge = 'senior',
intensity = 70,
quality = 'high'
} = options;
// Generate age transformation prompt using GPT-5
const prompt = `Create a detailed image editing prompt for age transformation:
Direction: ${ageDirection}
Target Age: ${targetAge}
Intensity: ${intensity}%
Quality: ${quality}
Provide detailed specifications for:
- Age-appropriate facial feature adjustments
- Skin texture and aging effects
- Wrinkles, smile lines, or skin smoothing as needed
- Hair color and texture changes
- Eye and expression modifications
- Overall facial structure changes appropriate for target age`;
// Generate the prompt
const promptResponse = await fetch('https://aipass.one/api/v1/generate/text', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
model: 'gpt-5-mini',
prompt: prompt,
temperature: 1,
max_tokens: 16000
})
});
const promptData = await promptResponse.json();
// Apply age transformation to the image
const editResponse = await fetch('https://aipass.one/api/v1/edit/image', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
model: 'gemini/gemini-3-pro-image-preview',
image: imageUrl,
prompt: promptData.text,
intensity: intensity
})
});
const editData = await editResponse.json();
return {
transformedImage: editData.url,
prompt: promptData.text,
metadata: {
direction: ageDirection,
targetAge: targetAge,
intensity: intensity,
quality: quality
}
};
}
// Usage
const result = await applyAgeFilter(
'https://example.com/person.jpg',
{
ageDirection: 'older',
targetAge: 'senior',
intensity: 80,
quality: 'high'
}
);
console.log('Transformed image:', result.transformedImage);
Skill Parameters
imageUrl (required)
- Type: string
- Description: URL of the photo to transform
- Example: "https://example.com/person.jpg"
ageDirection (optional)
- Type: enum
- Default: "older"
- Values: "younger", "older"
- Description: Direction of age transformation
targetAge (optional)
- Type: enum
- Default: "adult"
- Values: "child", "teen", "adult", "senior"
- Description: Target age range
intensity (optional)
- Type: number
- Default: 70
- Range: 1-100
- Description: Transformation strength
quality (optional)
- Type: enum
- Default: "high"
- Values: "standard", "high", "ultra"
- Description: Output quality
Model Configuration
model: gemini/gemini-3-pro-image-preview
- Why: Advanced image editing capabilities
- Performance: High-quality age transformations
- Use case: Precise facial feature modifications
temperature: 1
- Why: Maximum creativity for natural transformations
- Effect: Each transformation is unique and realistic
- Use case: Age transformations benefit from nuanced variations
Best Practices
- Use high-quality images – Better input = more accurate transformations
- Front-facing photos work best – Clear facial features needed
- Adjust intensity carefully – Too strong = unrealistic, too weak = subtle
- Try multiple ages – Create age progression series
- Match direction to goal – De-aging for nostalgia, aging for visualization
Error Handling
try {
const result = await applyAgeFilter(...);
} catch (error) {
if (error.status === 401) {
console.error('Invalid API key. Get your key from: https://aipass.one/developer/dashboard');
} else if (error.status === 429) {
console.error('Rate limit exceeded. Please retry later.');
} else if (error.status === 400) {
console.error('Invalid image or parameters. Check image URL and values.');
} else {
console.error('Error applying age filter:', error.message);
}
}
Integration Examples
Age Progression Generator
// Generate multiple age versions
async function createAgeProgression(imageUrl) {
const ages = ['child', 'teen', 'adult', 'senior'];
return Promise.all(
ages.map(age =>
applyAgeFilter(imageUrl, { targetAge: age })
)
);
}
Batch Age Filtering
// Process multiple images
async function batchAgeFilter(images) {
const results = await Promise.all(
images.map(img =>
applyAgeFilter(img.url, img.options)
)
);
return results;
}
Character Aging Workflows
// Age characters throughout a story
async function ageCharacterOverTime(baseImage, storyPoints) {
const progression = [];
for (const point of storyPoints) {
const aged = await applyAgeFilter(
progression.length ? agedImage : baseImage,
{ targetAge: point.age }
);
progression.push(aged.transformedImage);
}
return progression;
}
Get Your API Key
- Visit AI Pass Developer Dashboard
- Sign up or log in ($1 free credit on signup)
- Go to API Keys section
- Click Generate New API Key
- Store securely in environment variables
Pricing
- gemini/gemini-3-pro-image-preview: Advanced image editing
- $1 free credit on signup to test the skill
- Pay-as-you-go pricing after free credit
Support
Security Notes
- NEVER commit API keys to version control
- Use environment variables for API keys
- Rotate API keys regularly
- Implement rate limiting in your agent
- Validate all image URLs before processing
- Respect privacy – only transform images with consent