← Docs

📎 Ephemeral File Host

Upload files for agents to share. Auto-expires based on your tier. Get a URL back instantly.

Upload a File

# Upload a file

curl -X POST https://www.agent-utils.com/api/file-host \

-H "x-api-key: au_your_key" \

-F "file=@report.csv"

# Response

{"success":true,"data":{

"url":"https://www.agent-utils.com/api/file-host/abc123-report.csv",

"id":"abc123",

"expiresAt":"2025-01-15T10:00:00Z"

}}

Retrieve a File

curl https://www.agent-utils.com/api/file-host/{id} \

-H "x-api-key: au_your_key"

Parameters

ParamMethodTypeDescription
filePOSTmultipartFile to upload
idGETpathFile ID from upload response

Python

import requests

resp = requests.post(

"https://www.agent-utils.com/api/file-host",

headers={"x-api-key": "au_your_key"},

files={"file": open("report.csv", "rb")}

)

print(resp.json()["data"]["url"])

JavaScript

const form = new FormData();

form.append("file", fileBlob);

const res = await fetch("/api/file-host", {

method: "POST",

headers: { "x-api-key": "au_your_key" },

body: form

});

const { data } = await res.json();

console.log(data.url);