!pip install vlmrun
from vlmrun.client import VLMRun
from pathlib import Path
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Upload the file to the object store
response = client.files.upload(file=Path("test.pdf"))
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
// Upload the file to the object store
const response = await client.files.upload({ filePath: "test.pdf" });
console.log(response);
{
"filename": "<string>",
"bytes": 123,
"purpose": "assistants",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "file",
"public_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Files
Upload File
Upload a file.
POST
/
v1
/
files
!pip install vlmrun
from vlmrun.client import VLMRun
from pathlib import Path
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Upload the file to the object store
response = client.files.upload(file=Path("test.pdf"))
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
// Upload the file to the object store
const response = await client.files.upload({ filePath: "test.pdf" });
console.log(response);
{
"filename": "<string>",
"bytes": 123,
"purpose": "assistants",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "file",
"public_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}!pip install vlmrun
from vlmrun.client import VLMRun
from pathlib import Path
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Upload the file to the object store
response = client.files.upload(file=Path("test.pdf"))
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
// Upload the file to the object store
const response = await client.files.upload({ filePath: "test.pdf" });
console.log(response);
Authorizations
Query Parameters
Response
Successful Response
Response to the file upload API.