from vlmrun.client import VLMRun
# Initialize the client
client = VLMRun()
# Process an image from a URL
response = client.image.generate(
urls=["https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.invoice/invoice_1.jpg"],
domain="document.invoice"
)
# Check if processing completed
if response.status == "completed":
# `response.response` is returned as a dictionary by default,
# so access fields with `.get()` or `[ ]` indexing.
invoice = response.response
print(f"Invoice #: {invoice.get('invoice_number')}")
print(f"Total: ${invoice.get('total_amount')}")