├── .dockerignore ├── .gitattributes ├── .github └── workflows │ └── docker.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── app ├── api │ ├── admin │ │ └── manage.py │ └── v1 │ │ ├── chat.py │ │ ├── images.py │ │ └── models.py ├── core │ ├── auth.py │ ├── config.py │ ├── exception.py │ ├── logger.py │ └── storage.py ├── models │ ├── grok_models.py │ └── openai_schema.py ├── services │ ├── grok │ │ ├── cache.py │ │ ├── client.py │ │ ├── create.py │ │ ├── processer.py │ │ ├── statsig.py │ │ ├── token.py │ │ └── upload.py │ └── mcp │ │ ├── __init__.py │ │ ├── server.py │ │ └── tools.py └── template │ ├── admin.html │ ├── favicon.png │ └── login.html ├── data ├── setting.toml ├── temp │ ├── image.temp │ └── video │ │ └── users-8522ce45-679b-4e0e-a0f7-bb18f434eb6b-generated-15f7113f-5d16-4ff1-bdaa-a2eabd66671c-generated_video.mp4 └── token.json ├── docker-compose.yml ├── main.py ├── readme.md └── requirements.txt /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/.dockerignore -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/.github/workflows/docker.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/.gitignore -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/LICENSE -------------------------------------------------------------------------------- /app/api/admin/manage.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/api/admin/manage.py -------------------------------------------------------------------------------- /app/api/v1/chat.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/api/v1/chat.py -------------------------------------------------------------------------------- /app/api/v1/images.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/api/v1/images.py -------------------------------------------------------------------------------- /app/api/v1/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/api/v1/models.py -------------------------------------------------------------------------------- /app/core/auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/core/auth.py -------------------------------------------------------------------------------- /app/core/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/core/config.py -------------------------------------------------------------------------------- /app/core/exception.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/core/exception.py -------------------------------------------------------------------------------- /app/core/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/core/logger.py -------------------------------------------------------------------------------- /app/core/storage.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/core/storage.py -------------------------------------------------------------------------------- /app/models/grok_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/models/grok_models.py -------------------------------------------------------------------------------- /app/models/openai_schema.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/models/openai_schema.py -------------------------------------------------------------------------------- /app/services/grok/cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/cache.py -------------------------------------------------------------------------------- /app/services/grok/client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/client.py -------------------------------------------------------------------------------- /app/services/grok/create.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/create.py -------------------------------------------------------------------------------- /app/services/grok/processer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/processer.py -------------------------------------------------------------------------------- /app/services/grok/statsig.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/statsig.py -------------------------------------------------------------------------------- /app/services/grok/token.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/token.py -------------------------------------------------------------------------------- /app/services/grok/upload.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/grok/upload.py -------------------------------------------------------------------------------- /app/services/mcp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/mcp/__init__.py -------------------------------------------------------------------------------- /app/services/mcp/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/mcp/server.py -------------------------------------------------------------------------------- /app/services/mcp/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/services/mcp/tools.py -------------------------------------------------------------------------------- /app/template/admin.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/template/admin.html -------------------------------------------------------------------------------- /app/template/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/template/favicon.png -------------------------------------------------------------------------------- /app/template/login.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/app/template/login.html -------------------------------------------------------------------------------- /data/setting.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/data/setting.toml -------------------------------------------------------------------------------- /data/temp/image.temp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/temp/video/users-8522ce45-679b-4e0e-a0f7-bb18f434eb6b-generated-15f7113f-5d16-4ff1-bdaa-a2eabd66671c-generated_video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/data/temp/video/users-8522ce45-679b-4e0e-a0f7-bb18f434eb6b-generated-15f7113f-5d16-4ff1-bdaa-a2eabd66671c-generated_video.mp4 -------------------------------------------------------------------------------- /data/token.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/data/token.json -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/main.py -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/readme.md -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyme/grok2api/HEAD/requirements.txt --------------------------------------------------------------------------------