PHPackages                             kreuzberg-dev/liter-llm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kreuzberg-dev/liter-llm

Active[API Development](/categories/api)

kreuzberg-dev/liter-llm
=======================

214015[2 issues](https://github.com/kreuzberg-dev/liter-llm/issues)RustCI passing

Pushed today1 watchersCompare

[ Source](https://github.com/kreuzberg-dev/liter-llm)[ Packagist](https://packagist.org/packages/kreuzberg-dev/liter-llm)[ RSS](/packages/kreuzberg-dev-liter-llm/feed)WikiDiscussions main Synced today

READMEChangelog (10)DependenciesVersionsUsed By (0)

liter-llm
=========

[](#liter-llm)

 [ ![Bindings](https://camo.githubusercontent.com/23b2c7873e51d39aafa797a5571f07783c505f083f976594e38024d10eb4e433/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f42696e64696e67732d616c65662532302544372539302d303037656336) ](https://github.com/kreuzberg-dev/alef) [ ![Rust](https://camo.githubusercontent.com/5e0e1e81af4e148d2fe6e84ea6baa20203dffd1614c2b3dd0a385765f2f94627/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6c697465722d6c6c6d3f6c6162656c3d5275737426636f6c6f723d303037656336) ](https://crates.io/crates/liter-llm) [ ![Python](https://camo.githubusercontent.com/be6d36408f87ce8c92a07f44e5abac12b8ef0450ff30d20b90d03faf6124c729/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6c697465722d6c6c6d3f6c6162656c3d507974686f6e26636f6c6f723d303037656336) ](https://pypi.org/project/liter-llm/) [ ![Node.js](https://camo.githubusercontent.com/de7625dddc2f369d4942f62b570f42fbb315eda6952512cc6e2f43082ae625a7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406b7265757a626572672f6c697465722d6c6c6d3f6c6162656c3d4e6f64652e6a7326636f6c6f723d303037656336) ](https://www.npmjs.com/package/@kreuzberg/liter-llm) [ ![WASM](https://camo.githubusercontent.com/91c0d7511d5d53e5f0e411e3565eba8744949339ab9c5affe25a69f76eac093e/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406b7265757a626572672f6c697465722d6c6c6d2d7761736d3f6c6162656c3d5741534d26636f6c6f723d303037656336) ](https://www.npmjs.com/package/@kreuzberg/liter-llm-wasm) [ ![Java](https://camo.githubusercontent.com/2eb4c6934df7e96e0d1641f6bd001f943bbe25b7b8ed4fca95eab750516f7b33/68747470733a2f2f696d672e736869656c64732e696f2f6d6176656e2d63656e7472616c2f762f6465762e6b7265757a626572672e6c697465726c6c6d2f6c697465722d6c6c6d3f6c6162656c3d4a61766126636f6c6f723d303037656336) ](https://central.sonatype.com/artifact/dev.kreuzberg.literllm/liter-llm) [ ![Go](https://camo.githubusercontent.com/7dba1f8124ca9d9dc112ba46d67f1d7e72fee01819fa88d8489ae890ce9cb178/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6b7265757a626572672d6465762f6c697465722d6c6c6d3f6c6162656c3d476f26636f6c6f723d303037656336) ](https://github.com/kreuzberg-dev/liter-llm/tree/main/packages/go) [ ![C#](https://camo.githubusercontent.com/913d82218ab797d4b7d971fd9a312f7199f664cd87942d20efe3e4337b4eba58/68747470733a2f2f696d672e736869656c64732e696f2f6e756765742f762f4c697465724c6c6d3f6c6162656c3d4325323326636f6c6f723d303037656336) ](https://www.nuget.org/packages/LiterLlm) [ ![PHP](https://camo.githubusercontent.com/b70d2fffb7bfb1a30834e4feb1951aa17291f530dd6e3139ad97ab62b9d2830d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b7265757a626572672d6465762f6c697465722d6c6c6d3f6c6162656c3d50485026636f6c6f723d303037656336) ](https://packagist.org/packages/kreuzberg-dev/liter-llm) [ ![Ruby](https://camo.githubusercontent.com/3330365b40db2e36aa119aff0895d65d1528145a77278f9e9805dbcefe606a5d/68747470733a2f2f696d672e736869656c64732e696f2f67656d2f762f6c697465725f6c6c6d3f6c6162656c3d5275627926636f6c6f723d303037656336) ](https://rubygems.org/gems/liter_llm) [ ![Elixir](https://camo.githubusercontent.com/d1a8f034af793514d50387310a93f989a23a3b4f5500ac6b46141b62878fe970/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f762f6c697465725f6c6c6d3f6c6162656c3d456c6978697226636f6c6f723d303037656336) ](https://hex.pm/packages/liter_llm) [ ![Docker](https://camo.githubusercontent.com/32cec0d80520c2e9872e7c80e7f3d5d6b916c41998b25dddb1289399cbc8ba0c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f636b65722d3030376563363f6c6f676f3d646f636b6572266c6f676f436f6c6f723d7768697465) ](https://github.com/kreuzberg-dev/liter-llm/pkgs/container/liter-llm) [ ![Homebrew](https://camo.githubusercontent.com/89adc3bced935477f7a304616be593e795f30dafef2d47ab950f5d1c4f0cd387/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486f6d65627265772d3030376563363f6c6f676f3d686f6d6562726577266c6f676f436f6c6f723d7768697465) ](https://github.com/kreuzberg-dev/homebrew-tap/blob/main/Formula/liter-llm.rb) [ ![C FFI](https://camo.githubusercontent.com/41b9c58c3810775402965a3a7652da9832ea83391c1ff255081e5551900db8f2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f432d4646492d303037656336) ](https://github.com/kreuzberg-dev/liter-llm/tree/main/crates/liter-llm-ffi)```

```

 [ ![Join Discord](https://camo.githubusercontent.com/c3d59355bb5f7fc8224936ba897a06b87e5ba6f52bd08dfd2f7f78bf669c550d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436861742d3030376563363f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465) ](https://discord.gg/xt9WY3GnKR)

**A lighter, faster, safer universal LLM API client** — one Rust core, 14 native language bindings, 143 providers.

What and Why?
-------------

[](#what-and-why)

liter-llm is a universal LLM API client compiled from the ground up in Rust: one core, 14 native language bindings, and 143 providers. No interpreter, no transitive dependency tree, no supply-chain surface area — and a drop-in OpenAI-compatible proxy plus an MCP server in a single 35 MB binary.

- **Compiled Rust core** — no `pip install` supply chain, no `.pth` auto-execution hooks, no runtime dependency tree to compromise.
- **Secrets stay secret** — API keys are wrapped in [`secrecy::SecretString`](https://docs.rs/secrecy/): zeroed on drop, redacted in logs, never serialized.
- **Polyglot from day one** — Python, TypeScript, Go, Java, Kotlin, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, and WebAssembly, all thin wrappers over the same Rust core, plus a C/FFI surface for everything else.
- **Observability built in** — production-grade [OpenTelemetry](https://opentelemetry.io/) with GenAI semantic conventions, not an afterthought callback system.
- **Composable middleware** — rate limiting, caching, cost tracking, health checks, and fallback as [Tower](https://docs.rs/tower/) layers you stack like building blocks.

We credit [litellm](https://github.com/BerriAI/litellm) for proving the category; our provider registry was bootstrapped from theirs. See [ATTRIBUTIONS.md](ATTRIBUTIONS.md).

### Features

[](#features)

FeatureDescription**143 providers**OpenAI, Anthropic, Google, AWS Bedrock, Groq, Mistral, Together, Fireworks, DeepSeek, Cohere, and 130+ more — compiled at build time**14 native bindings**Rust, Python, Node.js, Go, Java, Kotlin, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, WebAssembly — plus a shared C/FFI surface**First-class streaming**SSE and AWS EventStream binary protocol with zero-copy buffers**Proxy &amp; MCP server**Drop-in OpenAI-compatible proxy (22 endpoints) and MCP tool server in a 35 MB Docker image**Tower middleware**Rate limiting, caching (40+ OpenDAL backends), cost tracking, budget enforcement, health checks, and fallback — all composable**Observability**OpenTelemetry with GenAI semantic conventions, cost-tracking spans, and HTTP-level tracing**Tool calling**Parallel tools, structured outputs, and JSON-schema validation**Search &amp; OCR**Web search across 12 providers, document OCR across 4**TOML configuration**`liter-llm.toml` auto-discovery, custom providers, cache backends, and middleware config**Local LLM support**Ollama, LM Studio, vLLM, llama.cpp, LocalAI, and llamafile via OpenAI-compatible APIs [ ![Star liter-llm on GitHub](docs/assets/star.gif) ](https://github.com/kreuzberg-dev/liter-llm/stargazers)

**⭐ Star this repo to show your support — it helps others discover liter-llm.**

Quick Start
-----------

[](#quick-start)

### Language Packages

[](#language-packages)

**Python**```
pip install liter-llm
```

See [Python README](packages/python/README.md) for full documentation.

**Node.js**```
pnpm add @kreuzberg/liter-llm
```

See [Node.js README](crates/liter-llm-node/README.md) for full documentation.

**Rust**```
cargo add liter-llm
```

See [Rust crate](crates/liter-llm) for full documentation.

**Go**```
go get github.com/kreuzberg-dev/liter-llm/packages/go
```

See [Go README](packages/go/README.md) for full documentation.

**Java**Available on Maven Central as `dev.kreuzberg.literllm:liter-llm`. See [Java README](packages/java/README.md) for the dependency snippet and current version.

**Ruby**```
gem install liter_llm
```

See [Ruby README](packages/ruby/README.md) for full documentation.

**PHP**```
composer require kreuzberg-dev/liter-llm
```

See [PHP README](packages/php/README.md) for full documentation.

**C#**```
dotnet add package LiterLlm
```

See [.NET README](packages/csharp/README.md) for full documentation.

**Elixir**Add `{:liter_llm, "~> 1.6"}` to your `mix.exs` dependencies. See [Elixir README](packages/elixir/README.md) for full documentation.

**Dart / Flutter**```
dart pub add liter_llm
```

See [Dart README](packages/dart/README.md) for full documentation.

**Swift**Add via Swift Package Manager. See [Swift README](packages/swift/README.md) for full documentation.

**Kotlin (Android)**Available on Maven Central as `dev.kreuzberg:liter-llm-android`. See [Kotlin README](packages/kotlin-android/README.md) for the dependency snippet and current version.

**Zig**See [Zig README](packages/zig/README.md) for installation and usage.

**WebAssembly**```
pnpm add @kreuzberg/liter-llm-wasm
```

See [WebAssembly README](crates/liter-llm-wasm/README.md) for full documentation.

**C/C++ (FFI)**Build from source as part of this workspace. See [FFI crate](crates/liter-llm-ffi) for full documentation.

**CLI, Proxy &amp; MCP Server**The `liter-llm` CLI ships both the OpenAI-compatible proxy and the MCP tool server. Install it any of these ways:

```
brew install kreuzberg-dev/tap/liter-llm
cargo install liter-llm-cli                 # from crates.io
npx @kreuzberg/liter-llm-cli --help         # npm (self-installs the binary)
docker run -p 4000:4000 -e LITER_LLM_MASTER_KEY=sk-your-key ghcr.io/kreuzberg-dev/liter-llm
```

Then run the proxy or the MCP server:

```
liter-llm api --config liter-llm-proxy.toml   # OpenAI-compatible proxy (22 endpoints)
liter-llm mcp --transport stdio               # MCP tool server (stdio)
liter-llm mcp --transport http --port 3001    # MCP tool server (Streamable HTTP)
```

See the [MCP server guide](https://docs.liter-llm.kreuzberg.dev/server/mcp-server/) and the [proxy guide](https://docs.liter-llm.kreuzberg.dev/server/proxy-server/) for transports, routing, virtual keys, and budgets. To use the MCP server inside a coding agent, install the **liter-llm plugin** (below) — it auto-registers the server, no manual config required.

### AI Coding Assistants

[](#ai-coding-assistants)

Install the liter-llm plugin from the [`kreuzberg-dev/plugins`](https://github.com/kreuzberg-dev/plugins) marketplace. It ships the liter-llm agent skills (chat, streaming, tools, embeddings across 143 providers) and works with every major coding agent — expand your harness below.

**Claude Code**```
/plugin marketplace add kreuzberg-dev/plugins
/plugin install liter-llm@kreuzberg

```

**Codex CLI**```
/plugins add https://github.com/kreuzberg-dev/plugins

```

Then search for `liter-llm` and select **Install Plugin**.

**Cursor**Settings → Plugins → Add from URL → `https://github.com/kreuzberg-dev/plugins`, then select **liter-llm**.

**Gemini CLI**```
gemini extensions install https://github.com/kreuzberg-dev/plugins

```

**Factory Droid**```
droid plugin marketplace add https://github.com/kreuzberg-dev/plugins
droid plugin install liter-llm@kreuzberg

```

**GitHub Copilot CLI**```
copilot plugin marketplace add https://github.com/kreuzberg-dev/plugins
copilot plugin install liter-llm@kreuzberg

```

**opencode**Not yet published as an opencode package. Install via any harness above (self-hosted marketplace); opencode support is tracked in [`kreuzberg-dev/plugins`](https://github.com/kreuzberg-dev/plugins).

Documentation
-------------

[](#documentation)

Full guides, the unified `chat()` API for every binding, multimodal I/O, the proxy/gateway, and the complete provider list live at **[docs.liter-llm.kreuzberg.dev](https://docs.liter-llm.kreuzberg.dev)**.

Contributing
------------

[](#contributing)

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

Join our [Discord community](https://discord.gg/xt9WY3GnKR) for questions and discussion.

Part of Kreuzberg.dev
---------------------

[](#part-of-kreuzbergdev)

- [Kreuzberg](https://github.com/kreuzberg-dev/kreuzberg) — document intelligence: text, tables, metadata from 91+ formats with optional OCR.
- [Kreuzberg Cloud](https://github.com/kreuzberg-dev/kreuzberg-cloud) — managed extraction API with SDKs, dashboards, and observability.
- [kreuzcrawl](https://github.com/kreuzberg-dev/kreuzcrawl) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
- [html-to-markdown](https://github.com/kreuzberg-dev/html-to-markdown) — fast, lossless HTML→Markdown engine.
- [liter-llm](https://github.com/kreuzberg-dev/liter-llm) — universal LLM API client with native bindings for 14 languages and 143 providers.
- [tree-sitter-language-pack](https://github.com/kreuzberg-dev/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
- [alef](https://github.com/kreuzberg-dev/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance65

Regular maintenance activity

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 Bus Factor1

Top contributor holds 86.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30733348?v=4)[Na'aman Hirschfeld](/maintainers/Goldziher)[@Goldziher](https://github.com/Goldziher)

---

Top Contributors

[![Goldziher](https://avatars.githubusercontent.com/u/30733348?v=4)](https://github.com/Goldziher "Goldziher (1026 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (66 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (51 commits)")[![kreuzberg-dev-publisher[bot]](https://avatars.githubusercontent.com/u/241328462?v=4)](https://github.com/kreuzberg-dev-publisher[bot] "kreuzberg-dev-publisher[bot] (31 commits)")[![kh3rld](https://avatars.githubusercontent.com/u/171191586?v=4)](https://github.com/kh3rld "kh3rld (3 commits)")[![pratik-mahalle](https://avatars.githubusercontent.com/u/124587957?v=4)](https://github.com/pratik-mahalle "pratik-mahalle (2 commits)")[![v-tan](https://avatars.githubusercontent.com/u/22367932?v=4)](https://github.com/v-tan "v-tan (2 commits)")[![oschick](https://avatars.githubusercontent.com/u/12664356?v=4)](https://github.com/oschick "oschick (1 commits)")

---

Tags

anthropicapi-clientllmmachine-learningopenaipolyglotpythonruststreamingtypescript

### Embed Badge

![Health badge](/badges/kreuzberg-dev-liter-llm/health.svg)

```
[![Health](https://phpackages.com/badges/kreuzberg-dev-liter-llm/health.svg)](https://phpackages.com/packages/kreuzberg-dev-liter-llm)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
