POST
/
v2
/
chat
/
completions
{
  "id": "crsv-i52z8vnqekc",
  "object": "chat.completion",
  "created": 1728399621,
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": {
          "text": "The content of the PDF is not provided, so a summary cannot be generated."
        }
      }
    }
  ]
}

Files

The Tela SDKs allows you to easily process files, such as PDFs, by creating a completion. Below is an example of processing a PDF document and receiving a file summary.

Streaming

The Tela SDKs provides a stream 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 a webhookUrl 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
canvas_id
string
required

The ID of the canvas to execute

async
boolean

Whether to make the execution async

messages
object[]
override
object

Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.

stream
boolean

Whether to stream the response

variables
object

The variables to pass to the canvas

webhook_url
string

The URL to send webhooks to

Response

200 - application/json
choices
object[]

An array of completion choices generated by the model

created
integer

The Unix timestamp (in seconds) of when the completion was created

id
string

A unique identifier for this completion

object
string

The object type, which is always "chat.completion"