Skip to main content

kiapi

License: MIT Python Platform API Docs

Summary

kiapi is a local API server that uses Apple Silicon and MLX to provide generative AI capabilities for LLM agents.

API

Domain Family Endpoint Description
chat POST /v1/chat Chat API details
embedding POST /v1/embedding Embedding API details
image zimage POST /v1/image/zimage Z-Image API details
flux2 POST /v1/image/flux2 FLUX.2 API details
qwen POST /v1/image/qwen Qwen Image API details
ideogram4 POST /v1/image/ideogram4 Ideogram 4 API details
ernie POST /v1/image/ernie ERNIE-Image API details
seedvr2 POST /v1/image/seedvr2 SeedVR2 API details
depthpro POST /v1/image/depthpro Depth Pro API details
audio acestep POST /v1/audio/acestep ACE-Step API details
audiogen POST /v1/audio/audiogen AudioGen API details
video ltx2 POST /v1/video/ltx2 LTX-2 API details
web POST /v1/web Web API details
core files POST /v1/files Upload input files, LoRA adapters, and other files, then issue a file_id.
GET /v1/files Return a list of stored files.
GET /v1/files/{file_id} Return file metadata.
GET /v1/files/{file_id}/download Download the file body.
DELETE /v1/files/{file_id} Delete a stored file.
jobs GET /v1/jobs Return a list of generation jobs.
GET /v1/jobs/{job_id} Return job status, progress, result, and artifact file_ids.
DELETE /v1/jobs/{job_id} Remove a job from the job store. Running jobs are not interrupted.
openapi GET /openapi.json Return the common API and each capability documentation URL.
GET /v1/{domain}/{family}/openapi.json Return detailed input/output specs, usage, tips, and examples for each family.
health GET /health Return server status, warmup status, queue length, and memory usage.

See: kiapi API Docs

Requirements

  • macOS / Apple Silicon
  • Python >=3.12,<3.13
  • uv (optional, recommended for isolated CLI installs and faster venv/package setup in kiapi activate)
  • mise (used for development)
  • Docker (when using the Web capability)
  • Enough disk capacity for model weights and Docker images

kiapi is developed mainly for personal use on a Mac Studio M4 Max 128GB. Some or all features may work on other Apple Silicon environments, but they are not the primary verification target.

The memory budget can be specified with KIAPI_MEMORY_LIMIT_GB. If omitted, kiapi automatically uses 80% of installed memory as the effective budget on startup. If a model's required memory does not fit in that budget, requests return 503 as an insufficient memory budget error.

kiapi activate --all uses a little under 600GB of disk capacity, including model weights and Docker images. At first, it is recommended to use kiapi activate to set up only the capabilities you need.

Remote Access

kiapi binds to 127.0.0.1 by default and does not expose an inbound socket. For access from other machines, put it behind your own private network layer — for example tailscale serve for a TLS endpoint reachable only inside your tailnet.

Local Storage

kiapi mainly writes to these local paths at runtime.

Purpose Setting Default Notes
Files API uploads, generated artifacts, and URL/data URL inputs KIAPI_FILES_ROOT /tmp/kiapi/files Storage referenced by file_id. The default may disappear after OS reboot or tmp cleanup. Use ~/.kiapi/files or external storage for long-term retention.
Temporary working directories during request processing KIAPI_TMP_ROOT /tmp/kiapi/work Used for chat/embedding input expansion, generation intermediates, LoRA training work, and similar tasks.
Web backend subprocess logs KIAPI_WEB_BACKEND_LOG_DIR /tmp/kiapi/logs/web stdout/stderr for SearXNG / Crawl4AI Docker subprocesses.
ACE-Step dedicated venv / project / checkpoints KIAPI_ACESTEP_PYTHON_PATH, KIAPI_ACESTEP_PROJECT_ROOT, KIAPI_ACESTEP_CHECKPOINT_DIR acestep/ under the user data dir When python_path, project_root, and checkpoint_dir are omitted, kiapi places the ACE-Step venv and checkpoints under a persistent ACE-Step directory.

Other model weights and library caches are managed by Hugging Face, mflux, Docker, or each library/tool. kiapi generally does not move them into its own storage location.

Security

By default, kiapi run starts on 127.0.0.1:8000. When --host 0.0.0.0 is specified, the server may be reachable from other machines, so use it only on trusted networks.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiapi-0.6.0.tar.gz (232.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kiapi-0.6.0-py3-none-any.whl (426.8 kB view details)

Uploaded Python 3

File details

Details for the file kiapi-0.6.0.tar.gz.

File metadata

  • Download URL: kiapi-0.6.0.tar.gz
  • Upload date:
  • Size: 232.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kiapi-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1e0d7a9a18c883d17736d8052c061b2d7c70e12b09ddd6d8964c09b30c07ccb4
MD5 b4e30db85330a29d2f751da0dd2f0639
BLAKE2b-256 a864b6abfb27257c61bccb2931135375d42af9d49fef9d39c8c3caa3001d3332

See more details on using hashes here.

Provenance

The following attestation bundles were made for kiapi-0.6.0.tar.gz:

Publisher: release-pypi.yml on kiarina/kiapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kiapi-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: kiapi-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 426.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kiapi-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab23ee1748ab8e05f3286887180f9e02cc2a5ad0b932464049e4da3e433e498
MD5 1d5edc8cd05a52cfd3ed27337bb2dae6
BLAKE2b-256 dc9d6b198e08a896efe800062ca33c512c8a73ca28e7b39234d20bd9e89af2d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for kiapi-0.6.0-py3-none-any.whl:

Publisher: release-pypi.yml on kiarina/kiapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

1 file

0.5.0

2 files

0.3.0

1 file

0.2.0

2 files

0.1.0

2 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