Skip to main content
This page shows how to give a tool a file. A tool’s file field is a string that takes one of three values:
  • A file ID (file_...) from an upload. Use this for any file larger than a few hundred kilobytes.
  • An https URL. Pomerado fetches it when you submit the run.
  • A data: URI of at most 512 KB, such as data:application/pdf;base64,JVBERi0....

Upload a file

1

Create the upload

Send POST /v1/files with the file’s name and media type. In an MCP client, call call_pomerado_api with files.create.
size is optional; when you give it, the upload must be exactly that long. The answer has the file’s id and a one-time upload_url.
2

Send the bytes

PUT the file to upload_url once, with no Authorization header:
The answer is the file, now ready. If the upload fails, send it again before the file expires.
3

Pass the ID to the run

Use the file’s ID as the field’s value when you run the tool:
A file serves one run. GET /v1/files/{id} reads its metadata, never its bytes, and DELETE /v1/files/{id} erases it now.
  • A URL must be https on the default port, with no username or password, and resolve to a public address. It may redirect at most three times, must answer within 20 seconds and must send a Content-Length.
  • Pomerado stores a URL’s or data URI’s bytes like an upload.
  • See limits for sizes and expiry.