POST
/
v1
/
files
!pip install vlmrun

from vlmrun.client import VLMRun

client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Upload the file to the object store
response = client.files.upload(file=Path("test.pdf"))

# Sample response
{
    "id": "file_123",
    "filename": "test.pdf",
    "bytes": 1024,
    "purpose": "assistants",
    "created_at": "2025-01-01T00:00:00Z",
    "object": "file",
    "public_url": "https://vlm.run/files/file_123"
}
{
  "id": "<string>",
  "filename": "<string>",
  "bytes": 123,
  "purpose": "assistants",
  "created_at": "2023-11-07T05:31:56Z",
  "object": "file",
  "public_url": "<string>"
}
!pip install vlmrun

from vlmrun.client import VLMRun

client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Upload the file to the object store
response = client.files.upload(file=Path("test.pdf"))

# Sample response
{
    "id": "file_123",
    "filename": "test.pdf",
    "bytes": 1024,
    "purpose": "assistants",
    "created_at": "2025-01-01T00:00:00Z",
    "object": "file",
    "public_url": "https://vlm.run/files/file_123"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

purpose
enum<string>
default:assistants
Available options:
assistants,
batch,
fine-tune,
vision,
datasets
generate_public_url
boolean
default:true

Whether to generate a public URL for the uploaded file

Body

multipart/form-data
file
file
required

Response

Successful Response

Response to the file upload API.

filename
string | null
required

Name of the file

bytes
integer
required

Size of the file in bytes

purpose
enum<string>
required

Purpose of the file

Available options:
assistants,
batch,
fine-tune,
vision,
datasets
id
string | null

Unique identifier of the file

created_at
string<date-time>

Date and time when the file was created (in UTC timezone)

object
string
default:file

Type of the file

Allowed value: "file"
public_url
string | null

Presigned URL of the file