{"id":28417167,"url":"https://github.com/valaises/llm-portal","last_synced_at":"2025-10-15T22:21:14.499Z","repository":{"id":278433917,"uuid":"935579665","full_name":"valaises/llm-portal","owner":"valaises","description":"Unified interface server for various LLM providers with OpenAI API format","archived":false,"fork":false,"pushed_at":"2025-06-09T12:40:16.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T23:35:32.885Z","etag":null,"topics":["fastapi","litellm","llm-routing","llms"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valaises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-19T17:13:53.000Z","updated_at":"2025-06-09T12:37:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"abb0e9fe-d758-4d89-a5a0-1076cf359731","html_url":"https://github.com/valaises/llm-portal","commit_stats":null,"previous_names":["valaises/llm-proxy","valaises/llm-portal"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/valaises/llm-portal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fllm-portal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fllm-portal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fllm-portal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fllm-portal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valaises","download_url":"https://codeload.github.com/valaises/llm-portal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fllm-portal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267552097,"owners_count":24106000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","litellm","llm-routing","llms"],"created_at":"2025-06-04T03:35:10.157Z","updated_at":"2025-10-15T22:21:14.415Z","avatar_url":"https://github.com/valaises.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLM Portal\n\nA FastAPI-based proxy server for Large Language Models (LLMs) that provides a unified interface for various LLM providers.\n\n## Features\n\n- 🔄 Unified API interface compatible with OpenAI's API format\n- 👥 User management and authentication\n- 📊 Usage statistics tracking\n- 🤖 Support for various LLM providers\n- 🐳 Docker support for easy deployment\n- 🖥️ CLI-based admin interface for user management and stats\n\n\n## Usage\n\nDownload docker-compose.yaml\n```bash\nwget -O docker-compose.yaml https://raw.githubusercontent.com/valaises/llm-portal/refs/heads/main/docker-compose.yaml\n```\n\nStart docker compose\n#### Using Docker Compose\n```bash\ndocker compose up -d\n```\n\n## Usage, Development\n\nClone repository\n```sh\ngit clone https://github.com/valaises/llm-portal.git\n```\n\nStart docker compose\n```sh\ndocker compose -f docker-compose-dev.yaml up -d\n```\n\n## Example: Make a Chat Request\n```bash\ncurl https://llmproxy.xi.valerii.cc/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer admin1234\" \\\n  -d '{\n    \"model\": \"gemini-2.5-pro\",\n    \"messages\": [\n      {\n        \"role\": \"developer\",\n        \"content\": \"You are a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Hello!\"\n      }\n    ],\n    \"stream\": false\n  }'\n```\n\n#### Create a User and API KEY Using requests\n1. Create a user\n```bash\n```bash\ncurl -X POST http://localhost:7012/v1/users-create \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $LLM_PROXY_SECRET\" \\\n  -d '{\n    \"email\": \"user@example.com\"\n  }'\n```\n\n2. Create an API KEY for user\n```bash\ncurl -X POST http://localhost:7012/v1/keys-create \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $LLM_PROXY_SECRET\" \\\n  -d '{\n    \"user_id\": 1,\n    \"scope\": \"\"\n  }'\n```\n\n## Accessing UsageStats\nYou can use DB Viewer to access SQLite DB or use a CLI tool\n\n### CLI Tool Usage\n\nExecute command\n```bash\ndocker exec -it llm-portal bash -c \"python -m src.core.scripts.show_usage_stats\"\n```\n\n| User ID | Requests | Tokens In | Tokens Out | Cost In ($) | Cost Out ($) | Messages | Models Used       |\n|---------|----------|-----------|------------|-------------|--------------|-----------|------------------|\n| 4       | 4        | 76        | 44         | 0           | 0            | 8         | gpt-4o-2024-11-20 |\n| TOTAL   | 4        | 76        | 44         | 0           | 0            | 8         | ALL              |\n\n## License\n\nThis project is licensed under a custom license that:\n- Allows free use for personal and non-commercial purposes\n- Requires explicit permission from the author for any commercial use\n- Requires attribution\n\nSee the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaises%2Fllm-portal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalaises%2Fllm-portal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaises%2Fllm-portal/lists"}