{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health Check","description":"Health check endpoint to verify that the server is running.\n\n**Returns**\n\n- **dict[str, str]**: A JSON object with a \"status\" key indicating the server's health status.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/llms.txt":{"get":{"summary":"Llm Txt","description":"Serve the llm.txt file to provide information about the site to LLMs.\n\n**This endpoint serves the ``llms.txt`` file located in the static directory**\nto provide information about the site to Large Language Models (LLMs)\nand other AI systems that may be crawling the site.\n\n**Returns**\n\n- **FileResponse**: The ``llms.txt`` file located in the static directory","operationId":"llm_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api":{"get":{"summary":"Openapi Json Get","description":"Return the OpenAPI schema.\n\n**This endpoint returns the OpenAPI schema (openapi.json)**\nthat describes the API structure, endpoints, and data models\nfor documentation and client generation purposes.\n\n**Returns**\n\n- **JSONResponse**: The OpenAPI schema as JSON","operationId":"openapi_json_get_api_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ingest":{"post":{"summary":"Api Ingest","description":"Ingest a Git repository and return processed content.\n\n**This endpoint processes a Git repository by cloning it, analyzing its structure,**\nand returning a summary with the repository's content. The response includes\nfile tree structure, processed content, and metadata about the ingestion.\n\n**Parameters**\n\n- **ingest_request** (`IngestRequest`): Pydantic model containing ingestion parameters\n\n**Returns**\n\n- **JSONResponse**: Success response with ingestion results or error response with appropriate HTTP status code","operationId":"api_ingest_api_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful ingestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestSuccessResponse"}}}},"400":{"description":"Bad request or processing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{user}/{repository}":{"get":{"summary":"Api Ingest Get","description":"Ingest a GitHub repository via GET and return processed content.\n\n**This endpoint processes a GitHub repository by analyzing its structure and returning a summary**\nwith the repository's content. The response includes file tree structure, processed content, and\nmetadata about the ingestion. All ingestion parameters are optional and can be provided as query parameters.\n\n**Path Parameters**\n- **user** (`str`): GitHub username or organization\n- **repository** (`str`): GitHub repository name\n\n**Query Parameters**\n- **max_file_size** (`int`, optional): Maximum file size in KB to include in the digest (default: 5120 KB)\n- **pattern_type** (`str`, optional): Type of pattern to use (\"include\" or \"exclude\", default: \"exclude\")\n- **pattern** (`str`, optional): Pattern to include or exclude in the query (default: \"\")\n- **token** (`str`, optional): GitHub personal access token for private repositories (default: \"\")\n\n**Returns**\n- **JSONResponse**: Success response with ingestion results or error response with appropriate HTTP status code","operationId":"api_ingest_get_api__user___repository__get","parameters":[{"name":"user","in":"path","required":true,"schema":{"type":"string","title":"User"}},{"name":"repository","in":"path","required":true,"schema":{"type":"string","title":"Repository"}},{"name":"max_file_size","in":"query","required":false,"schema":{"type":"integer","default":5120,"title":"Max File Size"}},{"name":"pattern_type","in":"query","required":false,"schema":{"type":"string","default":"exclude","title":"Pattern Type"}},{"name":"pattern","in":"query","required":false,"schema":{"type":"string","default":"","title":"Pattern"}},{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}}],"responses":{"200":{"description":"Successful ingestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestSuccessResponse"}}}},"400":{"description":"Bad request or processing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/download/file/{ingest_id}":{"get":{"summary":"Download Ingest","description":"Download the first text file produced for an ingest ID.\n\n**This endpoint retrieves the first ``*.txt`` file produced during the ingestion process**\nand returns it as a downloadable file. When S3 is enabled, this endpoint is disabled\nand clients should use the S3 URL provided in the ingest response instead.\n\n**Parameters**\n\n- **ingest_id** (`UUID`): Identifier that the ingest step emitted\n\n**Returns**\n\n- **FileResponse**: Streamed response with media type ``text/plain`` for local files\n\n**Raises**\n\n- **HTTPException**: **503** - endpoint is disabled when S3 is enabled\n- **HTTPException**: **404** - digest directory is missing or contains no ``*.txt`` file\n- **HTTPException**: **403** - the process lacks permission to read the directory or file","operationId":"download_ingest_api_download_file__ingest_id__get","parameters":[{"name":"ingest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ingest Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IngestErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"Error message"}},"type":"object","required":["error"],"title":"IngestErrorResponse","description":"Error response model for the /api/ingest endpoint.\n\nAttributes\n----------\nerror : str\n    Error message describing what went wrong."},"IngestRequest":{"properties":{"input_text":{"type":"string","title":"Input Text","description":"Git repository URL or slug to ingest"},"max_file_size":{"type":"integer","maximum":102400.0,"minimum":1.0,"title":"Max File Size","description":"File size in KB"},"pattern_type":{"$ref":"#/components/schemas/PatternType","description":"Pattern type for file filtering","default":"exclude"},"pattern":{"type":"string","title":"Pattern","description":"Glob/regex pattern for file filtering","default":""},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"GitHub PAT for private repositories"}},"type":"object","required":["input_text","max_file_size"],"title":"IngestRequest","description":"Request model for the /api/ingest endpoint.\n\nAttributes\n----------\ninput_text : str\n    The Git repository URL or slug to ingest.\nmax_file_size : int\n    Maximum file size slider position (0-500) for filtering files.\npattern_type : PatternType\n    Type of pattern to use for file filtering (include or exclude).\npattern : str\n    Glob/regex pattern string for file filtering.\ntoken : str | None\n    GitHub personal access token (PAT) for accessing private repositories."},"IngestSuccessResponse":{"properties":{"repo_url":{"type":"string","title":"Repo Url","description":"Original repository URL"},"short_repo_url":{"type":"string","title":"Short Repo Url","description":"Short repository URL (user/repo)"},"summary":{"type":"string","title":"Summary","description":"Ingestion summary with token estimates"},"digest_url":{"type":"string","title":"Digest Url","description":"URL to download the full digest content"},"tree":{"type":"string","title":"Tree","description":"File tree structure"},"content":{"type":"string","title":"Content","description":"Processed file content"},"default_max_file_size":{"type":"integer","title":"Default Max File Size","description":"File size slider position used"},"pattern_type":{"type":"string","title":"Pattern Type","description":"Pattern type used"},"pattern":{"type":"string","title":"Pattern","description":"Pattern used"}},"type":"object","required":["repo_url","short_repo_url","summary","digest_url","tree","content","default_max_file_size","pattern_type","pattern"],"title":"IngestSuccessResponse","description":"Success response model for the /api/ingest endpoint.\n\nAttributes\n----------\nrepo_url : str\n    The original repository URL that was processed.\nshort_repo_url : str\n    Short form of repository URL (user/repo).\nsummary : str\n    Summary of the ingestion process including token estimates.\ndigest_url : str\n    URL to download the full digest content (either S3 URL or local download endpoint).\ntree : str\n    File tree structure of the repository.\ncontent : str\n    Processed content from the repository files.\ndefault_max_file_size : int\n    The file size slider position used.\npattern_type : str\n    The pattern type used for filtering.\npattern : str\n    The pattern used for filtering."},"PatternType":{"type":"string","enum":["include","exclude"],"title":"PatternType","description":"Enumeration for pattern types used in file filtering."},"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"}}}}