The VLM Run Python SDK is the official Python SDK for VLM Run API platform, providing a convenient way to interact with our REST APIs.
🚀 Getting Started
Installation
pip install vlmrun
Installation with Optional Features
The package provides optional features that can be installed based on your needs:
-
Video processing features (numpy, opencv-python):
pip install "vlmrun[video]"
-
Document processing features (pypdfium2):
pip install "vlmrun[doc]"
-
Visualization and notebook helpers (pandas, IPython):
pip install "vlmrun[all]"
-
All optional features:
pip install "vlmrun[all]"
The CLI and OpenAI-compatible gateway (vlmrun gw chat, vlmrun chat) work out of the box with pip install vlmrun.
Basic Usage
from PIL import Image
from vlmrun.client import VLMRun
from vlmrun.common.utils import remote_image
# Initialize the client
client = VLMRun(api_key="<your-api-key>")
# Process an image using local file or remote URL
image: Image.Image = remote_image("https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.invoice/invoice_1.jpg")
response = client.image.generate(
images=[image],
domain="document.invoice"
)
print(response)
# Or process an image directly from URL
response = client.image.generate(
urls=["https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.invoice/invoice_1.jpg"],
domain="document.invoice"
)
print(response)
OpenAI-Compatible Chat Completions
The VLM Run SDK provides OpenAI-compatible chat completions through the agent endpoint. This allows you to use the familiar OpenAI API with VLM Run's powerful vision-language models.
from vlmrun.client import VLMRun
client = VLMRun(
api_key="your-key",
base_url="https://api.vlm.run/v1"
)
response = client.agent.completions.create(
model="vlmrun-orion-1",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
For async support:
import asyncio
from vlmrun.client import VLMRun
client = VLMRun(api_key="your-key", base_url="https://api.vlm.run/v1")
async def main():
response = await client.agent.async_completions.create(
model="vlmrun-orion-1",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
asyncio.run(main())
CLI Chat with Skills
The vlmrun chat command supports skills — local directories containing a SKILL.md and optional assets that give the agent domain-specific expertise. Skills are sent inline with each request (no server-side upload required).
# Chat with an inline skill
vlmrun chat "Generate a youtube thumbnail for a video using the VLM Run brand colors" -k ./path/to/vlmrun-branding/
# Attach multiple skills (coming soon)
vlmrun chat "Analyze this invoice" -i invoice.pdf -k ./accounting-skills/ -k ./invoice-extraction/
To create a persistent server-side skill, use vlmrun skills upload ./my-skill/.
Claude Code
Install the VLM Run CLI skill directly in Claude Code via the plugin marketplace in the vlm-run/skills repository:
- Register the repository as a plugin marketplace:
/plugin marketplace add vlm-run/skills
- Install the skill:
/plugin install vlmrun-cli-skill@vlm-run/skills
- Configure your API key and base URL using the CLI (get your key from app.vlm.run):
vlmrun config init
vlmrun config set --api-key <your-api-key>
vlmrun config show
- Verify the skill is loaded by asking Claude Code (requires restart):
What skills are available in the /vlmrun-cli-skill?
🔗 Quick Links
- 💬 Need help? Email us at support@vlm.run or join our Discord
- 📚 Check out our Documentation
- 📣 Follow us on Twitter and LinkedIn
Release files for vlmrun 0.7.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vlmrun-0.7.6.tar.gz | 116.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vlmrun-0.7.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 232.0 kB
Release files / vlmrun-0.7.6.tar.gz
| Download URL | vlmrun-0.7.6.tar.gz |
|---|---|
| Size | 116.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
700b5066b0a1cffcb06d8fc60385dfd21cffff324cba3aed5ec9ed56369e39e2
|
|
BLAKE2b-256 checksum How to use checksums |
a9b646762e931d785bd63cc78d18608b9bc8486cc1d8f1020648bbc725481eba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / vlmrun-0.7.6-py3-none-any.whl
| Download URL | vlmrun-0.7.6-py3-none-any.whl |
|---|---|
| Size | 115.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6225c356f553f9589b30addceb8ceac80070e75471b3a4f15ad08cefe5cbafca
|
|
BLAKE2b-256 checksum How to use checksums |
842ce10ec6b060c5e0463cbc2eaf487831d4e06937a4b7b4fbf85e7f49838798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|