Skip to content
github-actions[bot] edited this page Apr 23, 2026 · 20 revisions

API Mappings

Auto-generated from route files in src/routes/. Do not edit manually.

Generated: 2026-04-23 | Source: scripts/wiki/generate_api_mappings.py


Summary

Metric Count
Route files 57
Total endpoints 431
V1 endpoints (OpenAI/Anthropic compatible) 50
Non-V1 endpoints 381

Table of Contents

  1. Activity (2 endpoints, prefix: /)
  2. Admin (31 endpoints, prefix: /)
  3. Analytics (3 endpoints, prefix: /)
  4. Api Key Monitoring (2 endpoints, prefix: /)
  5. Api Keys (5 endpoints, prefix: /)
  6. Api Models (1 endpoints, prefix: /)
  7. Audio (2 endpoints, prefix: /v1)
  8. Audit (1 endpoints, prefix: /)
  9. Auth (5 endpoints, prefix: /)
  10. Availability (11 endpoints, prefix: /)
  11. Catalog (27 endpoints, prefix: /v1)
  12. Chat (1 endpoints, prefix: /v1)
  13. Chat History (15 endpoints, prefix: /)
  14. Circuit Breaker Status (3 endpoints, prefix: /)
  15. Code Router (5 endpoints, prefix: /)
  16. Coupons (10 endpoints, prefix: /)
  17. Credits (6 endpoints, prefix: /)
  18. Detailed Status (1 endpoints, prefix: /v1)
  19. Diagnostics (3 endpoints, prefix: /)
  20. Downtime Logs (8 endpoints, prefix: /)
  21. Error Monitor (13 endpoints, prefix: /)
  22. General Router (5 endpoints, prefix: /)
  23. Grafana Metrics (6 endpoints, prefix: /)
  24. Health (26 endpoints, prefix: /)
  25. Health Timeline (3 endpoints, prefix: /)
  26. Images (1 endpoints, prefix: /v1)
  27. Instrumentation (9 endpoints, prefix: /)
  28. Ip Whitelist (6 endpoints, prefix: /)
  29. Live Model Test (2 endpoints, prefix: /)
  30. Model Health (6 endpoints, prefix: /v1)
  31. Model Sync (12 endpoints, prefix: /)
  32. Models Catalog Management (16 endpoints, prefix: /)
  33. Monitoring (21 endpoints, prefix: /)
  34. Nosana (20 endpoints, prefix: /)
  35. Notifications (6 endpoints, prefix: /)
  36. Ops Dashboard (2 endpoints, prefix: /)
  37. Optimization Monitor (5 endpoints, prefix: /)
  38. Partner Trials (7 endpoints, prefix: /)
  39. Payments (14 endpoints, prefix: /)
  40. Ping (2 endpoints, prefix: /)
  41. Plans (9 endpoints, prefix: /)
  42. Prometheus Data (8 endpoints, prefix: /)
  43. Prometheus Grafana (5 endpoints, prefix: /)
  44. Provider Credits (3 endpoints, prefix: /)
  45. Providers Management (13 endpoints, prefix: /)
  46. Ranking (2 endpoints, prefix: /)
  47. Rate Limits (12 endpoints, prefix: /)
  48. Referral (4 endpoints, prefix: /)
  49. Roles (5 endpoints, prefix: /)
  50. Root (1 endpoints, prefix: /)
  51. Share (2 endpoints, prefix: /)
  52. Status Page (8 endpoints, prefix: /v1)
  53. System (16 endpoints, prefix: /)
  54. Tools (4 endpoints, prefix: /v1)
  55. Transaction Analytics (2 endpoints, prefix: /)
  56. Trial Analytics (6 endpoints, prefix: /)
  57. Users (7 endpoints, prefix: /)

Activity

File: src/routes/activity.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /log get_activity_log Get paginated activity log for the authenticated user
GET /stats get_activity_stats Get aggregated activity statistics for the authenticated user

Admin

File: src/routes/admin.py | Prefix: (root) | Endpoints: 31

Method Path Function Description
POST /admin/add_credits admin_add_credits
GET /admin/api-keys/{api_key_id} get_api_key_details_by_id Get complete API key details by ID including user information (Admin only).
GET /admin/balance admin_get_all_balances
GET /admin/cache-status admin_cache_status
POST /admin/clear-rate-limit-cache admin_clear_rate_limit_cache Clear rate limit configuration cache to force reload from database
GET /admin/credit-transactions get_all_credit_transactions_admin Get all credit transactions across all users (Admin only)
GET /admin/debug-models admin_debug_models Debug models and providers data for troubleshooting
GET /admin/huggingface-cache-status admin_huggingface_cache_status Get Hugging Face cache status and statistics
POST /admin/limit admin_set_rate_limit
GET /admin/model-usage-analytics get_model_usage_analytics Admin endpoint to get model usage analytics with pagination and search.
GET /admin/monitor admin_monitor
GET /admin/monitoring/chat-requests get_chat_completion_requests_admin Get chat completion requests with flexible filtering (Admin only).
GET /admin/monitoring/chat-requests/by-api-key get_chat_completion_requests_by_api_key_admin Get paginated chat completion requests for a specific API key (Admin only).
GET /admin/monitoring/chat-requests/counts get_request_counts_by_model_admin Get request counts for each model - lightweight endpoint (Admin only).
GET /admin/monitoring/chat-requests/models get_models_with_requests_admin Get all unique models that have chat completion requests (Admin only).
GET /admin/monitoring/chat-requests/plot-data get_chat_requests_plot_data_admin Get optimized chat completion request data for plotting graphs (Admin only).
GET /admin/monitoring/chat-requests/providers get_providers_with_requests_admin Get all providers that have models with chat completion requests (Admin only).
GET /admin/monitoring/chat-requests/summary get_chat_requests_summary_admin Get aggregated summary statistics for chat completion requests (Admin only).
GET /admin/pricing-audit run_pricing_audit Run a pricing audit comparing live provider catalogs against database pricing.
POST /admin/refresh-huggingface-cache admin_refresh_huggingface_cache Clear Hugging Face cache to force refresh on the next request
POST /admin/refresh-providers admin_refresh_providers
GET /admin/test-huggingface/{hugging_face_id} admin_test_huggingface Test Hugging Face API response for debugging
GET /admin/trial/analytics get_trial_analytics_admin Get trial analytics and conversion metrics for admin
GET /admin/users get_all_users_info Get users information with search and pagination (Admin only)
GET /admin/users/by-api-key get_user_by_api_key Get user information by exact API key match (Admin only)
DELETE /admin/users/by-domain/{domain} delete_users_by_domain Delete all users with emails from a specific domain (Admin only)
GET /admin/users/count get_users_count Get total user count (Admin only)
GET /admin/users/growth get_user_growth Get user growth data over time (Admin only)
GET /admin/users/stats get_users_stats Get user statistics without fetching user data (Admin only)
GET /admin/users/{user_id} get_user_info_by_id Get detailed information for a specific user (Admin only)
POST /create create_api_key Create an API key for the user after dashboard login

Analytics

File: src/routes/analytics.py | Prefix: (root) | Endpoints: 3

Method Path Function Description
POST /batch log_batch_events Log multiple analytics events in batch to both Statsig and PostHog
POST /events log_event Log an analytics event to both Statsig and PostHog via backend
POST /session/start log_session_start Log a session start event for DAU/WAU/MAU tracking.

Api Key Monitoring

File: src/routes/api_key_monitoring.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /api-key-tracking-quality get_api_key_tracking_quality Get API key tracking quality metrics.
GET /api-key-tracking-trend get_api_key_tracking_trend Get API key tracking quality trend over time.

Api Keys

File: src/routes/api_keys.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
POST /user/api-keys create_user_api_key Create a new API key for the user
GET /user/api-keys list_user_api_keys Get all API keys for the authenticated user
GET /user/api-keys/usage get_user_api_key_usage Get usage statistics for all API keys of the user
PUT /user/api-keys/{key_id} update_user_api_key_endpoint Update an existing API key for the user
DELETE /user/api-keys/{key_id} delete_user_api_key Delete an API key for the user

Api Models

File: src/routes/api_models.py | Prefix: (root) | Endpoints: 1

Method Path Function Description
GET /models/detail get_model_detail Get specific model details using query parameters.

Audio

File: src/routes/audio.py | Prefix: /v1 | Endpoints: 2

Method Path Function Description
POST /v1/transcriptions create_transcription Transcribe audio using OpenAI Whisper or compatible services.
POST /v1/transcriptions/base64 create_transcription_base64 Transcribe base64-encoded audio.

Audit

File: src/routes/audit.py | Prefix: (root) | Endpoints: 1

Method Path Function Description
GET /user/api-keys/audit-logs get_user_audit_logs Get audit logs for the user's API keys (Phase 4 feature)

Auth

File: src/routes/auth.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
POST /auth privy_auth Authenticate user via Privy and return API key
GET /auth/health auth_health_check Dedicated health check endpoint for authentication service.
POST /auth/password-reset request_password_reset Request password reset email
POST /auth/register register_user Register a new user with username and email
POST /auth/reset-password reset_password Reset password using token

Availability

File: src/routes/availability.py | Prefix: (root) | Endpoints: 11

Method Path Function Description
GET /availability/best/{model_id} get_best_available_model Get the best available model with fallbacks
GET /availability/check/{model_id} check_model_availability Quick availability check for a model
GET /availability/fallback/{model_id} get_fallback_models Get fallback models for a given model
POST /availability/maintenance/{model_id} set_maintenance_mode Set maintenance mode for a model
DELETE /availability/maintenance/{model_id} clear_maintenance_mode Clear maintenance mode for a model
GET /availability/model/{model_id} get_model_availability Get availability status for a specific model
GET /availability/models get_available_models Get available models with enhanced reliability features
POST /availability/monitoring/start start_availability_monitoring Start availability monitoring service
POST /availability/monitoring/stop stop_availability_monitoring Stop availability monitoring service
GET /availability/status get_availability_status Get simple availability status for quick checks
GET /availability/summary get_availability_summary Get availability summary across all models

Catalog

File: src/routes/catalog.py | Prefix: /v1 | Endpoints: 27

Method Path Function Description
GET /v1/gateway/{gateway}/stats get_gateway_statistics Get comprehensive statistics for a specific gateway
GET /v1/gateways get_gateways Get all available gateway providers with their display configuration.
GET /v1/gateways/status get_gateways_status Get diagnostic status for all gateways including error states and model counts.
GET /v1/gateways/summary get_all_gateways_summary_endpoint Get summary statistics for all gateways
GET /v1/huggingface/author/{author}/models list_author_models_endpoint List all models from a specific HuggingFace author or organization.
GET /v1/huggingface/discovery discover_huggingface_models Discover HuggingFace models using the official Hub SDK.
GET /v1/huggingface/models/{model_id:path}/card get_huggingface_model_card_endpoint Retrieve the model card (README) for a HuggingFace model.
GET /v1/huggingface/models/{model_id:path}/details get_huggingface_model_details_endpoint Get detailed information about a specific HuggingFace model.
GET /v1/huggingface/models/{model_id:path}/files get_model_files_endpoint Get information about all files in a HuggingFace model repository.
GET /v1/huggingface/search search_huggingface_models_endpoint Search for HuggingFace models by query.
GET /v1/models get_all_models
POST /v1/models/batch-compare batch_compare_models_api
GET /v1/models/low-latency get_low_latency_models_api Get models optimized for low latency.
GET /v1/models/search search_models Advanced model search with multiple filters.
GET /v1/models/trending get_trending_models_api
GET /v1/models/unique get_unique_models_with_providers Get unique models with their provider information.
GET /v1/models/{developer_name} get_developer_models_api
GET /v1/models/{provider_name}/{model_name:path} get_specific_model_api
GET /v1/models/{provider_name}/{model_name:path} get_specific_model_api_legacy Legacy endpoint without /v1/ prefix for backward compatibility
GET /v1/models/{provider_name}/{model_name:path}/compare compare_model_gateways_api
GET /v1/modelz/check/{model_id} check_model_on_modelz Check if a specific model exists on Modelz.
GET /v1/modelz/ids get_modelz_model_ids_endpoint Get a list of model IDs that exist on Modelz.
GET /v1/modelz/models get_modelz_models Get models that exist on Modelz with optional graduation filter.
GET /v1/provider get_providers Get all available provider list with detailed metric data including model count
GET /v1/provider/{provider_name}/stats get_provider_statistics Get comprehensive statistics for a specific provider
GET /v1/provider/{provider_name}/top-models get_provider_top_models_endpoint Get top models for a specific provider
GET /v1/routers get_intelligent_routers Get available intelligent routers with configurations.

Chat

File: src/routes/chat.py | Prefix: /v1 | Endpoints: 1

Method Path Function Description
POST /v1/chat/completions chat_completions

Chat History

File: src/routes/chat_history.py | Prefix: (root) | Endpoints: 15

Method Path Function Description
POST /feedback submit_feedback Submit feedback for a chat message (thumbs up, thumbs down, etc.)
GET /feedback get_my_feedback Get the authenticated user's feedback history.
GET /feedback/stats get_my_feedback_stats Get aggregated feedback statistics for the authenticated user.
PUT /feedback/{feedback_id} update_my_feedback Update an existing feedback record.
DELETE /feedback/{feedback_id} delete_my_feedback Delete a feedback record.
POST /search search_sessions Search chat sessions by title or message content
POST /sessions create_session Create a new chat session
GET /sessions get_sessions Get all chat sessions for the authenticated user
GET /sessions/{session_id} get_session Get a specific chat session with messages
PUT /sessions/{session_id} update_session Update a chat session
DELETE /sessions/{session_id} delete_session Delete a chat session
GET /sessions/{session_id}/feedback get_session_feedback Get all feedback for a specific chat session.
POST /sessions/{session_id}/messages save_message Save a message to a chat session (accepts JSON body)
POST /sessions/{session_id}/messages/batch save_messages_batch OPTIMIZATION: Save multiple messages in a single request
GET /stats get_stats Get chat session statistics for the authenticated user

Circuit Breaker Status

File: src/routes/circuit_breaker_status.py | Prefix: (root) | Endpoints: 3

Method Path Function Description
POST /reset-all reset_all_provider_circuit_breakers Manually reset all circuit breakers to CLOSED state.
GET /{provider} get_circuit_breaker_state Get current state of a specific provider's circuit breaker.
POST /{provider}/reset reset_provider_circuit_breaker Manually reset a circuit breaker to CLOSED state.

Code Router

File: src/routes/code_router.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
GET /settings/options get_code_router_settings_options Get available settings options for the code router.
POST /settings/validate validate_code_router_settings Validate code router settings and return the resulting model string.
GET /stats get_code_router_stats Get code router statistics and performance metrics.
POST /test test_code_routing Test code routing without making an actual inference call.
GET /tiers get_code_router_tiers Get information about model tiers.

Coupons

File: src/routes/coupons.py | Prefix: (root) | Endpoints: 10

Method Path Function Description
POST /admin/coupons create_coupon_endpoint Create a new coupon (Admin only)
GET /admin/coupons list_coupons_endpoint List all coupons with filters (Admin only)
GET /admin/coupons/stats/overview get_coupon_stats_endpoint Get system-wide coupon statistics (Admin only)
GET /admin/coupons/{coupon_id} get_coupon_endpoint Get a specific coupon by ID (Admin only)
PATCH /admin/coupons/{coupon_id} update_coupon_endpoint Update a coupon (Admin only)
DELETE /admin/coupons/{coupon_id} deactivate_coupon_endpoint Deactivate a coupon (Admin only)
GET /admin/coupons/{coupon_id}/analytics get_coupon_analytics_endpoint Get detailed analytics for a coupon (Admin only)
GET /coupons/available get_available_coupons Get all coupons available for the current user
GET /coupons/history get_redemption_history Get redemption history for the current user
POST /coupons/redeem redeem_coupon_endpoint Redeem a coupon code

Credits

File: src/routes/credits.py | Prefix: (root) | Endpoints: 6

Method Path Function Description
POST /credits/add add_credits_endpoint Add credits to a user account.
POST /credits/adjust adjust_credits_endpoint Adjust credits for a user account (add or remove).
POST /credits/bulk-add bulk_add_credits_endpoint Add credits to multiple users at once.
POST /credits/refund refund_credits_endpoint Refund credits to a user account.
GET /credits/summary get_credits_summary_endpoint Get credit summary and analytics.
GET /credits/transactions get_credits_transactions_endpoint Get credit transactions with advanced filtering.

Detailed Status

File: src/routes/detailed_status.py | Prefix: /v1 | Endpoints: 1

Method Path Function Description
GET /v1/detailed get_detailed_status Get detailed internal system status.

Diagnostics

File: src/routes/diagnostics.py | Prefix: (root) | Endpoints: 3

Method Path Function Description
GET /concurrency get_concurrency_stats Get real-time concurrency gate statistics.
GET /health diagnostics_health Health check endpoint for diagnostics API.
GET /provider-timing get_provider_timing_summary Get summary of provider response times from Prometheus metrics.

Downtime Logs

File: src/routes/downtime_logs.py | Prefix: (root) | Endpoints: 8

Method Path Function Description
GET /admin/downtime/incidents list_downtime_incidents List downtime incidents (admin only).
GET /admin/downtime/incidents/ongoing list_ongoing_incidents List all ongoing downtime incidents (admin only).
GET /admin/downtime/incidents/{incident_id} get_downtime_incident Get details of a specific downtime incident (admin only).
GET /admin/downtime/incidents/{incident_id}/analysis analyze_incident_logs Analyze logs for a downtime incident (admin only).
POST /admin/downtime/incidents/{incident_id}/capture-logs trigger_log_capture Manually trigger log capture for an ongoing incident (admin only).
GET /admin/downtime/incidents/{incident_id}/logs get_incident_logs Get logs for a specific downtime incident (admin only).
POST /admin/downtime/incidents/{incident_id}/resolve resolve_downtime_incident Manually resolve a downtime incident (admin only).
GET /admin/downtime/statistics get_downtime_statistics Get downtime statistics (admin only).

Error Monitor

File: src/routes/error_monitor.py | Prefix: (root) | Endpoints: 13

Method Path Function Description
GET /autonomous/status autonomous_monitor_status Get autonomous monitoring status.
GET /dashboard error_dashboard Get comprehensive error dashboard data.
GET /errors/critical get_critical_errors Get critical and high-severity errors.
GET /errors/fixable get_fixable_errors Get errors that can be automatically fixed.
GET /errors/patterns get_error_patterns Get tracked error patterns.
GET /errors/recent get_recent_errors Get recent errors from logs.
POST /fixes/generate-batch generate_fixes_batch Generate fixes for multiple errors.
POST /fixes/generate-for-error generate_fix_for_error Generate a fix for a specific error.
GET /fixes/generated get_generated_fixes Get all generated fixes.
GET /fixes/{fix_id} get_fix_details Get details of a specific fix.
GET /health monitor_health Check if error monitoring is enabled with detailed status.
POST /monitor/scan scan_for_errors Trigger a manual scan for errors.
POST /monitor/start start_continuous_monitoring Start continuous error monitoring.

General Router

File: src/routes/general_router.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
GET /fallback-models get_fallback_models Get fallback models configuration.
GET /models get_available_models Get models available for NotDiamond routing.
GET /settings/options get_general_router_settings_options Get available settings options for general router.
GET /stats get_general_router_stats Get general router statistics.
POST /test test_general_routing Test routing without making inference call.

Grafana Metrics

File: src/routes/grafana_metrics.py | Prefix: (root) | Endpoints: 6

Method Path Function Description
GET /api/metrics/grafana-queries grafana_queries Get PromQL queries for Grafana dashboard panels.
GET /api/metrics/health metrics_health Health check for metrics collection.
GET /api/metrics/status metrics_status Get metrics service status.
GET /api/metrics/summary metrics_summary Get structured metrics summary for dashboard overview.
POST /api/metrics/test test_metrics Generate test metrics for verification.
GET /metrics prometheus_metrics Prometheus metrics endpoint.

Health

File: src/routes/health.py | Prefix: (root) | Endpoints: 26

Method Path Function Description
GET /health health_check Simple health check endpoint
GET /health/all get_all_health Get comprehensive health information for all components.
GET /health/catalog/models get_catalog_models Get ALL models from the model catalog (not just health-tracked ones)
GET /health/catalog/providers get_catalog_providers Get ALL providers/gateways from the gateway registry (not just health-tracked on
POST /health/check perform_health_check Trigger health check (deprecated)
POST /health/check/now perform_immediate_health_check Perform immediate health check (deprecated)
GET /health/dashboard get_health_dashboard Get complete health dashboard data for frontend
GET /health/database database_health Check database connectivity and health with retry logic for transient failures
GET /health/google-vertex check_google_vertex_health Check Google Vertex AI provider health
GET /health/insights get_health_insights Get actionable health insights with detailed breakdown.
GET /health/model/{model_id} get_model_health Get health metrics for a specific model
GET /health/models get_models_health Get health metrics for all models
GET /health/models/stats get_models_health_stats Get health statistics for all models.
POST /health/monitoring/start start_health_monitoring Start health monitoring service (deprecated)
GET /health/monitoring/status get_monitoring_status Get monitoring service status
POST /health/monitoring/stop stop_health_monitoring Stop health monitoring service (deprecated)
GET /health/provider/{provider} get_provider_health Get health metrics for a specific provider
GET /health/providers get_providers_health Get health metrics for all providers
GET /health/providers/import-status get_provider_import_status Check provider import status (for debugging)
GET /health/providers/stats get_providers_health_stats Get health statistics for all providers.
GET /health/quick health_quick Ultra-fast health check - no database, no Redis, no I/O operations.
GET /health/railway health_railway Railway-specific health check with validation and transient failure handling
GET /health/status get_health_status Get simple health status for quick checks
GET /health/summary get_health_summary Get comprehensive health summary
GET /health/system get_system_health Get overall system health metrics
GET /health/uptime get_uptime_metrics Get uptime metrics for frontend integration

Health Timeline

File: src/routes/health_timeline.py | Prefix: (root) | Endpoints: 3

Method Path Function Description
GET /health/gateways/uptime get_gateways_uptime Get gateway uptime timeline with time-bucketed samples.
GET /health/models/uptime get_models_uptime Get model uptime timeline with time-bucketed samples.
GET /health/providers/uptime get_providers_uptime Get provider uptime timeline with time-bucketed samples.

Images

File: src/routes/images.py | Prefix: /v1 | Endpoints: 1

Method Path Function Description
POST /v1/images/generations generate_images OpenAI-compatible image generation endpoint.

Instrumentation

File: src/routes/instrumentation.py | Prefix: (root) | Endpoints: 9

Method Path Function Description
GET /config instrumentation_config Get complete instrumentation configuration.
GET /environment-variables environment_variables Get instrumentation-related environment variables.
GET /health instrumentation_health Get instrumentation health status.
GET /loki/status loki_status Get Loki logging status and configuration.
GET /otel/status otel_status Get detailed OpenTelemetry status.
GET /tempo/status tempo_status Get Tempo tracing status and configuration.
POST /test-log test_log Generate a test log for verification.
POST /test-trace test_trace Generate a test trace for verification with force flush.
GET /trace-context get_trace_context Get current trace and span context.

Ip Whitelist

File: src/routes/ip_whitelist.py | Prefix: (root) | Endpoints: 6

Method Path Function Description
POST /api/admin/ip-whitelist create_ip_whitelist Create a new IP whitelist entry
GET /api/admin/ip-whitelist list_ip_whitelists List IP whitelist entries
POST /api/admin/ip-whitelist/check check_ip_whitelist Check if an IP address is whitelisted
GET /api/admin/ip-whitelist/{entry_id} get_ip_whitelist Get a specific IP whitelist entry
PATCH /api/admin/ip-whitelist/{entry_id} update_ip_whitelist Update an IP whitelist entry
DELETE /api/admin/ip-whitelist/{entry_id} delete_ip_whitelist Delete an IP whitelist entry

Live Model Test

File: src/routes/live_model_test.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
POST /run run_live_model_test Run a live inference test against all (or filtered) catalog models.
GET /status get_live_test_status Check if the live test endpoint is available.

Model Health

File: src/routes/model_health.py | Prefix: /v1 | Endpoints: 6

Method Path Function Description
GET /v1/model-health get_all_model_health Get health metrics for all monitored models.
GET /v1/model-health/provider/{provider}/summary get_provider_health_summary Get health summary for all models from a specific provider.
GET /v1/model-health/providers get_all_providers Get list of all providers with health data.
GET /v1/model-health/stats get_model_health_stats Get aggregate statistics for model health tracking.
GET /v1/model-health/unhealthy get_unhealthy_models Get models with high error rates (unhealthy models).
GET /v1/model-health/{provider}/{model} get_model_health Get health metrics for a specific provider-model combination.

Model Sync

File: src/routes/model_sync.py | Prefix: (root) | Endpoints: 12

Method Path Function Description
POST /all sync_all_provider_models Sync models from all providers (or specified list)
DELETE /flush-models flush_models Flush (delete all records from) the models table
DELETE /flush-providers flush_providers Flush (delete all records from) the providers table (cascades to models)
POST /full trigger_full_provider_and_model_sync Trigger a complete sync of providers and models
GET /health get_scheduled_sync_health Get health status of scheduled model sync service.
POST /incremental sync_incremental 🚀 Incremental Sync with Change Detection (Recommended)
POST /provider/{provider_slug} sync_single_provider Sync models from a specific provider's API to database
GET /providers list_available_providers Get list of providers that can be synced
POST /providers-only sync_providers_only Refresh provider registry cache from database.
POST /reset-and-resync reset_and_resync Atomic operation: Flush models table and immediately resync from providers
GET /status get_sync_status Get current sync status and statistics
POST /trigger trigger_manual_sync Manually trigger a model sync job.

Models Catalog Management

File: src/routes/models_catalog_management.py | Prefix: (root) | Endpoints: 16

Method Path Function Description
GET / list_models Get all models with optional filters
POST / create_model_endpoint Create a new model
POST /bulk bulk_create_models_endpoint Create multiple models at once
POST /bulk-upsert bulk_upsert_models_endpoint Upsert multiple models at once (insert or update if exists)
GET /health/{health_status} get_models_by_health Get models by health status
GET /provider/{provider_slug} get_models_by_provider Get all models for a specific provider
GET /search search_models_endpoint Search models by name, model_id, or description
GET /stats get_model_statistics Get model statistics
POST /upsert upsert_model_endpoint Upsert a model (insert or update if exists)
GET /{model_id} get_model Get a specific model by ID
PATCH /{model_id} update_model_endpoint Update a model
DELETE /{model_id} delete_model_endpoint Delete a model (hard delete)
POST /{model_id}/activate activate_model_endpoint Activate a model
POST /{model_id}/deactivate deactivate_model_endpoint Deactivate a model (soft delete)
PATCH /{model_id}/health update_model_health_endpoint Update model health status
GET /{model_id}/health/history get_model_health_history_endpoint Get health check history for a model

Monitoring

File: src/routes/monitoring.py | Prefix: (root) | Endpoints: 21

Method Path Function Description
GET /anomalies get_anomalies Get detected anomalies in metrics.
GET /chat-requests get_chat_completion_requests Get chat completion requests with flexible filtering options.
GET /chat-requests/counts get_request_counts_by_model Get request counts for each model (lightweight endpoint).
GET /chat-requests/models get_models_with_requests Get all unique models that have chat completion requests.
GET /chat-requests/plot-data get_chat_requests_plot_data Get optimized chat completion request data for plotting.
GET /chat-requests/providers get_providers_with_requests Get all providers that have models with chat completion requests.
GET /circuit-breakers get_all_circuit_breakers Get circuit breaker states for all provider/model combinations.
GET /circuit-breakers/{provider} get_provider_circuit_breakers Get circuit breaker states for a specific provider's models.
GET /cost-analysis get_cost_analysis Get cost breakdown by provider.
GET /error-rates get_error_rates Get error rates broken down by model.
GET /errors/{provider} get_provider_errors Get recent errors for a specific provider.
GET /health get_all_provider_health Get health scores for all providers.
GET /health/{provider} get_provider_health Get health score for a specific provider.
GET /latency-trends/{provider} get_latency_trends Get latency trends for a provider over time.
GET /latency/{provider}/{model} get_latency_percentiles Get latency percentiles for a specific provider/model combination.
POST /monitoring sentry_tunnel Sentry tunnel endpoint for frontend error tracking.
GET /providers/comparison get_provider_comparison Compare all providers across key metrics.
GET /stats/hourly/{provider} get_hourly_stats Get hourly statistics for a specific provider.
GET /stats/realtime get_realtime_stats Get real-time statistics from Redis for all providers.
GET /token-efficiency/{provider}/{model} get_token_efficiency Get token efficiency metrics for a provider/model.
GET /trial-analytics get_trial_analytics Get trial funnel analytics.

Nosana

File: src/routes/nosana.py | Prefix: (root) | Endpoints: 20

Method Path Function Description
GET /config get_nosana_config Get Nosana configuration options.
GET /credits/balance get_credit_balance Get the current credit balance for the Nosana account.
GET /deployments list_all_deployments List all deployments for the authenticated user.
POST /deployments create_new_deployment Create a new deployment.
POST /deployments/image-generation deploy_image_generation Quick deploy a Stable Diffusion image generation endpoint.
POST /deployments/llm deploy_llm_inference Quick deploy an LLM inference endpoint.
POST /deployments/whisper deploy_whisper_transcription Quick deploy a Whisper audio transcription endpoint.
GET /deployments/{deployment_id} get_deployment_details Get details for a specific deployment.
POST /deployments/{deployment_id}/archive archive_existing_deployment Archive a deployment.
PATCH /deployments/{deployment_id}/replicas update_replicas Update the replica count for a deployment.
POST /deployments/{deployment_id}/revisions create_revision Create a new revision for a deployment.
POST /deployments/{deployment_id}/start start_existing_deployment Start a deployment (activate from draft or stopped state).
POST /deployments/{deployment_id}/stop stop_running_deployment Stop a running deployment.
POST /jobs create_new_job Create a new job using credits.
GET /jobs/{job_address} get_job_details Get details for a specific job.
POST /jobs/{job_address}/extend extend_job_duration Extend a job's duration.
POST /jobs/{job_address}/stop stop_running_job Stop a credit-based job.
GET /markets list_gpu_markets List available GPU markets.
GET /markets/{market_id} get_market_details Get details for a specific market.
GET /markets/{market_id}/resources get_market_resource_requirements Get required resources for a specific market.

Notifications

File: src/routes/notifications.py | Prefix: (root) | Endpoints: 6

Method Path Function Description
POST /admin/notifications/process process_notifications Process all pending notifications (admin only)
GET /admin/notifications/stats get_notification_stats Get notification statistics for admin
GET /user/notifications/preferences get_notification_preferences Get user notification preferences
PUT /user/notifications/preferences update_notification_preferences Update user notification preferences
POST /user/notifications/send-usage-report send_usage_report Send monthly usage report email
POST /user/notifications/test test_notification Send test notification to a user

Ops Dashboard

File: src/routes/ops_dashboard.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /ops/dashboard ops_dashboard Render the Operations Dashboard - a real-time, visually rich HTML page
GET /ops/dashboard/data ops_dashboard_data JSON payload powering the ops dashboard.

Optimization Monitor

File: src/routes/optimization_monitor.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
GET /admin/health/optimizations/cache get_cache_health Get response cache statistics.
POST /admin/health/optimizations/cache/clear clear_cache Clear the response cache.
GET /health/optimizations get_optimization_health Get health and statistics for all optimization systems.
GET /health/optimizations/connection-pools get_connection_pool_stats Get detailed connection pool statistics.
GET /health/optimizations/prioritization get_prioritization_stats Get request prioritization statistics.

Partner Trials

File: src/routes/partner_trials.py | Prefix: (root) | Endpoints: 7

Method Path Function Description
GET /analytics/{partner_code} get_partner_analytics Get analytics for a specific partner's trials.
GET /check/{code} check_partner_code Check if a code is a valid partner code.
GET /config/{partner_code} get_partner_config Get public configuration for a partner trial.
GET /daily-limit get_daily_limit Get the daily usage limit for the current user.
POST /expire/{target_user_id} force_expire_trial Force expire a user's partner trial.
POST /start start_partner_trial Start a partner trial for the current user.
GET /status get_partner_trial_status Get the current user's partner trial status.

Payments

File: src/routes/payments.py | Prefix: (root) | Endpoints: 14

Method Path Function Description
POST /checkout-session create_checkout_session Create a Stripe checkout session for hosted payment page
GET /checkout-session/{session_id} get_checkout_session Retrieve checkout session details
GET /credit-packages get_credit_packages Get available credit packages for purchase
POST /payment-intent create_payment_intent Create a Stripe payment intent for custom payment flows
GET /payment-intent/{payment_intent_id} get_payment_intent Retrieve payment intent details
GET /payments get_payment_history Get payment history for the authenticated user
GET /payments/{payment_id} get_payment_details Get details of a specific payment
POST /refund create_refund Create a refund for a payment (admin only)
GET /subscription get_current_subscription Get the current user's subscription status
POST /subscription-checkout create_subscription_checkout Create a Stripe checkout session for subscription
POST /subscription/cancel cancel_subscription Cancel subscription
POST /subscription/downgrade downgrade_subscription Downgrade subscription to a lower tier (e.g., Max -> Pro)
POST /subscription/upgrade upgrade_subscription Upgrade subscription to a higher tier (e.g., Pro -> Max)
POST /webhook stripe_webhook Stripe webhook endpoint - handles all Stripe events

Ping

File: src/routes/ping.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /ping ping Ping endpoint that returns 'pong' and the number of times it has been called.
GET /ping/stats ping_stats Get ping statistics.

Plans

File: src/routes/plans.py | Prefix: (root) | Endpoints: 9

Method Path Function Description
POST /admin/assign-plan assign_plan_to_user Assign a plan to a user (Admin only)
GET /plans get_plans Get all available subscription plans
GET /plans/{plan_id} get_plan Get a specific plan by ID
GET /subscription/plans get_subscription_plans Get available subscription plans with 4-tier structure
GET /trial/status get_trial_status Get the current trial status for the authenticated API key
GET /user/environment-usage get_user_environment_usage Get user's usage breakdown by environment
GET /user/plan get_user_plan_endpoint Get current user's plan
GET /user/plan/entitlements get_user_plan_entitlements Check user's plan entitlements
GET /user/plan/usage get_user_plan_usage Get user's plan usage and limits

Prometheus Data

File: src/routes/prometheus_data.py | Prefix: (root) | Endpoints: 8

Method Path Function Description
DELETE /admin/cache/invalidate invalidate_cache Invalidate prometheus data cache entries.
GET /admin/cache/status get_cache_status Get cache status and statistics.
GET /instrumentation/health get_instrumentation_health Get overall instrumentation and observability health.
GET /instrumentation/loki/status get_loki_status Get Loki logging service status (NO CACHING).
GET /instrumentation/tempo/status get_tempo_status Get Tempo tracing service status (NO CACHING).
POST /instrumentation/test-log test_log_ingestion Test log ingestion to Loki (NO CACHING).
POST /instrumentation/test-trace test_trace_ingestion Test trace ingestion to Tempo (NO CACHING).
GET /metrics get_prometheus_metrics Get metrics in Prometheus text exposition format.

Prometheus Grafana

File: src/routes/prometheus_grafana.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
POST /annotations annotations Return annotations for Grafana.
POST /query query Query metrics data for Grafana panels.
POST /search search Return list of available metrics for Grafana metric selection.
POST /tag-keys tag_keys Return available tag keys.
POST /tag-values tag_values Return available tag values.

Provider Credits

File: src/routes/provider_credits.py | Prefix: (root) | Endpoints: 3

Method Path Function Description
GET /balance get_provider_credit_balances Get credit balances for all monitored providers.
POST /balance/clear-cache clear_provider_credit_cache Clear the provider credit balance cache.
GET /balance/{provider} get_provider_credit_balance Get credit balance for a specific provider.

Providers Management

File: src/routes/providers_management.py | Prefix: (root) | Endpoints: 13

Method Path Function Description
GET / list_providers Get all providers
POST / create_provider_endpoint Create a new provider
GET /health/{health_status} get_providers_by_health Get providers by health status
GET /search search_providers_endpoint Search providers by name, slug, or description
GET /slug/{slug} get_provider_by_slug_endpoint Get a specific provider by slug
GET /stats get_provider_statistics Get provider statistics
GET /{provider_id} get_provider Get a specific provider by ID
PATCH /{provider_id} update_provider_endpoint Update a provider
DELETE /{provider_id} delete_provider_endpoint Delete a provider (hard delete)
POST /{provider_id}/activate activate_provider_endpoint Activate a provider
POST /{provider_id}/deactivate deactivate_provider_endpoint Deactivate a provider (soft delete)
PATCH /{provider_id}/health update_provider_health_endpoint Update provider health status
GET /{provider_id}/models/stats get_provider_model_stats Get model statistics for a specific provider

Ranking

File: src/routes/ranking.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /ranking/apps get_ranking_apps Get all apps from latest_apps table for ranking page
GET /ranking/models get_ranking_models Get all models from latest_models table for ranking page with logo URLs

Rate Limits

File: src/routes/rate_limits.py | Prefix: (root) | Endpoints: 12

Method Path Function Description
GET /admin/rate-limits/alerts get_rate_limit_alerts_endpoint Get rate limit alerts for monitoring
GET /admin/rate-limits/config get_admin_rate_limit_config Get rate limit configuration.
POST /admin/rate-limits/config set_admin_rate_limit_config Set rate limit configuration for a specific API key.
POST /admin/rate-limits/config/reset reset_rate_limit_config Reset rate limit configuration to defaults for a specific API key.
DELETE /admin/rate-limits/delete delete_rate_limits Delete custom rate limits for a user (reset to defaults).
GET /admin/rate-limits/system get_system_rate_limits Get system-wide rate limiting statistics
PUT /admin/rate-limits/update update_admin_rate_limits Update rate limits for a user.
GET /admin/rate-limits/users get_users_rate_limits Get rate limits for all users.
GET /user/rate-limits get_user_rate_limits_advanced Get advanced rate limit configuration and status for user's API keys
POST /user/rate-limits/bulk-update bulk_update_user_rate_limits Bulk update rate limit configuration for all user's API keys
GET /user/rate-limits/usage/{key_id} get_api_key_rate_limit_usage Get detailed rate limit usage statistics for a specific API key
PUT /user/rate-limits/{key_id} update_user_rate_limits_advanced Update rate limit configuration for a specific API key

Referral

File: src/routes/referral.py | Prefix: (root) | Endpoints: 4

Method Path Function Description
GET /referral/code get_my_referral_code Get your referral code and shareable invite link.
POST /referral/generate generate_my_referral_code Generate a referral code for the authenticated user if they don't have one.
GET /referral/stats get_my_referral_stats Get referral statistics for the authenticated user.
POST /referral/validate validate_referral Validate if a referral code can be used by the authenticated user.

Roles

File: src/routes/roles.py | Prefix: (root) | Endpoints: 5

Method Path Function Description
GET /admin/roles/audit/log get_audit_log Get role change audit log (Admin only)
GET /admin/roles/list/{role} list_users_by_role List all users with a specific role (Admin only)
GET /admin/roles/permissions/{role} get_role_permissions_endpoint Get all permissions for a role (Admin only)
POST /admin/roles/update update_role Update a user's role (Admin only)
GET /admin/roles/{user_id} get_user_role_info Get user's role and permissions (Admin only)

Root

File: src/routes/root.py | Prefix: (root) | Endpoints: 1

Method Path Function Description
GET / root

Share

File: src/routes/share.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /{token} get_shared_chat Get a shared chat by its token (public endpoint).
DELETE /{token} delete_share_link Delete a share link by its token.

Status Page

File: src/routes/status_page.py | Prefix: /v1 | Endpoints: 8

Method Path Function Description
GET /v1/ get_overall_status Get overall system status for status page
GET /v1/incidents get_incidents Get incidents
GET /v1/models get_models_status Get status for models
GET /v1/models/{provider}/{model_id} get_model_status Get status for a specific model
GET /v1/providers get_providers_status Get status for all providers
GET /v1/search search_models Search for models by name or provider
GET /v1/stats get_stats Get overall statistics for status page
GET /v1/uptime/{provider}/{model_id} get_model_uptime_history Get uptime history for a specific model

System

File: src/routes/system.py | Prefix: (root) | Endpoints: 16

Method Path Function Description
POST /admin/api/cache/invalidate invalidate_cache Invalidate cache for specified gateway or cache type.
POST /admin/cache/clear clear_all_caches Clear cache for all gateways or a specific gateway.
GET /admin/cache/debouncer/stats get_cache_debouncer_stats Get cache debouncer statistics (Issue #1099).
DELETE /admin/cache/modelz/clear clear_modelz_cache_endpoint Clear the Modelz cache.
POST /admin/cache/modelz/refresh refresh_modelz_cache_endpoint Force refresh the Modelz cache by fetching fresh data from the API.
GET /admin/cache/modelz/status get_modelz_cache_status Get the current status of the Modelz cache.
POST /admin/cache/pricing/refresh refresh_pricing_cache_endpoint Force refresh the pricing cache by reloading from the manual pricing file.
POST /admin/cache/refresh/{gateway} refresh_gateway_cache Force refresh cache for a specific gateway.
GET /admin/cache/status get_cache_status Get cache status for all gateways.
GET /admin/cache/warmer/stats get_cache_warmer_stats Get cache warmer statistics including:
GET /health/gateways check_all_gateways Get health status of all 28 configured gateways from health-service cache.
GET /health/gateways/dashboard gateway_health_dashboard Render an HTML dashboard view of the comprehensive gateway health check.
GET /health/gateways/dashboard/data gateway_health_dashboard_data Expose the dashboard data as JSON for programmatic consumption.
POST /health/gateways/{gateway}/fix trigger_gateway_fix Trigger a targeted gateway diagnostics run with optional auto-fix.
GET /health/{gateway} check_single_gateway Check health status of a specific gateway with detailed diagnostics.
GET /velocity-mode-status get_velocity_mode_status Get the current velocity mode status from the security middleware.

Tools

File: src/routes/tools.py | Prefix: /v1 | Endpoints: 4

Method Path Function Description
GET /v1/definitions get_definitions Get tool definitions formatted for chat completion requests.
POST /v1/execute execute_tool_endpoint Execute a tool with given parameters.
POST /v1/search/augment search_augment Perform web search and return formatted context for prompt augmentation.
GET /v1/{tool_name} get_tool_info Get information about a specific tool.

Transaction Analytics

File: src/routes/transaction_analytics.py | Prefix: (root) | Endpoints: 2

Method Path Function Description
GET /transactions get_transaction_analytics Get daily summary of model inference per model from OpenRouter
GET /transactions/summary get_transaction_summary Get a processed summary of transaction analytics

Trial Analytics

File: src/routes/trial_analytics.py | Prefix: (root) | Endpoints: 6

Method Path Function Description
GET /admin/trial/cohort-analysis get_cohort_analysis Provide week-over-week or month-over-month cohort conversion analysis
GET /admin/trial/conversion-funnel get_conversion_funnel Get conversion funnel data to understand at what point trials convert to paid
GET /admin/trial/domain-analysis get_domain_analysis Analyze trial users by email domain to detect potential abuse with Redis caching
GET /admin/trial/ip-analysis get_ip_analysis Analyze trial signups by IP address to detect multiple accounts from same IP
POST /admin/trial/save-conversion-metrics save_conversion_metrics Save metrics when user converts from trial to paid
GET /admin/trial/users get_trial_users Get detailed trial user list with usage and segmentation data

Users

File: src/routes/users.py | Prefix: (root) | Endpoints: 7

Method Path Function Description
DELETE /user/account delete_user_account_endpoint Delete a user account and all associated data
GET /user/balance get_user_balance
GET /user/credit-transactions get_credit_transactions_endpoint Get credit transaction history for the authenticated user
GET /user/limit user_get_rate_limits
GET /user/monitor user_monitor
GET /user/profile get_user_profile_endpoint Get user profile information
PUT /user/profile update_user_profile_endpoint Update user profile information

Clone this wiki locally