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.5
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.5.tar.gz | 116.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vlmrun-0.7.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 232.0 kB
Release files / vlmrun-0.7.5.tar.gz
| Download URL | vlmrun-0.7.5.tar.gz |
|---|---|
| Size | 116.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d70dff3cb7e0b0504cfb321861e894b1d625dd67677ef9012cbbf91590adc49
|
|
BLAKE2b-256 checksum How to use checksums |
4831a32c2f4d007e1e5ae1fb673668653ad00d21dcd9e28061511964ccad3c1c
|
| 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.5-py3-none-any.whl
| Download URL | vlmrun-0.7.5-py3-none-any.whl |
|---|---|
| Size | 115.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1945d7b0cb0d0a4dd3de84418ae66187d4391305e6110708b3c85128882fcc51
|
|
BLAKE2b-256 checksum How to use checksums |
754f9025ff09dd3cae4db0183cb56853a3e5fba5511a014aa39f022e0f6c6ee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|