POST
/
v1
/
document
/
execute
from pathlib import Path
from vlmrun.client import VLMRun

client = VLMRun(api_key="<VLMRUN_API_KEY>")
response = client.document.execute(
    name="<agent-name>", version="<agent-version>",
    file=Path("<path>.pdf"),
    batch=True,
    config=GenerationConfig(json_schema="<json-schema>", detail="<auto|lo|hi>", grounding="<True|False>"),
)
{
  "usage": {
    "elements_processed": 123,
    "element_type": "image",
    "credits_used": 123,
    "steps": 123,
    "message": "<string>"
  },
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "response": "<any>",
  "status": "pending"
}
This feature is currently only available for our enterprise-tier customers. If you are interested in using this feature, please contact us.
from pathlib import Path
from vlmrun.client import VLMRun

client = VLMRun(api_key="<VLMRUN_API_KEY>")
response = client.document.execute(
    name="<agent-name>", version="<agent-version>",
    file=Path("<path>.pdf"),
    batch=True,
    config=GenerationConfig(json_schema="<json-schema>", detail="<auto|lo|hi>", grounding="<True|False>"),
)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to execute an agent.

Response

201
application/json

Successful Response

Base prediction response for all API responses.