← upfile.sh

OpenAI API

File Upload API for OpenAI

Upload files from your terminal or scripts and get permanent CDN URLs for use in OpenAI API calls — Assistants, vision, function calling, anything.

# Install once

$ npm install -g upfilesh


# Upload your file

$ upfile screenshot.png

https://cdn.upfile.sh/abc123.png

Why use upfile with OpenAI?

Permanent URLs
Share files across API calls without re-uploading. URLs never expire.
CLI + API
One command from terminal, or use the REST API in any language.
Agent-native
AI agents can self-upload: signup, upload, use URL — fully autonomous.
Free tier
1GB storage free. No credit card required to start.

GPT-4o Python Example

import subprocess, openai

# Upload file, get permanent URL
url = subprocess.check_output(["upfile", "image.png"]).decode().strip()

client = openai.OpenAI()
response = client.chat.completions.create(
  model="gpt-4o",
  messages=[{
    "role": "user",
    "content": [
      {"type": "image_url", "image_url": {"url": url}},
      {"type": "text", "text": "What's in this image?"}
    ]
  }]
)