cURL
File
Upload a File (v3)
Upload a file using the new v3 API endpoint
POST
cURL
File Upload Process
The v3 file upload API provides a secure two-step process for uploading files to Tela’s storage:- Request an upload URL - Call the
/v3/filesendpoint to get a temporary upload URL - Upload your file - Use the returned upload URL to upload your file content directly
Step 1: Get Upload URL
First, request a temporary upload URL by providing the filename:id: The unique identifier for your fileuploadUrl: A temporary URL to upload your file content
Step 2: Upload File Content
Use theuploadUrl from the previous step to upload your file content:
The upload URL is temporary and will expire after a short period. Make sure to upload your file promptly after receiving the URL.
Using the File ID
After successfully uploading your file, you can use the UUID returned in Step 1 to reference the file in other API endpoints:Request Headers
Required Headers
Authorization: Bearer token for authenticationx-compatibility-date: API version compatibility date (e.g.,2025-07-23)
Content Types
When uploading the file content in Step 2, set the appropriateContent-Type header:
text/plainfor text filesapplication/jsonfor JSON filesimage/png,image/jpegfor imagesapplication/pdffor PDF files- And other standard MIME types as needed
Complete Example
Here’s a complete example showing the entire file upload process:Using Uploaded Files in Completions
After uploading files, you can use them in your canvas completions with thevault:// URL scheme:
The
vault:// URL scheme provides secure access to your uploaded files. These URLs can only be accessed within your workspace context and are ideal for processing sensitive documents.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
API version compatibility date (e.g., 2025-07-23)
Body
application/json
The name of the file to upload