Store files and give agents knowledge
Upload with the API, share public links on tengochat.com, attach files to agents.
Keep files on tengochat.com: images and video for your app, documents for your agents. Upload with the API or in Create, Developers, Storage.
Upload
curl https://tengochat.com/api/v1/files \
-H "Authorization: Bearer $TENGOCHAT_API_KEY" \
-F [email protected] \
-F visibility=privateimport os, requests
res = requests.post(
"https://tengochat.com/api/v1/files",
headers={"Authorization": f"Bearer {os.environ['TENGOCHAT_API_KEY']}"},
files={"file": open("handbook.md", "rb")},
data={"visibility": "private"},
)
file = res.json()
print(file["id"], file["url"])Public and private
A public file has an address that never changes, like https://tengochat.com/f/file_.../logo.png, good for images in your app. A private file's url is a link that works for an hour; ask for the file again (GET /files/{id}) for a fresh one. Change it any time with POST /files/{id} and {"visibility": "public"}.
Video and audio play with seeking (byte ranges). Files that could run as a web page (HTML, SVG) always download instead of opening, to keep your visitors safe.
Knowledge for agents
Attach text files (Markdown, text, CSV, JSON, HTML, code) to an agent in its builder. Small files are read whole; for larger ones the agent gets the passages most about the question, and with Search its files on, it can look up more itself.
Plans
| Free | 0.25 GB, files up to 10 MB | Free |
| Starter | 10 GB, files up to 100 MB | $1.50 every 30 days |
| Builder | 100 GB, files up to 500 MB | $6.00 every 30 days |
| Studio | 500 GB, files up to 2000 MB | $20.00 every 30 days |
| Scale | 2,000 GB, files up to 5000 MB | $60.00 every 30 days |
Plans are paid with credits. Downloads up to ten times your plan each month are included; beyond that, 20 credits a GB. If a plan cannot renew, uploads pause at once and downloads after 14 days; files are kept for a while longer and you get emails before anything is deleted.