{
  "openapi": "3.1.0",
  "info": {
    "title": "SeekrFlow API",
    "description": "SeekrFlow API Documentation",
    "termsOfService": "http://www.seekr.com/support",
    "contact": {
      "name": "Seekr API Support",
      "url": "http://www.seekr.com/contact",
      "email": "contact@seekr.com"
    },
    "version": "0.1.0"
  },
  "paths": {
    "/v1/inference/chat/completions": {
      "post": {
        "summary": "Create chat completion",
        "operationId": "route_chat_completion_v1_inference_chat_completions_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "description": "Generate a chat completion response from a deployed model."
      }
    },
    "/v1/inference/internal/chat/completions": {
      "post": {
        "summary": "Route Chat Completion",
        "operationId": "route_chat_completion_v1_inference_internal_chat_completions_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/inference/completions": {
      "post": {
        "summary": "Create completion",
        "operationId": "route_completion_v1_inference_completions_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "description": "Generate a text completion response from a deployed model."
      }
    },
    "/v1/inference/embeddings": {
      "post": {
        "summary": "Create embedding",
        "operationId": "route_embeddings_v1_inference_embeddings_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "description": "Generate vector embeddings for one or more input texts."
      }
    },
    "/v1/inference/internal/embeddings": {
      "post": {
        "summary": "Route Embeddings",
        "operationId": "route_embeddings_v1_inference_internal_embeddings_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/inference/tokenize": {
      "post": {
        "summary": "Route Tokenize",
        "operationId": "route_tokenize_inference_tokenize_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/inference/detokenize": {
      "post": {
        "summary": "Route Detokenize",
        "operationId": "route_detokenize_inference_detokenize_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/v1/inference/rerank": {
      "post": {
        "summary": "Rerank documents",
        "operationId": "route_v1_rerank_v1_inference_rerank_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "description": "Rerank a list of documents by relevance to a query."
      }
    },
    "/rerank": {
      "post": {
        "summary": "Route Rerank",
        "operationId": "route_rerank_rerank_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/v1/inference/score": {
      "post": {
        "summary": "Score text",
        "operationId": "route_v1_score_v1_inference_score_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "description": "Score a query-document pair for relevance."
      }
    },
    "/score": {
      "post": {
        "summary": "Route Score",
        "operationId": "route_score_score_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/sleep": {
      "post": {
        "summary": "Route Sleep",
        "operationId": "route_sleep_sleep_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/wake_up": {
      "post": {
        "summary": "Route Wake Up",
        "operationId": "route_wake_up_wake_up_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/is_sleeping": {
      "get": {
        "summary": "Route Is Sleeping",
        "operationId": "route_is_sleeping_is_sleeping_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/version": {
      "get": {
        "summary": "Show Version",
        "operationId": "show_version_version_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/models": {
      "get": {
        "summary": "Show Models",
        "description": "Returns a list of all models available in the stack.\n\nArgs:\n    token_data: User data specified by api-key\n\nReturns:\n    JSONResponse: A JSON response containing the list of models.\n\nRaises:\n    Exception: If there is an error in retrieving the endpoint information.",
        "operationId": "show_models_v1_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/v1/inference/internal/models": {
      "get": {
        "summary": "Show Models",
        "description": "Returns a list of all models available in the stack.\n\nArgs:\n    token_data: User data specified by api-key\n\nReturns:\n    JSONResponse: A JSON response containing the list of models.\n\nRaises:\n    Exception: If there is an error in retrieving the endpoint information.",
        "operationId": "show_models_v1_inference_internal_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "x-excluded": true
      }
    },
    "/engines": {
      "get": {
        "summary": "Get Engine Instances",
        "description": "Returns a list of all models available in the stack.\n\nArgs:\n    None\n\nReturns:\n    JSONResponse: A JSON response containing the list of models and their relationships.\n\nRaises:\n    Exception: If there is an error in retrieving the endpoint information.",
        "operationId": "get_engine_instances_engines_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/health": {
      "get": {
        "summary": "Health",
        "description": "Endpoint to check the health status of various components.\n\nThis function verifies the health of the service discovery module and\nthe engine stats scraper. If either component is down, it returns a\n503 response with the appropriate status message. If both components\nare healthy, it returns a 200 OK response.\n\nReturns:\n    Response: A JSONResponse with status code 503 if a component is\n    down, or a plain Response with status code 200 if all components\n    are healthy.",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/inference/health": {
      "get": {
        "summary": "Check inference health",
        "description": "Check the health and availability of the inference service.",
        "operationId": "health_v1_inference_health_get",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/inference/audio/transcriptions": {
      "post": {
        "summary": "Transcribe audio",
        "description": "Submit an audio file for transcription.",
        "operationId": "route_v1_audio_transcriptions_v1_inference_audio_transcriptions_post",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/files": {
      "post": {
        "summary": "Route Files",
        "description": "Handle file upload requests and save the files to the configured storage.\n\nArgs:\n    request (Request): The incoming HTTP request.\n\nReturns:\n    JSONResponse: A JSON response containing the file metadata.\n\nRaises:\n    JSONResponse: A JSON response with a 400 status code if the request is invalid,\n        or a 500 status code if an error occurs during file saving.",
        "operationId": "route_files_v1_files_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "summary": "Route Get File",
        "operationId": "route_get_file_v1_files__file_id__get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/files/{file_id}/content": {
      "get": {
        "summary": "Route Get File Content",
        "operationId": "route_get_file_content_v1_files__file_id__content_get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/batches": {
      "post": {
        "summary": "Route Batches",
        "description": "Handle batch requests that process files with specified endpoints.",
        "operationId": "route_batches_v1_batches_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      },
      "get": {
        "summary": "Route List Batches",
        "operationId": "route_list_batches_v1_batches_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "After"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/v1/batches/{batch_id}": {
      "get": {
        "summary": "Route Get Batch",
        "operationId": "route_get_batch_v1_batches__batch_id__get",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-excluded": true
      },
      "delete": {
        "summary": "Route Cancel Batch",
        "operationId": "route_cancel_batch_v1_batches__batch_id__delete",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-excluded": true
      }
    },
    "/metrics": {
      "get": {
        "summary": "Metrics",
        "description": "Endpoint to expose Prometheus metrics for the vLLM router.\n\nThis function gathers request statistics, engine metrics, and health status\nof the service endpoints to update Prometheus gauges. It exports metrics\nsuch as queries per second (QPS), average decoding length, number of prefill\nand decoding requests, average latency, average inter-token latency, number\nof swapped requests, and the number of healthy pods for each server. The\nmetrics are used to monitor the performance and health of the vLLM router\nservices.\n\nReturns:\n    Response: A HTTP response containing the latest Prometheus metrics in\n    the appropriate content type.",
        "operationId": "metrics_metrics_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-excluded": true
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "description": "Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "servers": [
    {
      "url": "https://flow.seekr.com",
      "description": "SeekrBuild server base URL"
    }
  ]
}