LlamaIndex Model API Integration
Use Modal Model APIs and Endpoints with LlamaIndex.
uv add llama-index-llms-modal
Usage
Create a proxy token and grant it access to your Model API's or Endpoint's environment:
modal workspace proxy-tokens create
modal workspace proxy-tokens allow <token-id> <environment-name>
For Model APIs, pass the hostname shown in the dashboard as the model and the token in its combined wk-<id>.ws-<secret> form:
from llama_index.llms.modal import Modal
llm = Modal(
model="my-endpoint.us-west.modal.direct",
proxy_token="wk-<id>.ws-<secret>",
)
response = llm.complete("Hello, world!")
Use region to select another shared gateway (us-west default, us-east, ca-central, eu-west, ap-south):
llm = Modal(model="my-endpoint.eu-west.modal.direct", region="eu-west")
For a dedicated Endpoint, pass its base URL:
llm = Modal(
model="Qwen/Qwen3.5-4B",
endpoint_url="https://my-endpoint.us-west.modal.direct",
)
For any other OpenAI-compatible serving stack deployed on Modal (e.g. a self-hosted vLLM app), pass api_base directly.
Set context_window to your model's context window, and is_function_calling_model=True if the deployment supports OpenAI tool calling.
Metadata
Release files for llama-index-llms-modal 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 |
|---|---|---|---|---|
| llama_index_llms_modal-0.1.0.tar.gz | 3.9 kB | With provenance | Details for llama_index_llms_modal-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_llms_modal-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_llms_modal-0.1.0-py3-none-any.whl |
Total release size: 9.0 kB
Release files / llama_index_llms_modal-0.1.0.tar.gz
| Download URL | llama_index_llms_modal-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f372db746e75870d4f6b7f1c75caf4fa2978b59308cae04d572feff5a074c57c
|
|
BLAKE2b-256 checksum How to use checksums |
2e3dee1b479f360500eec2930e3c0f9a76ebbfef43f375c4cf81b18339ca7f22
|
| 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 26, 2026.
Transparency logRelease files / llama_index_llms_modal-0.1.0-py3-none-any.whl
| Download URL | llama_index_llms_modal-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5347538604602ed94c72b7e77f4acc71a2d83b8c695b74b0b024fe9d6ba987d2
|
|
BLAKE2b-256 checksum How to use checksums |
811713fb355d2a7270e3c84521332db71ded510cd275c27c950c1b5b9249e9db
|
| 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 26, 2026.
Transparency logSecurity for llama-index-llms-modal 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 llama_index_llms_modal-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 26, 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.