What the API provides
- Repository-aware file ranking for one ready repository.
- Direct HTTP + JSON access.
- A clean way to embed ranking into internal developer tooling.
Authentication
API access requires credentials. For a repository you own, get a verification token from the ready submission detail and pass it as a bearer token.
Primary endpoint
- POST /find_relevant_files
Base URL: https://api.repokit.live
Quick example
find_relevant_filesbash
curl -sS \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
https://api.repokit.live/find_relevant_files \
-d '{
"repository_id": "<repository_id>",
"query": "fix request validation error in routing",
"active_files": ["app/routing.py"],
"recent_files": ["tests/test_routing.py"],
"failing_tests": ["tests/test_routing.py"],
"top_k": 5
}'Sample response shape
responsejson
{
"request_id": "feda8a881cd34a39aafc1ac6bbc2a683",
"repository_id": "<repository_id>",
"model_version": "lightgbm-lambdamart-v1",
"candidate_universe_size": 156,
"files": [
{
"path": "app/routing.py",
"score": 1.145996,
"confidence": "medium",
"explanations": [
{
"reason_code": "RECENT_EDIT",
"message": "Recently edited frequently in historical commits.",
"evidence_type": "heuristic",
"feature_value": 0.018605
}
]
},
{
"path": "middleware/auth.py",
"score": 0.710456,
"confidence": "low",
"explanations": [
{
"reason_code": "RECENT_EDIT",
"message": "Recently edited frequently in historical commits.",
"evidence_type": "heuristic",
"feature_value": 0.027907
}
]
}
],
"latency_ms": 42,
"runtime": {
"repository_id": "<repository_id>",
"model_version": "lightgbm-lambdamart-v1",
"ranker_mode": "model",
"model_backend": "lightgbm",
"ranking_inputs_source": "benchmark_backfill",
"runtime_artifact_source": "explicit",
"runtime_artifact_dir": "/artifacts/benchmarks/<repository_id>",
"feature_flags": {
"enable_model_ranking": true,
"enable_structured_logging": true,
"persist_evaluation_reports": true
},
"warnings": []
}
}When to use the API
- You want direct HTTP requests.
- You are integrating with backend services or editor workflows.
- You want structured control over requests and response handling.
Related docs