Files
The Tela SDKs allows you to easily process files, such as PDFs, by creating a completion. You can use various file sources including public URLs, vault URLs from uploaded files, or pass multiple files in a single variable.When passing file URLs directly (without using the SDK’s
.createFile()
method), you must wrap them in an object with a file_url
property. The .createFile()
method handles this formatting automatically.Single File Processing
Below is an example of processing a single PDF document:Using Vault URLs
After uploading a file using the/v3/files
endpoint, you can use the vault URL in your completions. When not using the SDK’s .createFile()
method, you need to wrap the URL in an object with a file_url
property:
Multiple Files in a Single Variable
You can pass multiple file URLs in a single variable as an array:Streaming
The Tela SDKs provides astream
option, which allows you to consume the stream of the completion. Below is an example of consuming a stream of the completion.
Webhook
The Tela SDKs provides awebhookUrl
option, which allows you to receive a webhook when the completion is finished. Below is an example of receiving a webhook when the completion is finished.
Body
application/json
The canvas to execute
- Promoted version
- Specific version
- Workstation
The ID of the canvas to execute
The variables to pass to the canvas
The URL to send webhooks to
Whether to stream the response
Whether to make the execution async
Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.
Response
Successful completions
- Chat completion response
- Chat completion webhook response
- Chat completion stream response