LLM client library
The project, data and links on this page are made up, to show what dokk’s components can do. It does not document dokk itself.
quill is a small Python client that talks to several model providers through one API. This page is its quickstart.
Install #
pip install quill-llm
uv add quill-llm
poetry add quill-llm
Optional extras add a provider’s own SDK for streaming and batch jobs:
uv add "quill-llm[anthropic,openai]"
pip install "quill-llm[anthropic,openai]"
Configure #
quill reads its settings from the environment, or from a .env file in the working folder.
Set the key for each provider you use.
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY required |
— | Key for Claude models. |
OPENAI_API_KEY required |
— | Key for GPT models. |
QUILL_DEFAULT_MODEL |
claude-sonnet |
Used when a call names no model. |
QUILL_TIMEOUT |
60 |
Seconds before a request gives up. |
QUILL_LOG_LEVEL |
warning |
debug, info, warning or error. |
Never commit .env. Add it to .gitignore before you put a key in it.
Your first call #
from quill import Client
client = Client()
reply = client.chat("Explain recursion in one sentence.")
print(reply.text)
import asyncio
from quill import AsyncClient
async def main() -> None:
client = AsyncClient()
reply = await client.chat("Explain recursion in one sentence.")
print(reply.text)
asyncio.run(main())
What the call sends, and what comes back:
Explain recursion in one sentence.
Recursion is when a function solves a problem by calling itself on a smaller piece of the same problem, until the piece is small enough to answer directly.
Supported providers #
Pick a model by its name, such as client.chat(..., model="gpt-mini"). quill maps it to the
provider’s API name.
| claude-sonnet | gpt-mini | mistral-small | llama-local | |
|---|---|---|---|---|
| Provider | Anthropic | OpenAI | Mistral AI | Ollama |
| Input / 1M | — | — | — | free |
| Output / 1M | — | — | — | free |
| Context | 200K | 128K | 32K | 8K |
| License | — | — | Apache-2.0 | — |
| Features | text vision tools streaming | text vision tools json | text tools | text |
Prices and limits change often; quill’s docs leave them to each provider’s pricing page.