Skip to main content

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inferkit 0.1.2
File Size Uploaded
inferkit-0.1.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inferkit 0.1.2
File Interpreter ABI Platform
inferkit-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / inferkit-0.1.2.tar.gz

Download URL inferkit-0.1.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
86a39194ac17cd7200c09a00dccd60568a846a3637cd93fbb9d995e9b68e88ba
BLAKE2b-256 checksum
How to use checksums
155b2a1e58a184a056cbac0a6575f35a817fea7d53375bf3b8e9719f084f1a4a
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.2-py3-none-any.whl

Download URL inferkit-0.1.2-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13aa8cd10f3a8dbd9e51d544adb58329a210de9730ac499ccc1a2e67b38dcd7
BLAKE2b-256 checksum
How to use checksums
9cd2d451a9a03d2fbe58c57ab203ece238041b60b199ca37645af66c31604a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page