Profiles represent your trained AI editing styles. Each profile is created by training the AI with your manually edited photos in the Imagen AI app. The AI learns your unique editing preferences, color grading, exposure adjustments, and creative choices.Once trained, you can use a profile’s profile_key to automatically apply your exact editing style to thousands of photos through the SDK.
class Profile(BaseModel): image_type: str # "RAW" or "JPG" profile_key: int # Unique identifier for the profile profile_name: str # Human-readable name profile_type: str # Type/tier of the profile
from imagen_sdk import get_profiles# Quick profile check without creating a full clientprofiles = await get_profiles("your_api_key")for profile in profiles: print(f"{profile.profile_name} (key: {profile.profile_key})")
The profile_key is required when starting any editing operation:
from imagen_sdk import ImagenClient, PhotographyType, EditOptionsasync with ImagenClient("your_api_key") as client: # Get profiles first profiles = await client.get_profiles() # Select a specific profile (e.g., wedding profile) wedding_profile = next( p for p in profiles if "wedding" in p.profile_name.lower() ) # Use the profile_key for editing await client.start_editing( project_uuid="project-123", profile_key=wedding_profile.profile_key, photography_type=PhotographyType.WEDDING )
The SDK provides a utility function to validate file types before upload:
from imagen_sdk import get_profile, check_files_match_profile_typeimport logging# Get profile detailsprofile = await get_profile("your_api_key", profile_key=5700)print(f"Profile '{profile.profile_name}' works with {profile.image_type} files")# Validate filesfiles = ["photo1.cr2", "photo2.nef", "photo3.dng"] # All RAWlogger = logging.getLogger("validation")try: check_files_match_profile_type(files, profile, logger) print("✅ All files are compatible with this profile")except UploadError as e: print(f"❌ File validation failed: {e}")
# ❌ INVALID: RAW profile cannot process JPEG filesprofile.image_type = "RAW"files = ["photo1.jpg", "photo2.jpeg"]# Error: RAW profile cannot be used with JPG files: ['photo1.jpg', 'photo2.jpeg']
Solution: Use a JPEG profile or convert files to RAW format.
# ❌ INVALID: JPEG profile cannot process RAW filesprofile.image_type = "JPG"files = ["photo1.cr2", "photo2.nef"]# Error: JPG profile cannot be used with RAW files: ['photo1.cr2', 'photo2.nef']
Solution: Use a RAW profile or convert files to JPEG format.
# Get all profilesprofiles = await get_profiles("your_api_key")# Filter by name for specific use caseswedding_profiles = [ p for p in profiles if "wedding" in p.profile_name.lower()]portrait_profiles = [ p for p in profiles if "portrait" in p.profile_name.lower()]landscape_profiles = [ p for p in profiles if "landscape" in p.profile_name.lower()]
# Separate RAW and JPEG profilesraw_profiles = [p for p in profiles if p.image_type == "RAW"]jpeg_profiles = [p for p in profiles if p.image_type == "JPG"]print(f"RAW profiles: {len(raw_profiles)}")print(f"JPEG profiles: {len(jpeg_profiles)}")
# Filter by profile type/tierpremium_profiles = [ p for p in profiles if "premium" in p.profile_type.lower()]standard_profiles = [ p for p in profiles if "standard" in p.profile_type.lower()]