{"name":"piranha","display_name":"Piranha Vision, DevTools & Evolve","description":"Computer vision video analysis pipeline (pose detection, activity classification, identity verification, content generation), developer infrastructure services (job orchestration, caching), and autonomous self-improvement (prompt optimization from user feedback, model benchmarking, AI-augmented code quality).","version":"2.1.0","platform":"substrate","base_url":"https://pi.substrate-a2a.com","auth":{"type":"api_key","header":"X-API-Key","registration":"/api/v1/tenants/register","internal_bypass":{"description":"Keys starting with 'internal_' skip credit deduction and auth validation. Used for zero-cost cross-engine calls within the Phos ecosystem.","convention":"internal_<engine_name>","examples":["internal_piranha","internal_marketing","internal_sales"],"response_headers":{"X-Commerce-Mode":"internal","X-Credits-Charged":"0"}}},"billing":{"model":"credits","unit_usd":0.01,"balance_endpoint":"/api/credits/balance","purchase_url":"https://substrate-a2a.com/dashboard/credits"},"product_lines":["vision","devtools","evolve"],"capabilities":[{"id":"extract_frames","product_line":"vision","category":"video_processing","name":"Extract Video Frames","method":"POST","path":"/api/v1/services/frames","description":"Decode video into individual frames at configurable FPS with quality filtering","cost_credits":5,"compute":"light"},{"id":"extract_keypoints","product_line":"vision","category":"video_processing","name":"Extract Body Keypoints","method":"POST","path":"/api/v1/services/keypoints","description":"Detect 17-point COCO human skeleton keypoints per person using YOLOv8-pose","cost_credits":50,"compute":"gpu"},{"id":"detect_persons","product_line":"vision","category":"video_processing","name":"Detect Persons","method":"POST","path":"/api/v1/services/detect-persons","description":"Detect all persons in video frames with bounding boxes (lighter than keypoint extraction)","cost_credits":25,"compute":"gpu"},{"id":"track_persons","product_line":"vision","category":"video_processing","name":"Track Persons Across Frames","method":"POST","path":"/api/v1/services/track-persons","description":"Detect and track persons across video frames with consistent identity assignment","cost_credits":60,"compute":"gpu"},{"id":"classify_activity","product_line":"vision","category":"activity_analysis","name":"Classify Activity","method":"POST","path":"/api/v1/services/classify-activity","description":"Classify activity per frame with tiered labels, confidence scores, and per-person role assignments","cost_credits":75,"compute":"gpu+ai"},{"id":"detect_events","product_line":"vision","category":"activity_analysis","name":"Detect Temporal Events","method":"POST","path":"/api/v1/services/detect-events","description":"Identify significant events across the video timeline — transitions, completions, reversals","cost_credits":40,"compute":"ai"},{"id":"score_movement_quality","product_line":"vision","category":"activity_analysis","name":"Score Movement Quality","method":"POST","path":"/api/v1/services/score-movement","description":"Assess biomechanical quality of movements with per-frame execution scores (0-100)","cost_credits":60,"compute":"gpu+ai"},{"id":"generate_commentary","product_line":"vision","category":"activity_analysis","name":"Generate Activity Commentary","method":"POST","path":"/api/v1/services/commentary","description":"Generate play-by-play commentary and per-participant tactical coaching notes","cost_credits":30,"compute":"ai"},{"id":"detect_faces","product_line":"vision","category":"identity","name":"Detect Faces","method":"POST","path":"/api/v1/services/detect-faces","description":"Detect all faces in image or video using MTCNN with bounding boxes and landmarks","cost_credits":20,"compute":"gpu"},{"id":"extract_face_embedding","product_line":"vision","category":"identity","name":"Extract Face Embedding","method":"POST","path":"/api/v1/services/face-embedding","description":"Generate 512-dimensional face embedding vector for identity matching (VGGFace2)","cost_credits":25,"compute":"gpu"},{"id":"verify_identity","product_line":"vision","category":"identity","name":"Verify Identity","method":"POST","path":"/api/v1/services/verify-identity","description":"Compare two face embeddings and return cosine similarity with match verdict","cost_credits":5,"compute":"light"},{"id":"identify_persons_in_video","product_line":"vision","category":"identity","name":"Identify Persons in Video","method":"POST","path":"/api/v1/services/identify-in-video","description":"Match faces in video against reference embeddings — detection + embedding + matching in one call","cost_credits":40,"compute":"gpu"},{"id":"generate_video_overlay","product_line":"vision","category":"content_generation","name":"Generate Video Overlay","method":"POST","path":"/api/v1/services/video-overlay","description":"Render branded glassmorphism analysis overlays onto video frames, output composited MP4","cost_credits":40,"compute":"heavy"},{"id":"create_highlight_reel","product_line":"vision","category":"content_generation","name":"Create Highlight Reel","method":"POST","path":"/api/v1/services/highlight-reel","description":"Generate branded highlight reel with intro, per-event overlays, and summary outro","cost_credits":100,"compute":"heavy"},{"id":"analyze_video_full","product_line":"vision","category":"full_pipeline","name":"Full Video Analysis","method":"POST","path":"/api/v1/services/analyze-full","description":"End-to-end pipeline: frames → keypoints → tracking → classification → events → scoring → commentary (~35% savings vs. individual)","cost_credits":200,"compute":"gpu+ai"},{"id":"submit_job","product_line":"devtools","category":"task_orchestration","name":"Submit Async Job","method":"POST","path":"/api/v1/services/jobs","description":"Submit async job to Redis queue with idempotency guard, priority, and webhook callback","cost_credits":3,"compute":"light"},{"id":"get_job_status","product_line":"devtools","category":"task_orchestration","name":"Get Job Status","method":"GET","path":"/api/v1/services/jobs/{job_id}","description":"Check status, progress, and result of a submitted job","cost_credits":1,"compute":"read"},{"id":"cache_set","product_line":"devtools","category":"cache_infrastructure","name":"Cache Set","method":"POST","path":"/api/v1/services/cache","description":"Store value in Redis cache with configurable TTL and tag-based group invalidation","cost_credits":1,"compute":"light"},{"id":"cache_get","product_line":"devtools","category":"cache_infrastructure","name":"Cache Get","method":"GET","path":"/api/v1/services/cache/{key}","description":"Retrieve cached value by key","cost_credits":1,"compute":"read"},{"id":"cache_invalidate","product_line":"devtools","category":"cache_infrastructure","name":"Cache Invalidate","method":"DELETE","path":"/api/v1/services/cache","description":"Invalidate cache entries by key or tag (group invalidation)","cost_credits":1,"compute":"light"},{"id":"warm_cache","product_line":"devtools","category":"cache_infrastructure","name":"Warm Cache","method":"POST","path":"/api/v1/services/cache/warm","description":"Predictive cache warming with circuit breaker, debouncing, and concurrency limits","cost_credits":3,"compute":"light"},{"id":"analyze_correction_patterns","product_line":"evolve","category":"prompt_optimization","name":"Analyze Correction Patterns","method":"POST","path":"/api/v1/services/evolve/corrections/analyze","description":"Analyze user correction data to identify systematic AI errors — missed classifications, confusion pairs, per-label accuracy","cost_credits":15,"compute":"ai"},{"id":"generate_prompt_amendment","product_line":"evolve","category":"prompt_optimization","name":"Generate Prompt Amendment","method":"POST","path":"/api/v1/services/evolve/prompts/amend","description":"Auto-generate candidate prompt patch from correction analysis using AI, targeting identified weaknesses","cost_credits":50,"compute":"ai"},{"id":"evaluate_prompt_quality","product_line":"evolve","category":"prompt_optimization","name":"Evaluate Prompt Quality","method":"POST","path":"/api/v1/services/evolve/prompts/evaluate","description":"Compare candidate vs active prompt on golden evaluation set with per-criterion scoring","cost_credits":20,"compute":"ai"},{"id":"run_optimization_cycle","product_line":"evolve","category":"prompt_optimization","name":"Run Full Optimization Cycle","method":"POST","path":"/api/v1/services/evolve/prompts/optimize","description":"End-to-end: analyze corrections → generate amendment → evaluate → configure A/B test if improved (~20% savings vs individual)","cost_credits":125,"compute":"ai"},{"id":"create_golden_set","product_line":"evolve","category":"model_evaluation","name":"Create Golden Evaluation Set","method":"POST","path":"/api/v1/services/evolve/golden-sets","description":"Build evaluation dataset from user-corrected samples with consensus voting (weighted by expertise)","cost_credits":10,"compute":"light"},{"id":"run_benchmark","product_line":"evolve","category":"model_evaluation","name":"Run Model Benchmark","method":"POST","path":"/api/v1/services/evolve/benchmarks","description":"Benchmark AI model accuracy against golden set — returns accuracy, letter grade (A+ to F), error analysis","cost_credits":50,"compute":"ai"},{"id":"compare_models","product_line":"evolve","category":"model_evaluation","name":"Compare Model Performance","method":"POST","path":"/api/v1/services/evolve/benchmarks/compare","description":"Side-by-side model comparison on same golden set — accuracy, latency, cost efficiency ranking","cost_credits":75,"compute":"ai"},{"id":"scan_codebase","product_line":"evolve","category":"code_quality","name":"Scan Codebase Quality","method":"POST","path":"/api/v1/services/evolve/code/scan","description":"Comprehensive code quality scan: cyclomatic complexity, maintainability index, lint violations, dependency vulnerabilities","cost_credits":15,"compute":"light"},{"id":"generate_fix_pr","product_line":"evolve","category":"code_quality","name":"Generate Fix PR","method":"POST","path":"/api/v1/services/evolve/code/fix","description":"AI-generated code fixes from scan findings — creates GitHub PR with targeted improvements (never auto-merged)","cost_credits":125,"compute":"ai"},{"id":"run_quality_cycle","product_line":"evolve","category":"code_quality","name":"Run Full Quality Cycle","method":"POST","path":"/api/v1/services/evolve/code/cycle","description":"End-to-end: scan codebase → identify highest-impact fixes → generate fixes → create PR (~15% savings vs individual)","cost_credits":145,"compute":"ai"}],"health":"/health","docs":"/docs","rate_limits":{"default":"60 req/min","gpu_operations":"10 req/min","read_operations":"120 req/min"}}