veylox
One key. Every model.
Paste in an API key from any major LLM provider. veylox works out which provider it belongs to and gives you a client for every model behind it, using the same simple methods no matter the provider.
import veylox
client = veylox.connect("sk-ant-...") # any supported key
print(client.provider) # "anthropic"
reply = client.chat("Explain recursion in one sentence.", model="claude-sonnet-4-5")
print(reply)
- No provider setup. The key decides the provider. No
"openai/..."model prefixes, no per-provider SDKs. - Same methods everywhere.
chat,stream,list_models,verify, with async versions of each. - Clear errors. Missing parameters are caught before any request is sent, and a mistyped model name comes back with "did you mean" suggestions.
- Lightweight. One dependency (
httpx). Fully typed. - Safe by default. Your full key never appears in printed objects, logs or error messages.
Install
pip install veylox
Python 3.10 or newer.
Supported providers
| Provider | Key looks like | client.provider |
|---|---|---|
| OpenAI | sk-..., sk-proj-... |
"openai" |
| Anthropic | sk-ant-... |
"anthropic" |
| Google Gemini | AIza... |
"gemini" |
| Groq | gsk_... |
"groq" |
| Mistral | 32 letters and digits | "mistral" |
| OpenRouter | sk-or-... |
"openrouter" |
If your key has another format, tell veylox which provider it belongs to: veylox.connect(key, provider="gemini").
Usage
Which provider is my key for?
client = veylox.connect(key)
client.provider # "groq"
client.provider_info # ProviderInfo(id='groq', name='Groq', base_url='https://api.groq.com/openai/v1',
# key_hint='gsk_...x9Q2', detected_by='prefix')
veylox.detect_provider("AIza...") # "gemini", without making a client or a network call
Chat
reply = client.chat(
[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "What is the capital of Japan?"},
],
model="gpt-4o-mini",
temperature=0.2,
max_tokens=100,
)
reply.text # "Tokyo."
reply.usage # Usage(input_tokens=24, output_tokens=3, total_tokens=27)
reply.finish_reason # "stop"
reply.raw # the provider's full JSON response
messages can be a plain string (one user message) or a list of {"role", "content"} dicts. model is required. Everything else is optional:
| Parameter | Meaning |
|---|---|
system |
Instructions for the model |
max_tokens |
Maximum reply length (veylox sends 4096 to Anthropic if you leave it out, because Anthropic requires it) |
temperature |
Randomness: 0 is focused, higher is more creative |
top_p |
Nucleus sampling, 0 to 1 |
stop |
A string or list of strings that ends the reply |
**extra |
Any provider-specific option, passed through unchanged |
Stream
for chunk in client.stream("Write a short poem about the sea.", model="gemini-2.5-flash"):
print(chunk, end="", flush=True)
List models
client.list_models() # ['gpt-4o', 'gpt-4o-mini', ...]
Check a key works
client = veylox.connect(key, verify=True) # raises AuthenticationError if the key is rejected
# or later:
client.verify() # True
Async
Every method has an _async version:
reply = await client.chat_async("Hi!", model="llama-3.3-70b-versatile")
async for chunk in client.stream_async("Hi!", model="llama-3.3-70b-versatile"):
print(chunk, end="")
models = await client.list_models_async()
Errors
Everything veylox raises inherits from veylox.VeyloxError:
try:
client.chat("Hi", model="gpt-4o-mnii")
except veylox.ModelNotFoundError as e:
print(e.suggestions) # ['gpt-4o-mini', ...]
except veylox.AuthenticationError:
print("Bad or revoked key")
except veylox.PermissionDeniedError:
print("Key is fine, but this model or region isn't allowed")
except veylox.RateLimitError:
print("Slow down, or top up your quota")
except veylox.VeyloxError as e:
print(e)
| Error | When |
|---|---|
UnknownKeyError |
The key's provider can't be detected |
InvalidRequestError |
A parameter is missing or invalid |
AuthenticationError |
The provider rejected the key |
PermissionDeniedError |
The key is valid but access was refused (model, plan or region) |
ModelNotFoundError |
The model doesn't exist (.suggestions has close matches) |
RateLimitError |
Too many requests, or out of quota |
ProviderError |
The provider failed, timed out, couldn't be reached, or the URL was wrong (404) |
Documentation
The guides live in the docs/ folder and read fine on GitHub:
Every public function and class also has a full docstring, so help(veylox.connect) or your editor's hover shows the details.
To browse the full docs site, including the generated API reference, on your own machine:
pip install -e ".[docs]"
mkdocs serve # then open http://127.0.0.1:8000
License
MIT
Metadata
Release files for veylox 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veylox-0.1.0.tar.gz | 31.0 kB | With provenance | Details for veylox-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veylox-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for veylox-0.1.0-py3-none-any.whl |
Total release size: 59.3 kB
Release files / veylox-0.1.0.tar.gz
| Download URL | veylox-0.1.0.tar.gz |
|---|---|
| Size | 31.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a82eacbd016c8bda1b70fa618e99eab6e4cdebcdb2f13bf4e4ce8888ae70148
|
|
BLAKE2b-256 checksum How to use checksums |
ef537ba4b8ee5bea854554dccb9178a2f14f8d14e26efa1cb65de8c17cbe849d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / veylox-0.1.0-py3-none-any.whl
| Download URL | veylox-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d133036715231b8a7b5b434daa38943e547fe99e428a90e248301132d718e1b
|
|
BLAKE2b-256 checksum How to use checksums |
5e3c315a3a004882dc923b22bde98b2b2efcac30bfa5e148065fd9234929e6f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for veylox 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for veylox-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.