{"message":"🏗️ ForgeRealm Digital Artifacts Engine","tagline":"Forge your digital artifacts","version":"1.0.0","cors_enabled":true,"status":"running","threading":{"max_workers":4,"active_workers":1,"queue_size":0},"forge_summary":{"active_forges":0,"completed_artifacts":7,"failed_attempts":4,"total_projects":11,"fusion_artifacts":0,"rag_artifacts":0,"rag_generated_images":0,"rag_optimized_images":0},"forge_modes":{"instant_forge":"POST /animate/image - Upload image → Animated 3D artifact","vision_forge":"POST /animate/prompt - Describe vision → AI-generated 3D artifact","location_forge":"POST /animate/coordinates - GPS coordinates → Digital twin from Street View","fusion_forge":"POST /animate/infuse - Blend elements → Unique hybrid artifacts","vision_analysis":"POST /animate/vision - Identify animatable objects with Llama 3.2 Vision","smart_animate":"POST /animate/smart - AI-powered selective animation with Llama 3.2 Vision","rag_forge":"POST /gen/gemini - RAG-based image generation with reference similarity","rag_optimize":"POST /gen/rag-optimize - Separate 3D optimization for RAG images","3d_optimize":"POST /optimize/3d - 🎯 NEW: Transform any image into 3D-model-ready format","wan_artisan":"POST /animate/wan - Advanced animation forging","luma_designer":"POST /animate/design - Professional design artifacts","pose_sculptor":"POST /design/poses - Character pose crafting","image_enhancer":"POST /design/edit - Artifact refinement","texture_master":"POST /retexture - Material enhancement","status":"GET /status/{job_id}","jobs":"GET /jobs","job_files":"GET /jobs/{job_id}/{path}","system_status":"GET /system/status"},"artisan_tools":{"fusion_forge":{"endpoint":"POST /animate/infuse","description":"🎭 Fuse two digital elements using AI vision and intelligent prompt generation","status_tracking":"Fusion artifacts are marked with isInfused: true for special handling","asset_management":{"automatic_s3_storage":"All source and fused artifacts automatically stored in cloud","artifact_tagging":"Elements tagged as source_artifact_1, source_artifact_2, fused_artifact, fused_artifact_3d_optimized","status_access":"All cloud URLs available in artifact status under infused_image_urls","metadata_persistence":"Fusion URLs preserved in artifact_metadata.json fusion_urls section","duplicate_prevention":"Smart validation prevents cross-project conflicts and ensures project-specific artifacts","upload_tracking":"isImagesUploaded flag prevents redundant uploads during project restoration"},"capabilities":["🔍 AI-powered image analysis with Llama Vision","🧠 Intelligent fusion prompt generation with Ollama/GPT","🎨 New artifact creation with Gemini AI","⚡ 3D optimization for enhanced model generation","🏗️ Advanced 3D model forging from optimized fusion","🎭 Multiple fusion styles: blend, merge, hybrid","☁️ Automatic cloud storage with organized tagging","📂 Structured fusion URL management in dedicated metadata","🛡️ Project-specific validation preventing cross-project conflicts","✅ Smart upload completion tracking preventing redundant operations"]},"wan_artisan":{"endpoint":"POST /animate/wan","description":"🎬 Animate digital artifacts using WAN 2.2 technology from WaveSpeed.ai","capabilities":["🎥 High-quality artifact animation with AI","📝 Customizable animation prompts","📺 Multiple resolution options (480p, 720p, 1080p)","🎞️ Optional reference video guidance","🎲 Reproducible results with seed control","⚡ Fast processing with real-time status updates"],"forge_parameters":{"image":"URL of the artifact to animate (required)","prompt":"Description of the animation to forge (required)","resolution":"Video resolution (default: 480p)","video":"Optional reference video URL for style guidance","seed":"Random seed for reproducible results (default: 42)"}},"smart_animate":{"endpoint":"POST /animate/smart","description":"🤖 AI-powered selective animation using Llama 3.2 Vision for intelligent object detection","features":["Llama 3.2 Vision analyzes image to identify all objects and characters","Intelligently crafts animation prompts that preserve non-animated elements","Only animates what you specify - everything else stays perfectly still","Preserves exact visual appearance, colors, textures, and lighting","Prevents unwanted changes to background or other scene elements","Natural and realistic animation for specified actions","Powered by Luma Ray 2 I2V animation technology","Real-time job tracking with detailed progress updates"],"workflow":["1. Upload image or provide URL","2. Llama 3.2 Vision analyzes entire scene and identifies all elements","3. AI crafts intelligent prompt that isolates animation target","4. Luma Ray 2 I2V animates only specified elements","5. Returns video with selective animation and preserved scene"],"use_cases":["Animate a character waving while keeping background static","Make a car move forward without changing the street scene","Animate character jumping without affecting surrounding objects","Create subtle movements (head turn, eye blink) while preserving everything else","Animate specific objects in complex scenes with multiple elements","Add general animation while freezing specific important assets (e.g., animate the scene but keep the main character frozen)"],"parameters":{"file":"Image file to animate (optional if image_url provided)","animation_prompt":"Simple description of what to animate (e.g., 'make the character jump')","image_url":"URL of image to animate (optional if file provided)","size":"Video resolution in 'width*height' format (default: 1280*720)","duration":"Video duration in seconds (default: 5)","preserve_background":"Keep background unchanged (default: true)","asset":"OPTIONAL - Specific asset to animate (e.g., 'the red car', 'the woman in blue'). When provided, ONLY this asset animates, everything else stays frozen.","freeze_assets":"OPTIONAL - Comma-separated list of assets to keep frozen (e.g., 'the character, the building, trees'). These assets will be explicitly prevented from animating."},"output":{"animation_url":"URL of the generated animated video","local_video_path":"Local path to the video file","scene_analysis":"Llama 3.2 Vision analysis of all scene elements","intelligent_prompt":"AI-crafted prompt used for selective animation","processing_time":"Total processing time in seconds","metadata":{"user_prompt":"Your original animation request","size":"Video resolution used","duration":"Video duration in seconds","workflow":"Step-by-step processing breakdown"}},"example":{"input":"Image of person standing in front of building","animation_prompt":"make the character wave","result":"Character waves naturally, building/background stay perfectly static"},"asset_example":{"input":"Image with multiple people and cars","animation_prompt":"move forward","asset":"the red car","result":"ONLY the red car moves forward, all people and other cars stay completely frozen"},"freeze_assets_example":{"input":"Street scene with people, cars, and trees swaying","animation_prompt":"add wind and movement","freeze_assets":"the character, the red car","result":"Trees and environment move with wind, but the character and red car stay completely frozen"}},"vision_analysis":{"endpoint":"POST /animate/vision","description":"🔍 Identify all animatable objects in an image using Llama 3.2 Vision AI","features":["Advanced object detection using Llama 3.2 Vision","Accurate parsing with presence indicators (there is, shows, depicts, etc.)","Identifies characters, animals, vehicles, and environmental elements","Extracts descriptive attributes (colors, sizes) for specific object identification","Confidence scores (high/medium/low) with numeric values (0.5-0.95)","Priority-based categorization (Priority 1-3) for animation suitability","Categorizes objects by animation potential (high/medium/low)","Provides animation suggestions for each detected object","Returns structured array of animatable elements sorted by confidence","Includes full scene analysis and context for each object","Works with uploaded files or image URLs","Prevents false positives - only reports actually visible objects","Multiple mention tracking increases confidence scores","Useful for planning animations before execution"],"use_cases":["Discover what can be animated in your image","Plan selective animations based on scene elements","Get animation suggestions for specific objects","Understand scene complexity before animating","Identify the best elements to animate for impact"],"parameters":{"file":"Image file to analyze (optional if image_url provided)","image_url":"URL of image to analyze (optional if file provided)"},"output":{"animatable_objects":"Array of objects with name, category, confidence, confidence_score, description, and animation potential","object_count":"Total number of animatable objects found","high_confidence_count":"Number of objects detected with high confidence","full_analysis":"Complete scene analysis from Llama 3.2 Vision","recommendations":"AI suggestions for animation approaches based on detected objects","usage_tip":"Guidance for using results with other endpoints"},"object_categories":["characters (people, humans, figures) - Priority 1","animals (pets, creatures) - Priority 1","vehicles (cars, bikes, boats) - Priority 1","nature (trees, plants, water) - Priority 2","objects (items, things) - Priority 2","environment (buildings, furniture) - Priority 3"],"confidence_levels":{"high":"0.85-0.95 - Object clearly visible with presence indicators","medium":"0.60-0.75 - Object mentioned with some context","low":"0.50 - Object mentioned without strong indicators"},"example_response":{"animatable_objects":[{"name":"red car","category":"vehicles","confidence":"high","confidence_score":0.85,"description":"The image shows a red car in the foreground","animation_potential":"high","suggested_animations":["driving forward","moving","wheels turning"]}],"high_confidence_count":1}},"luma_ray_design":{"endpoint":"POST /animate/design","description":"Create high-quality video animations from uploaded images using Luma Ray 2 I2V technology","features":["Image-to-video animation using Luma Ray 2 I2V AI","Customizable animation prompts for motion description","Multiple video resolution options","Configurable animation duration","Optional GIF conversion with ffmpeg","Local video file storage in job directories","Real-time processing status updates"],"parameters":{"file":"Image file to animate (required)","prompt":"Animation prompt describing motion/action (default: 'keep the same style; make him jump like there is no tomorrow')","size":"Video resolution in 'width*height' format (default: '1280*720')","duration":"Video duration in seconds (default: '5')","also_make_gif":"Also create GIF version (default: false)"},"output":{"video_url":"Direct download URL from Luma Ray API","local_video_path":"Local MP4 file path in job directory","gif_path":"Local GIF file path (if requested and ffmpeg available)","processing_time":"Total animation processing time in seconds","api_job_id":"Luma Ray API job identifier for tracking"}},"design_poses":{"endpoint":"POST /design/poses","description":"Generate character poses using Segmind workflow and create 3D models","features":["Character pose generation using Segmind workflow API","Automatic 3D model generation from poses image","S3 upload for both poses image and 3D model GLB file","Real-time processing status updates","Metadata persistence for poses and 3D model URLs"],"parameters":{"character_image":"URL of the character image to generate poses for (required)","job_id":"Optional job ID for tracking and organization","timeout_seconds":"Request timeout in seconds (default: 300)"},"output":{"image_output":"Direct poses image URL from Segmind API","local_image_path":"Local poses image file path in job directory","poses_s3_url":"Direct S3 URL for poses image","poses_s3_presigned_url":"Presigned S3 URL for poses image (7 days)","poses_3d_model_local":"Local 3D model GLB file path","poses_3d_model_s3_url":"Presigned S3 URL for 3D model GLB","poses_3d_model_generated":"Boolean indicating if 3D model was successfully generated","processing_time_seconds":"Total processing time in seconds","request_id":"Segmind API request identifier for tracking"}},"rag_forge":{"endpoint":"POST /gen/gemini","description":"🔍 RAG-based image generation with reference similarity and 3D optimization","features":["FAISS vector database with CLIP embeddings for reference image retrieval","Gemini 2.5 Flash Image model for AI-generated images","Automatic 3D optimization using mapapi for model-ready images","Database-only storage with base64 encoding and S3 upload","Configurable reference image count (k-value)","Real-time processing status updates with detailed progress","Temporary file processing with automatic cleanup"],"parameters":{"prompt":"Text description for image generation (required)","k":"Number of reference images to retrieve from RAG index (default: 3)","job_id":"Optional job ID for tracking and organization"},"output":{"generated_image_s3_url":"S3 URL for the RAG-generated image","optimized_3d_image_s3_url":"S3 URL for the 3D-optimized version","generated_image_base64":"Base64 encoded image data stored in database","optimized_3d_image_base64":"Base64 encoded optimized image data","objects_analysis":"AI analysis results for 3D optimization","reference_images":"Metadata about retrieved reference images","3d_optimization_success":"Boolean indicating optimization success","storage_type":"Database-only storage confirmation"}},"rag_optimize":{"endpoint":"POST /gen/rag-optimize","description":"⚡ Separate 3D optimization for existing RAG-generated images","features":["Post-processing optimization for RAG-generated images","Database-only workflow with temporary file processing","Advanced object analysis using mapapi.analyze_image_with_llama","3D model preparation using mapapi.generate_image_with_gemini","Automatic S3 upload with organized file naming","Real-time progress tracking and status updates"],"parameters":{"job_id":"Job ID of existing RAG generation to optimize (required)","optimization_prompt":"Custom prompt for optimization (optional)"},"output":{"optimized_image_s3_url":"S3 URL for the optimized image","optimized_image_base64":"Base64 encoded optimized image data","source_image_s3_url":"Original RAG-generated image S3 URL","objects_analysis":"Detailed object analysis for 3D optimization","optimization_timestamp":"Processing completion timestamp","separate_optimization":"Flag indicating this was separate optimization"}},"3d_optimize":{"endpoint":"POST /optimize/3d","description":"🎯 Transform any image into a 3D-model-ready format with AI-powered optimization","features":["Accepts Gemini-generated images, uploaded files, or image URLs","AI vision analysis to understand image content","Auto-generates optimization prompt or accepts custom prompts","Removes/neutralizes backgrounds for clean 3D reconstruction","Optimizes camera angle for better 3D capture","Enhances textures for PBR-ready materials","Improves lighting for even texture baking","Database and S3 storage with base64 encoding","Real-time progress tracking"],"use_cases":["Prepare Gemini-generated images for 3D model creation","Clean up photos for photogrammetry workflows","Convert concept art into 3D-ready references","Optimize character designs for 3D rigging","Improve texture quality for game assets"],"parameters":{"file":"Image file to optimize (optional if image_url provided)","image_url":"URL of image to optimize (optional if file provided)","prompt":"Custom optimization instructions (optional - auto-generated if not provided)","job_id":"Optional job ID for tracking"},"workflow_integration":{"node_type":"optimize_3d","config":{"image_url":"Auto-extracted from previous node output","prompt":"Optional custom optimization prompt"},"example_workflow":["1. generate_image: Create image with Gemini","2. optimize_3d: Optimize for 3D model generation","3. generate_3d: Create 3D model from optimized image"]},"output":{"job_id":"Tracking ID for the optimization job","original_image_s3_url":"S3 URL of original image","optimized_3d_image_s3_url":"S3 URL of optimized image (ready for 3D)","has_base64_data":"Boolean indicating base64 data availability","objects_analysis":"AI analysis of image content","message":"Success message with next steps"},"example_curl":"curl -X POST \"http://localhost:8000/optimize/3d\" -F \"image_url=https://example.com/character.jpg\" -F \"prompt=Optimize for 3D character modeling\""},"file_serving":{"endpoint":"GET /jobs/{job_id}/{path}","description":"Serve static files from job directories (GLB models, images, videos, etc.)","features":["Direct file access for job-generated content","Automatic MIME type detection","Special handling for 3D model files (.glb, .gltf)","Security validation to prevent directory traversal","Support for all file types generated by the API"],"parameters":{"job_id":"The job identifier (required)","path":"Relative path to the file within the job directory (required)"},"examples":{"glb_model":"/jobs/{job_id}/models/model.glb","poses_image":"/jobs/{job_id}/character_poses.png","video":"/jobs/{job_id}/animation.mp4","metadata":"/jobs/{job_id}/job_metadata.json"},"security":"Path validation prevents access to files outside job directories"}}}