InferKit - Deploy any AI function in 3 lines
Library for ML / Vision / LLM / Agent. No FastAPI boilerplate needed.
Install
pip install inferkit
# local dev
pip install -e .
Usage - 3 lines
# my_model.py
from inferkit import infer
@infer
async def run(payload, files=None):
# payload: {"text": "..."} files: list[bytes] for images/audio
return {"output": f"echo: {payload.get('text')}"}
@infer.stream # optional for LLM streaming
async def run_stream(payload):
for tok in payload.get("text","").split():
yield tok + " "
Run:
inferkit dev my_model.py --port 8000
# docs at http://localhost:8000/docs
Endpoints auto created:
POST /api/v1/infer(multipart file + json)POST /api/v1/infer/json(json only)POST /api/v1/infer/stream(SSE)WS /ws/infer(WebSocket + streaming + image base64)
Image output: return {"image_base64": b64, "media_type": "image/png"} or return png_bytes
Init new project
inferkit init
# creates .env.example, Dockerfile
Deploy (one command, any OS, auto detects Docker)
inferkit deploy
# if docker available -> docker compose/build
# else -> venv + uvicorn --workers 4 on 0.0.0.0:8000
Config via .env
HOST=0.0.0.0
PORT=8000
CORS_ORIGINS=["*"]
MAX_UPLOAD_MB=50
RATE_LIMIT=60/minute
API_KEY= # if set, require X-API-Key header
DEBUG=false
Programmatic
from inferkit import serve
serve("my_model.py", port=8000)
Release files for inferkit 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inferkit-0.1.4.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inferkit-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / inferkit-0.1.4.tar.gz
| Download URL | inferkit-0.1.4.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f493f4e4b239eea7c662817ff572b3ee8505fded90e6f1e5d7d3b3d72a3336b
|
|
BLAKE2b-256 checksum How to use checksums |
5fb073b39d0a291ce58727e0935228ff5ca86f16733898d0f3b5b161dec427fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / inferkit-0.1.4-py3-none-any.whl
| Download URL | inferkit-0.1.4-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0210b3377957b6412fc73a961b15f83057bd141840e668b39aff7e005f14fbfd
|
|
BLAKE2b-256 checksum How to use checksums |
33095602c43c24a5e839e5eb9367e5feb6d0e9075121a59fdd6e7e68ab97e2ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|