{
"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."
}
}
}
]
}
{
"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."
}
}
}
]
}
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.
Below is an example of processing a single PDF document:
import { createTelaClient } from '@meistrari/tela-sdk-js'import type { TelaFile } from '@meistrari/tela-sdk-js'const tela = createTelaClient({ apiKey: process.env.TELA_API_KEY,})const completion = await tela.completions.create<{ document: TelaFile }, { fileSummary: string }>({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: tela.createFile('https://www.wmaccess.com/downloads/sample-invoice.pdf'), // It is possible to pass a URL, Buffer, Blob, etc. },})
import { createTelaClient } from '@meistrari/tela-sdk-js'import type { TelaFile } from '@meistrari/tela-sdk-js'const tela = createTelaClient({ apiKey: process.env.TELA_API_KEY,})const completion = await tela.completions.create({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: tela.createFile('https://www.wmaccess.com/downloads/sample-invoice.pdf'), // It is possible to pass a URL, Buffer, Blob, etc. },})
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:
// First, upload a file and get the file IDconst fileId = '3fa85f64-5717-4562-b3fc-2c963f66afa6' // UUID from file uploadconst completion = await tela.completions.create({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: { file_url: `vault://${fileId}` }, // Using vault:// URL as object },})
// First, upload a file and get the file IDconst fileId = '3fa85f64-5717-4562-b3fc-2c963f66afa6' // UUID from file uploadconst completion = await tela.completions.create({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: { file_url: `vault://${fileId}` }, // Using vault:// URL as object },})
# First, upload a file and get the file IDfile_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # UUID from file uploadcompletion = client.completions.create( canvas_id=TELA_CANVAS_ID, variables={ "document": {"file_url": f"vault://{file_id}"}, # Using vault:// URL as object },)
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.
import fs from 'node:fs'import { createTelaClient } from '@meistrari/tela-sdk-js'import type { TelaFile } from '@meistrari/tela-sdk-js'const tela = createTelaClient({ apiKey: process.env.TELA_API_KEY,})const PATH = 'examples/stream/sample-invoice.pdf'const fileStream = fs.createReadStream(PATH)const completion = await tela.completions.create<{ document: TelaFile }, { fileSummary: string }>({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: tela.createFile(fileStream), }, stream: true,})for await (const chunk of completion) { console.log(JSON.stringify(chunk))}
import fs from 'node:fs'import { createTelaClient } from '@meistrari/tela-sdk-js'import type { TelaFile } from '@meistrari/tela-sdk-js'const tela = createTelaClient({ apiKey: process.env.TELA_API_KEY,})const PATH = 'examples/stream/sample-invoice.pdf'const fileStream = fs.createReadStream(PATH)const completion = await tela.completions.create({ canvasId: process.env.TELA_CANVAS_ID, variables: { document: tela.createFile(fileStream), }, stream: true,})for await (const chunk of completion) { console.log(JSON.stringify(chunk))}
import osfrom tela import create_tela_clientTELA_CANVAS_ID = os.getenv("TELA_CANVAS_ID")TELA_API_KEY = os.getenv("TELA_API_KEY")client = create_tela_client( api_key=TELA_API_KEY,)PATH = 'examples/stream/sample-invoice.pdf'with open(PATH, 'rb') as file: completion = client.completions.create( canvas_id=TELA_CANVAS_ID, variables={ "document": client.create_file(file), }, stream=True, ) for chunk in completion: print(chunk)
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.
An array of completion choices generated by the model
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Tela","colors":{"primary":"#171717","light":"#EBECED","dark":"#171717"},"logo":{"light":"https://mintcdn.com/meistrari/pblu7JGV78zF0-_0/logo/tela-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=pblu7JGV78zF0-_0\u0026q=85\u0026s=2203db70c6af3499a392576fba857701","dark":"https://mintcdn.com/meistrari/pblu7JGV78zF0-_0/logo/tela-docs-logo-dark.svg?fit=max\u0026auto=format\u0026n=pblu7JGV78zF0-_0\u0026q=85\u0026s=a654991459d67d985930d693c2c84d53"},"favicon":"https://mintcdn.com/meistrari/pblu7JGV78zF0-_0/favicon.svg?fit=max\u0026auto=format\u0026n=pblu7JGV78zF0-_0\u0026q=85\u0026s=d467e03abcb66668deda7bd0eb39b121","background":{"color":{"dark":"#020913"}},"navbar":{"primary":{"type":"button","label":"Open Dashboard","href":"https://tela.com/app/dashboard"}},"search":{"prompt":"Search in TelaDocs"},"fonts":{"family":"Inter"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/welcome"},{"language":"pt-BR","href":"pt/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"meistrari","hasAudioNarration":false,"actualSubdomain":"meistrari","customDomains":["docs.tela.com"],"gitSource":{"type":"github","owner":"meistrari","repo":"tela-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf3bdd258d3ce783651549","collectionId":"fccc23ee-57b8-4c6f-9a06-f67c1e48014a","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf3bdd258d3ce783651549"},"entitlements":{},"buildId":"6ae399c78fc5c9e41494669d","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"API Reference","count":67},{"language":"en","tag":"Documentation","count":54},{"language":"pt-BR","tag":"Documentação","count":54},{"language":"en","tag":"Build","count":26},{"language":"pt-BR","tag":"Construir","count":26},{"language":"en","tag":"Integrate","count":12},{"language":"pt-BR","tag":"Integrar","count":12},{"language":"default","tag":"Workstation Events","count":10},{"language":"en","tag":"Workflow","count":10},{"language":"pt-BR","tag":"Workflow","count":10},{"language":"default","tag":"Versions","count":9},{"language":"default","tag":"Tasks","count":9},{"language":"default","tag":"Test case tags","count":9},{"language":"default","tag":"Test cases","count":8},{"language":"en","tag":"Agent","count":8},{"language":"pt-BR","tag":"Agente","count":8},{"language":"en","tag":"Completion API","count":7},{"language":"pt-BR","tag":"Completion API","count":7},{"language":"default","tag":"Environments","count":6},{"language":"en","tag":"Canvas","count":6},{"language":"en","tag":"Operate","count":6},{"language":"pt-BR","tag":"Canvas","count":6},{"language":"pt-BR","tag":"Operar","count":6},{"language":"default","tag":"Version messages","count":5},{"language":"en","tag":"Workstation","count":5},{"language":"en","tag":"Get started","count":5},{"language":"pt-BR","tag":"Workstation","count":5},{"language":"pt-BR","tag":"Primeiros passos","count":5},{"language":"default","tag":"Completions","count":3},{"language":"default","tag":"Workflow runs","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--tela-text-primary:#262626;--tela-text-secondary:#737373;--tela-text-contrast:#171717;--tela-border:#e8e8e8;--tela-bg-hover:#f5f5f5;--tela-bg-active:#e8e8e8;--tela-weight-medium:460;--tela-weight-semibold:540;--tela-weight-heading:520}html.dark{--tela-text-primary:#e8e8e8;--tela-text-secondary:#a3a3a3;--tela-text-contrast:#ffffff;--tela-border:rgba(255, 255, 255, 0.08);--tela-bg-hover:rgba(255, 255, 255, 0.04);--tela-bg-active:rgba(255, 255, 255, 0.08)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#navbar-transition{border-bottom:.5px solid var(--tela-border)}#sidebar{border-right:.5px solid var(--tela-border)}#header .eyebrow,#sidebar .sidebar-group-header{font-weight:var(--tela-weight-semibold);letter-spacing:.05em;text-transform:uppercase}#sidebar li>a,#sidebar li>button{border-radius:10px;font-size:14px;line-height:18px;letter-spacing:-.15px;font-weight:var(--tela-weight-medium);color:var(--tela-text-secondary)}#sidebar li>a:hover,#sidebar li>button:hover{background-color:var(--tela-bg-hover);color:var(--tela-text-primary)}#sidebar li[data-active-nav-item=true]>a{background-color:var(--tela-bg-active);color:var(--tela-text-primary);font-weight:var(--tela-weight-semibold);text-shadow:none}#sidebar li[data-active-nav-item=true]>a svg{background-color:var(--tela-text-primary)}#header .eyebrow,#sidebar .sidebar-group-header,[data-layout-item=toc-item-link]{font-size:12px;line-height:16px;color:var(--tela-text-secondary)}[data-layout-item=toc-item-link]:hover,[data-layout-item=toc-item-link][data-active=true]{color:var(--tela-text-contrast)}#content-area .mdx-content h2,#content-area .mdx-content h3,#page-title{font-size:32px;line-height:36px;letter-spacing:-1px;font-weight:var(--tela-weight-heading);color:var(--tela-text-contrast)}#content-area .mdx-content{color:var(--tela-text-primary);font-size:16px;line-height:28px;letter-spacing:-.18px}#content-area .mdx-content h2,#content-area .mdx-content h3{font-size:24px;line-height:28px;letter-spacing:-.8px}#content-area .mdx-content h3{font-size:20px;line-height:24px;letter-spacing:-.5px}#content-area .mdx-content h4,#content-area .mdx-content h5,#content-area .mdx-content h6{font-size:16px;line-height:20px;letter-spacing:-.2px;font-weight:var(--tela-weight-heading);color:var(--tela-text-contrast)}#content-area .mdx-content h5,#content-area .mdx-content h6{font-size:14px;line-height:16px;letter-spacing:-.15px}#content-area .mdx-content h6{font-size:12px;line-height:14px;letter-spacing:-.1px}#content-area .mdx-content strong{font-weight:var(--tela-weight-semibold)}#content-area .mdx-content .callout,#content-area .mdx-content .card{border-radius:12px}#content-area .mdx-content .card{border:.5px solid var(--tela-border)}#content-area .mdx-content .frame{width:fit-content;max-width:100%;margin-inline:auto}#content-area .mdx-content .frame img{width:auto;max-width:100%;max-height:560px}"}],"page":{"pagePath":"api-reference/completion/create","slug":"/api-reference/completion/create","pageMetadata":{"title":"Run Canvas","description":"Executes a canvas","openapi":"POST /v2/chat/completions","href":"/api-reference/completion/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Executes a canvas\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`files`,children:`Files`}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`When passing file URLs directly (without using the SDK’s `,_jsx(_components.code,{children:`.createFile()`}),` method), you must wrap them in an object with a `,_jsx(_components.code,{children:`file_url`}),` property. The `,_jsx(_components.code,{children:`.createFile()`}),` method handles this formatting automatically.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`single-file-processing`,children:`Single File Processing`}),`\n`,_jsx(_components.p,{children:`Below is an example of processing a single PDF document:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`typescript`,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`document`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`fileSummary`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }>({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://www.wmaccess.com/downloads/sample-invoice.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// It is possible to pass a URL, Buffer, Blob, etc.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`javascript`,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://www.wmaccess.com/downloads/sample-invoice.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// It is possible to pass a URL, Buffer, Blob, etc.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tela `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_CANVAS_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`completion `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canvas_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"document\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: client.create_file(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.wmaccess.com/downloads/sample-invoice.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`using-vault-urls`,children:`Using Vault URLs`}),`\n`,_jsxs(_components.p,{children:[`After uploading a file using the `,_jsx(_components.code,{children:`/v3/files`}),` endpoint, you can use the vault URL in your completions. When not using the SDK’s `,_jsx(_components.code,{children:`.createFile()`}),` method, you need to wrap the URL in an object with a `,_jsx(_components.code,{children:`file_url`}),` property:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`typescript`,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// First, upload a file and get the file ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` fileId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '3fa85f64-5717-4562-b3fc-2c963f66afa6'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // UUID from file upload`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `vault://\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Using vault:// URL as object`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`javascript`,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// First, upload a file and get the file ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` fileId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '3fa85f64-5717-4562-b3fc-2c963f66afa6'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // UUID from file upload`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `vault://\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Using vault:// URL as object`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`python`,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# First, upload a file and get the file ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`file_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '3fa85f64-5717-4562-b3fc-2c963f66afa6'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # UUID from file upload`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`completion `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canvas_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"document\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vault://`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`file_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Using vault:// URL as object`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`multiple-files-in-a-single-variable`,children:`Multiple Files in a Single Variable`}),`\n`,_jsx(_components.p,{children:`You can pass multiple file URLs in a single variable as an array:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`typescript`,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` documents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://example.com/file1.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://example.com/file2.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'vault://550e8400-e29b-41d4-a716-446655440000'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Mix of public and vault URLs`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`javascript`,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` documents:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://example.com/file1.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://example.com/file2.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'vault://550e8400-e29b-41d4-a716-446655440000'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Mix of public and vault URLs`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`completion `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canvas_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"documents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/file1.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/file2.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vault://550e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Mix of public and vault URLs`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`streaming`,children:`Streaming`}),`\n`,_jsxs(_components.p,{children:[`The Tela SDKs provides a `,_jsx(_components.code,{children:`stream`}),` option, which allows you to consume the stream of the completion. Below is an example of consuming a stream of the completion.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`typescript`,numberOfLines:`22`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'node:fs'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` PATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'examples/stream/sample-invoice.pdf'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` fileStream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createReadStream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`PATH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`document`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`fileSummary`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }>({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileStream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stream:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` chunk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` completion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chunk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`javascript`,numberOfLines:`22`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'node:fs'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TelaFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` PATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'examples/stream/sample-invoice.pdf'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` fileStream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createReadStream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`PATH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileStream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stream:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` chunk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` completion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chunk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`python`,numberOfLines:`23`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tela `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_CANVAS_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`PATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'examples/stream/sample-invoice.pdf'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`PATH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'rb'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` file`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` completion `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canvas_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"document\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: client.create_file(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`file`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` completion:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(chunk)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`webhook`,children:`Webhook`}),`\n`,_jsxs(_components.p,{children:[`The Tela SDKs provides a `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`typescript`,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` webhook`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://www.wmaccess.com/downloads/sample-invoice.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhookUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://webhook.site/12345'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`javascript`,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@meistrari/tela-sdk-js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tela`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createTelaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` webhook`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canvasId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` variables:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tela`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://www.wmaccess.com/downloads/sample-invoice.pdf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhookUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://webhook.site/12345'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`python`,numberOfLines:`19`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tela `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_CANVAS_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TELA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_tela_client(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`webhook `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canvas_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TELA_CANVAS_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"document\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: client.create_file(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.wmaccess.com/downloads/sample-invoice.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` webhook_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://webhook.site/12345\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(webhook)`})]}),`\n`]})})})]}),`\n`,_jsxs(Tip,{children:[`For detailed information about the webhook payload structure, see `,_jsx(_components.a,{href:`/en/completion-api/async-and-webhooks#the-callback`,children:`Async and webhooks`}),` in the Completion API guide.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Run Canvas","description":"Executes a canvas","openapi":"POST /v2/chat/completions","href":"/api-reference/completion/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Files","slug":"files","depth":2,"children":[{"title":"Single File Processing","slug":"single-file-processing","depth":3,"children":[]},{"title":"Using Vault URLs","slug":"using-vault-urls","depth":3,"children":[]},{"title":"Multiple Files in a Single Variable","slug":"multiple-files-in-a-single-variable","depth":3,"children":[]}]},{"title":"Streaming","slug":"streaming","depth":2,"children":[]},{"title":"Webhook","slug":"webhook","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/meistrari/7fb0cf41bd7567c7/scripts/code-samples/chat/completions/v2/example.js"],"openApiReferenceData":{"operation":{"requestBody":"5ff6c1b5-ed8f-4e7a-bde2-d89000cda6a1","responses":{"200":"1afd8638-a372-4a53-92c3-b6922003e492","400":"3b124689-312d-46d8-867b-ec200ba63c4c"},"x-codeSamples":[{"lang":"typescript","source":"import { createTelaClient } from '@meistrari/tela-sdk-js'\n\nconst tela = createTelaClient({\n apiKey: process.env.TELA_API_KEY,\n})\n\nconst completion = await tela.completions.create\u003c{ yourvariable: string }>({\n canvasId: process.env.TELA_CANVAS_ID,\n variables: {\n yourvariable: 'your value',\n },\n})\n"},{"lang":"python","source":"import os\nfrom tela import create_tela_client\n\nTELA_CANVAS_ID = os.getenv(\"TELA_CANVAS_ID\")\nTELA_API_KEY = os.getenv(\"TELA_API_KEY\")\n\nclient = create_tela_client(\n api_key=TELA_API_KEY,\n)\n\nwebhook = client.completions.create(\n canvas_id=TELA_CANVAS_ID,\n variables={\n \"yourvariable\": \"your value\",\n },\n)\n"},{"lang":"javascript","source":"import { createTelaClient } from '@meistrari/tela-sdk-js'\n\nconst tela = createTelaClient({\n apiKey: process.env.TELA_API_KEY,\n})\n\nconst completion = await tela.completions.create({\n canvasId: process.env.TELA_CANVAS_ID,\n variables: {\n yourvariable: 'your value',\n },\n})\n"}],"method":"post","type":"path","servers":["f8c8ecf7-c25f-4e5a-8e20-c44514cb2cac"],"security":[],"path":"/v2/chat/completions","baseUrlOptions":["https://api.tela.com"],"title":"","description":"Executes a canvas","codeSamples":[{"lang":"typescript","source":"import { createTelaClient } from '@meistrari/tela-sdk-js'\n\nconst tela = createTelaClient({\n apiKey: process.env.TELA_API_KEY,\n})\n\nconst completion = await tela.completions.create\u003c{ yourvariable: string }>({\n canvasId: process.env.TELA_CANVAS_ID,\n variables: {\n yourvariable: 'your value',\n },\n})\n"},{"lang":"python","source":"import os\nfrom tela import create_tela_client\n\nTELA_CANVAS_ID = os.getenv(\"TELA_CANVAS_ID\")\nTELA_API_KEY = os.getenv(\"TELA_API_KEY\")\n\nclient = create_tela_client(\n api_key=TELA_API_KEY,\n)\n\nwebhook = client.completions.create(\n canvas_id=TELA_CANVAS_ID,\n variables={\n \"yourvariable\": \"your value\",\n },\n)\n"},{"lang":"javascript","source":"import { createTelaClient } from '@meistrari/tela-sdk-js'\n\nconst tela = createTelaClient({\n apiKey: process.env.TELA_API_KEY,\n})\n\nconst completion = await tela.completions.create({\n canvasId: process.env.TELA_CANVAS_ID,\n variables: {\n yourvariable: 'your value',\n },\n})\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"The canvas to execute","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Promoted version","required":["canvas_id"],"properties":{"canvas_id":{"type":"string","description":"The ID of the canvas to execute","isRequired":true,"uniqueKey":"oneOf.0.canvas_id","typeLabel":"string"},"variables":{"type":"object","description":"The variables to pass to the canvas","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"oneOf.0.variables.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.variables.additionalProperties.oneOf.1.file_url","typeLabel":"string"},"options":{"type":"object","uniqueKey":"oneOf.0.variables.additionalProperties.oneOf.1.options","typeLabel":"object"}},"uniqueKey":"oneOf.0.variables.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.0.variables.additionalProperties","typeLabel":"string | object"},"uniqueKey":"oneOf.0.variables","typeLabel":"object"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The content of the message, either as a string or a file","isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"object","description":"The content of the message, either as a string or a file","properties":{"file_url":{"type":"string","description":"The URL of the file","uniqueKey":"oneOf.0.messages.items.[INDEX].content.oneOf.1.file_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].content.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].content","typeLabel":"string | object"}},"required":["role","content"],"uniqueKey":"oneOf.0.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.messages","typeLabel":"object[]"},"webhook_url":{"type":"string","description":"The URL to send webhooks to","uniqueKey":"oneOf.0.webhook_url","typeLabel":"string"},"stream":{"type":"boolean","description":"Whether to stream the response","uniqueKey":"oneOf.0.stream","typeLabel":"boolean"},"async":{"type":"boolean","description":"Whether to make the execution async","uniqueKey":"oneOf.0.async","typeLabel":"boolean"},"override":{"type":"object","description":"Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.","properties":{"type":{"type":"string","enum":["chat","completion"],"description":"Specifies whether to use a chat or completion model.","isRequired":true,"uniqueKey":"oneOf.0.override.type","typeLabel":"enum\u003cstring>"},"model":{"type":"string","description":"The specific model to use for this completion. If not specified, the default model set in the canvas will be used.","uniqueKey":"oneOf.0.override.model","typeLabel":"string"},"temperature":{"type":"number","description":"Controls randomness in the output. Values between 0 and 1. Lower values make the output more focused and deterministic.","uniqueKey":"oneOf.0.override.temperature","typeLabel":"number"},"functions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"oneOf.0.override.functions.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"oneOf.0.override.functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"oneOf.0.override.functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","enum":["object"],"uniqueKey":"oneOf.0.override.functions.items.[INDEX].parameters.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.0.override.functions.items.[INDEX].parameters.properties","typeLabel":"object"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.override.functions.items.[INDEX].parameters.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.0.override.functions.items.[INDEX].parameters.required","typeLabel":"string[]"}},"uniqueKey":"oneOf.0.override.functions.items.[INDEX].parameters","typeLabel":"object"}},"uniqueKey":"oneOf.0.override.functions.items.[INDEX]","typeLabel":"object"},"description":"An array of functions that the model can call. This allows for more structured and interactive completions.","uniqueKey":"oneOf.0.override.functions","typeLabel":"object[]"},"structured_output":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable structured output for this completion.","uniqueKey":"oneOf.0.override.structured_output.enabled","typeLabel":"boolean"},"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":true,"description":"Defines the properties of the structured output","uniqueKey":"oneOf.0.override.structured_output.schema.properties","typeLabel":"object"},"type":{"type":"string","enum":["object"],"description":"The type of the schema, always \"object\" for structured output","uniqueKey":"oneOf.0.override.structured_output.schema.type","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"The title of the schema","uniqueKey":"oneOf.0.override.structured_output.schema.title","typeLabel":"string"},"description":{"type":"string","description":"A description of the schema","uniqueKey":"oneOf.0.override.structured_output.schema.description","typeLabel":"string"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.override.structured_output.schema.required.items.[INDEX]","typeLabel":"string"},"description":"An array of required property names","uniqueKey":"oneOf.0.override.structured_output.schema.required","typeLabel":"string[]"}},"description":"The schema defining the structure of the output. This is used when structured output is enabled.","uniqueKey":"oneOf.0.override.structured_output.schema","typeLabel":"object"}},"description":"Configuration for generating structured output.","uniqueKey":"oneOf.0.override.structured_output","typeLabel":"object"}},"required":["type"],"uniqueKey":"oneOf.0.override","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"Promoted version · object"},{"type":"object","title":"Specific version","required":["version_id"],"properties":{"version_id":{"type":"string","description":"The ID of the version to execute","isRequired":true,"uniqueKey":"oneOf.1.version_id","typeLabel":"string"},"variables":{"type":"object","description":"The variables to pass to the canvas","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.variables.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.variables.additionalProperties.oneOf.1.file_url","typeLabel":"string"},"options":{"type":"object","uniqueKey":"oneOf.1.variables.additionalProperties.oneOf.1.options","typeLabel":"object"}},"uniqueKey":"oneOf.1.variables.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.1.variables.additionalProperties","typeLabel":"string | object"},"uniqueKey":"oneOf.1.variables","typeLabel":"object"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The content of the message, either as a string or a file","isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"object","description":"The content of the message, either as a string or a file","properties":{"file_url":{"type":"string","description":"The URL of the file","uniqueKey":"oneOf.1.messages.items.[INDEX].content.oneOf.1.file_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].content.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].content","typeLabel":"string | object"}},"required":["role","content"],"uniqueKey":"oneOf.1.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.messages","typeLabel":"object[]"},"webhook_url":{"type":"string","description":"The URL to send webhooks to","uniqueKey":"oneOf.1.webhook_url","typeLabel":"string"},"stream":{"type":"boolean","description":"Whether to stream the response","uniqueKey":"oneOf.1.stream","typeLabel":"boolean"},"async":{"type":"boolean","description":"Whether to make the execution async","uniqueKey":"oneOf.1.async","typeLabel":"boolean"},"override":{"type":"object","description":"Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.","properties":{"type":{"type":"string","enum":["chat","completion"],"description":"Specifies whether to use a chat or completion model.","isRequired":true,"uniqueKey":"oneOf.1.override.type","typeLabel":"enum\u003cstring>"},"model":{"type":"string","description":"The specific model to use for this completion. If not specified, the default model set in the canvas will be used.","uniqueKey":"oneOf.1.override.model","typeLabel":"string"},"temperature":{"type":"number","description":"Controls randomness in the output. Values between 0 and 1. Lower values make the output more focused and deterministic.","uniqueKey":"oneOf.1.override.temperature","typeLabel":"number"},"functions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"oneOf.1.override.functions.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"oneOf.1.override.functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"oneOf.1.override.functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","enum":["object"],"uniqueKey":"oneOf.1.override.functions.items.[INDEX].parameters.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.1.override.functions.items.[INDEX].parameters.properties","typeLabel":"object"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.override.functions.items.[INDEX].parameters.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.1.override.functions.items.[INDEX].parameters.required","typeLabel":"string[]"}},"uniqueKey":"oneOf.1.override.functions.items.[INDEX].parameters","typeLabel":"object"}},"uniqueKey":"oneOf.1.override.functions.items.[INDEX]","typeLabel":"object"},"description":"An array of functions that the model can call. This allows for more structured and interactive completions.","uniqueKey":"oneOf.1.override.functions","typeLabel":"object[]"},"structured_output":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable structured output for this completion.","uniqueKey":"oneOf.1.override.structured_output.enabled","typeLabel":"boolean"},"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":true,"description":"Defines the properties of the structured output","uniqueKey":"oneOf.1.override.structured_output.schema.properties","typeLabel":"object"},"type":{"type":"string","enum":["object"],"description":"The type of the schema, always \"object\" for structured output","uniqueKey":"oneOf.1.override.structured_output.schema.type","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"The title of the schema","uniqueKey":"oneOf.1.override.structured_output.schema.title","typeLabel":"string"},"description":{"type":"string","description":"A description of the schema","uniqueKey":"oneOf.1.override.structured_output.schema.description","typeLabel":"string"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.override.structured_output.schema.required.items.[INDEX]","typeLabel":"string"},"description":"An array of required property names","uniqueKey":"oneOf.1.override.structured_output.schema.required","typeLabel":"string[]"}},"description":"The schema defining the structure of the output. This is used when structured output is enabled.","uniqueKey":"oneOf.1.override.structured_output.schema","typeLabel":"object"}},"description":"Configuration for generating structured output.","uniqueKey":"oneOf.1.override.structured_output","typeLabel":"object"}},"required":["type"],"uniqueKey":"oneOf.1.override","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"Specific version · object"},{"type":"object","title":"Workstation","required":["application_id"],"properties":{"application_id":{"type":"string","description":"The ID of the application to execute","isRequired":true,"uniqueKey":"oneOf.2.application_id","typeLabel":"string"},"variables":{"type":"object","description":"The variables to pass to the canvas","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.variables.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","isRequired":true,"uniqueKey":"oneOf.2.variables.additionalProperties.oneOf.1.file_url","typeLabel":"string"},"options":{"type":"object","uniqueKey":"oneOf.2.variables.additionalProperties.oneOf.1.options","typeLabel":"object"}},"uniqueKey":"oneOf.2.variables.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.2.variables.additionalProperties","typeLabel":"string | object"},"uniqueKey":"oneOf.2.variables","typeLabel":"object"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"oneOf.2.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The content of the message, either as a string or a file","isRequired":true,"uniqueKey":"oneOf.2.messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"object","description":"The content of the message, either as a string or a file","properties":{"file_url":{"type":"string","description":"The URL of the file","uniqueKey":"oneOf.2.messages.items.[INDEX].content.oneOf.1.file_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.2.messages.items.[INDEX].content.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.2.messages.items.[INDEX].content","typeLabel":"string | object"}},"required":["role","content"],"uniqueKey":"oneOf.2.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.2.messages","typeLabel":"object[]"},"webhook_url":{"type":"string","description":"The URL to send webhooks to","uniqueKey":"oneOf.2.webhook_url","typeLabel":"string"},"override":{"type":"object","description":"Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.","properties":{"type":{"type":"string","enum":["chat","completion"],"description":"Specifies whether to use a chat or completion model.","isRequired":true,"uniqueKey":"oneOf.2.override.type","typeLabel":"enum\u003cstring>"},"model":{"type":"string","description":"The specific model to use for this completion. If not specified, the default model set in the canvas will be used.","uniqueKey":"oneOf.2.override.model","typeLabel":"string"},"temperature":{"type":"number","description":"Controls randomness in the output. Values between 0 and 1. Lower values make the output more focused and deterministic.","uniqueKey":"oneOf.2.override.temperature","typeLabel":"number"},"functions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"oneOf.2.override.functions.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"oneOf.2.override.functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"oneOf.2.override.functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","enum":["object"],"uniqueKey":"oneOf.2.override.functions.items.[INDEX].parameters.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.2.override.functions.items.[INDEX].parameters.properties","typeLabel":"object"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.2.override.functions.items.[INDEX].parameters.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.2.override.functions.items.[INDEX].parameters.required","typeLabel":"string[]"}},"uniqueKey":"oneOf.2.override.functions.items.[INDEX].parameters","typeLabel":"object"}},"uniqueKey":"oneOf.2.override.functions.items.[INDEX]","typeLabel":"object"},"description":"An array of functions that the model can call. This allows for more structured and interactive completions.","uniqueKey":"oneOf.2.override.functions","typeLabel":"object[]"},"structured_output":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable structured output for this completion.","uniqueKey":"oneOf.2.override.structured_output.enabled","typeLabel":"boolean"},"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":true,"description":"Defines the properties of the structured output","uniqueKey":"oneOf.2.override.structured_output.schema.properties","typeLabel":"object"},"type":{"type":"string","enum":["object"],"description":"The type of the schema, always \"object\" for structured output","uniqueKey":"oneOf.2.override.structured_output.schema.type","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"The title of the schema","uniqueKey":"oneOf.2.override.structured_output.schema.title","typeLabel":"string"},"description":{"type":"string","description":"A description of the schema","uniqueKey":"oneOf.2.override.structured_output.schema.description","typeLabel":"string"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.2.override.structured_output.schema.required.items.[INDEX]","typeLabel":"string"},"description":"An array of required property names","uniqueKey":"oneOf.2.override.structured_output.schema.required","typeLabel":"string[]"}},"description":"The schema defining the structure of the output. This is used when structured output is enabled.","uniqueKey":"oneOf.2.override.structured_output.schema","typeLabel":"object"}},"description":"Configuration for generating structured output.","uniqueKey":"oneOf.2.override.structured_output","typeLabel":"object"}},"required":["type"],"uniqueKey":"oneOf.2.override","typeLabel":"object"}},"uniqueKey":"oneOf.2","typeLabel":"Workstation · object"}],"uniqueKey":"","typeLabel":"Promoted version · object | Specific version · object | Workstation · object"},"examples":{"Example":{"title":"Example","value":{"canvas_id":"\u003cstring>","variables":{},"messages":[{"content":"\u003cstring>"}],"webhook_url":"\u003cstring>","stream":true,"async":true}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"1afd8638-a372-4a53-92c3-b6922003e492":{"description":"Successful completions","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Chat completion response","properties":{"id":{"type":"string","description":"A unique identifier for this completion","uniqueKey":"oneOf.0.id","typeLabel":"string"},"object":{"type":"string","description":"The object type, which is always \"chat.completion\"","uniqueKey":"oneOf.0.object","typeLabel":"string"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the completion was created","uniqueKey":"oneOf.0.created","typeLabel":"integer"},"choices":{"type":"array","description":"An array of completion choices generated by the model","items":{"type":"object","properties":{"message":{"type":"object","description":"The message object containing the completion","properties":{"role":{"type":"string","description":"The role of the message author (e.g., \"assistant\")","uniqueKey":"oneOf.0.choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"object","description":"The content of the message, which can be either a string or an object","uniqueKey":"oneOf.0.choices.items.[INDEX].message.content.oneOf.0","typeLabel":"object"},{"type":"string","description":"The content of the message, which can be either a string or an object","uniqueKey":"oneOf.0.choices.items.[INDEX].message.content.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.0.choices.items.[INDEX].message.content","typeLabel":"object | string"},"tool_calls":{"type":"array","description":"An array of tool calls, if any","items":{"type":"object","description":"A tool call object","uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.choices.items.[INDEX].message.tool_calls","typeLabel":"object[]"}},"uniqueKey":"oneOf.0.choices.items.[INDEX].message","typeLabel":"object"}},"uniqueKey":"oneOf.0.choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.choices","typeLabel":"object[]"}},"uniqueKey":"oneOf.0","typeLabel":"Chat completion response · object"},{"type":"object","title":"Chat completion webhook response","description":"Response structure for a chat completion webhook. This represents the data sent to the webhook URL when a chat completion is finished.","properties":{"id":{"type":"string","description":"Unique identifier for this chat completion response","uniqueKey":"oneOf.1.id","typeLabel":"string"},"status":{"type":"string","enum":["created","failed","running","succeeded"],"description":"The current status of the chat completion. 'created' means the request has been received but processing hasn't started. 'running' means the chat completion is currently being processed. 'succeeded' means the chat completion has finished successfully. 'failed' means the chat completion encountered an error and couldn't complete.","uniqueKey":"oneOf.1.status","typeLabel":"enum\u003cstring>"},"input_content":{"type":"object","description":"Contains information about the input provided for this chat completion","properties":{"variables":{"type":"object","description":"Variables passed to the chat completion, including any file URLs","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.input_content.variables.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.input_content.variables.additionalProperties.oneOf.1.file_url","typeLabel":"string"},"options":{"type":"object","uniqueKey":"oneOf.1.input_content.variables.additionalProperties.oneOf.1.options","typeLabel":"object"}},"uniqueKey":"oneOf.1.input_content.variables.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.1.input_content.variables.additionalProperties","typeLabel":"string | object"},"uniqueKey":"oneOf.1.input_content.variables","typeLabel":"object"},"messages":{"type":"array","description":"Array of messages that were part of the input","items":{"type":"object","properties":{"role":{"type":"string","description":"The role of the message sender (e.g., 'user', 'assistant', 'system')","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","description":"The content of the message. Can be a string for text messages, or an object for more complex content types like images.","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"object","description":"The content of the message. Can be a string for text messages, or an object for more complex content types like images.","properties":{"type":{"type":"string","enum":["text","image_url"],"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1.text","typeLabel":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","high","low"],"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].content","typeLabel":"string | object"},"function_call":{"type":"object","description":"Optional. Information about a function call, if applicable.","properties":{"name":{"type":"string","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].function_call.name","typeLabel":"string"},"arguments":{"type":"string","uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].function_call.arguments","typeLabel":"string"}},"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX].function_call","typeLabel":"object"}},"uniqueKey":"oneOf.1.input_content.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.input_content.messages","typeLabel":"object[]"},"files":{"type":"array","description":"Information about files used in the chat completion","items":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"oneOf.1.input_content.files.items.[INDEX].name","typeLabel":"string"},"used_at":{"type":"string","enum":["variables","messages"],"uniqueKey":"oneOf.1.input_content.files.items.[INDEX].used_at","typeLabel":"enum\u003cstring>"},"parsed_content":{"type":"string","uniqueKey":"oneOf.1.input_content.files.items.[INDEX].parsed_content","typeLabel":"string"},"url":{"type":"string","uniqueKey":"oneOf.1.input_content.files.items.[INDEX].url","typeLabel":"string"},"type":{"type":"string","enum":["image","file"],"uniqueKey":"oneOf.1.input_content.files.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.input_content.files.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.input_content.files","typeLabel":"object[]"}},"uniqueKey":"oneOf.1.input_content","typeLabel":"object"},"output_content":{"type":"object","description":"Contains the output generated by the chat completion","properties":{"role":{"type":"string","enum":["system","user","assistant","function"],"description":"The role of the entity providing the output","uniqueKey":"oneOf.1.output_content.role","typeLabel":"enum\u003cstring>"},"tool_calls":{"type":"array","description":"Optional. Information about tool calls made during the completion.","items":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"oneOf.1.output_content.tool_calls.items.[INDEX].name","typeLabel":"string"},"arguments":{"type":"string","uniqueKey":"oneOf.1.output_content.tool_calls.items.[INDEX].arguments","typeLabel":"string"}},"uniqueKey":"oneOf.1.output_content.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.output_content.tool_calls","typeLabel":"object[]"},"information":{"type":"object","description":"Optional. Additional information about the completion process.","properties":{"duration":{"type":"number","uniqueKey":"oneOf.1.output_content.information.duration","typeLabel":"number"},"cost":{"type":"number","uniqueKey":"oneOf.1.output_content.information.cost","typeLabel":"number"},"input_tokens":{"type":"integer","uniqueKey":"oneOf.1.output_content.information.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","uniqueKey":"oneOf.1.output_content.information.output_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.1.output_content.information","typeLabel":"object"},"has_structured_output":{"type":"boolean","description":"Indicates whether the output has a structured format","uniqueKey":"oneOf.1.output_content.has_structured_output","typeLabel":"boolean"},"content":{"type":"object","description":"The main content of the chat completion output","uniqueKey":"oneOf.1.output_content.content","typeLabel":"object"},"input_messages":{"type":"string","description":"Optional. The input messages in a string format.","uniqueKey":"oneOf.1.output_content.input_messages","typeLabel":"string"}},"uniqueKey":"oneOf.1.output_content","typeLabel":"object"},"raw_input":{"oneOf":[{"type":"object","description":"The original input parameters provided for this chat completion","properties":{"version_id":{"type":"string","description":"The ID of the version used for this chat completion","uniqueKey":"oneOf.1.raw_input.oneOf.0.version_id","typeLabel":"string"},"canvas_id":{"type":"string","description":"The ID of the canvas used for this chat completion","uniqueKey":"oneOf.1.raw_input.oneOf.0.canvas_id","typeLabel":"string"},"application_id":{"type":"string","description":"The ID of the application associated with this chat completion","uniqueKey":"oneOf.1.raw_input.oneOf.0.application_id","typeLabel":"string"},"webhook_url":{"type":"string","description":"The URL where webhook notifications are sent","uniqueKey":"oneOf.1.raw_input.oneOf.0.webhook_url","typeLabel":"string"},"variables":{"type":"object","description":"The variables to pass to the canvas","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.variables.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.variables.additionalProperties.oneOf.1.file_url","typeLabel":"string"},"options":{"type":"object","uniqueKey":"oneOf.1.raw_input.oneOf.0.variables.additionalProperties.oneOf.1.options","typeLabel":"object"}},"uniqueKey":"oneOf.1.raw_input.oneOf.0.variables.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.1.raw_input.oneOf.0.variables.additionalProperties","typeLabel":"string | object"},"uniqueKey":"oneOf.1.raw_input.oneOf.0.variables","typeLabel":"object"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"The content of the message, either as a string or a file","isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"object","description":"The content of the message, either as a string or a file","properties":{"file_url":{"type":"string","description":"The URL of the file","uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX].content.oneOf.1.file_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX].content.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX].content","typeLabel":"string | object"}},"required":["role","content"],"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.raw_input.oneOf.0.messages","typeLabel":"object[]"},"override":{"type":"object","description":"Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.","properties":{"type":{"type":"string","enum":["chat","completion"],"description":"Specifies whether to use a chat or completion model.","isRequired":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.type","typeLabel":"enum\u003cstring>"},"model":{"type":"string","description":"The specific model to use for this completion. If not specified, the default model set in the canvas will be used.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.model","typeLabel":"string"},"temperature":{"type":"number","description":"Controls randomness in the output. Values between 0 and 1. Lower values make the output more focused and deterministic.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.temperature","typeLabel":"number"},"functions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","enum":["object"],"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].parameters.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].parameters.properties","typeLabel":"object"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].parameters.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].parameters.required","typeLabel":"string[]"}},"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX].parameters","typeLabel":"object"}},"uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions.items.[INDEX]","typeLabel":"object"},"description":"An array of functions that the model can call. This allows for more structured and interactive completions.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.functions","typeLabel":"object[]"},"structured_output":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable structured output for this completion.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.enabled","typeLabel":"boolean"},"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":true,"description":"Defines the properties of the structured output","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.properties","typeLabel":"object"},"type":{"type":"string","enum":["object"],"description":"The type of the schema, always \"object\" for structured output","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.type","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"The title of the schema","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.title","typeLabel":"string"},"description":{"type":"string","description":"A description of the schema","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.description","typeLabel":"string"},"required":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.required.items.[INDEX]","typeLabel":"string"},"description":"An array of required property names","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema.required","typeLabel":"string[]"}},"description":"The schema defining the structure of the output. This is used when structured output is enabled.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output.schema","typeLabel":"object"}},"description":"Configuration for generating structured output.","uniqueKey":"oneOf.1.raw_input.oneOf.0.override.structured_output","typeLabel":"object"}},"required":["type"],"uniqueKey":"oneOf.1.raw_input.oneOf.0.override","typeLabel":"object"}},"uniqueKey":"oneOf.1.raw_input.oneOf.0","typeLabel":"object"},{"type":"null","description":"The original input parameters provided for this chat completion","properties":{"version_id":{"type":"string","description":"The ID of the version used for this chat completion"},"canvas_id":{"type":"string","description":"The ID of the canvas used for this chat completion"},"application_id":{"type":"string","description":"The ID of the application associated with this chat completion"},"webhook_url":{"type":"string","description":"The URL where webhook notifications are sent"},"variables":{"type":"object","description":"The variables to pass to the canvas","additionalProperties":{"oneOf":[{"type":"string"},{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string"},"options":{"type":"object"}}}]}},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string","description":"The content of the message, either as a string or a file"},{"type":"object","description":"The content of the message, either as a string or a file","properties":{"file_url":{"type":"string","description":"The URL of the file"}}}]}},"required":["role","content"]}},"override":{"type":"object","description":"Override default settings specified in the canvas. This allows for fine-tuning the completion behavior for this specific request.","properties":{"model":{"type":"string","description":"The specific model to use for this completion. If not specified, the default model set in the canvas will be used."},"temperature":{"type":"number","description":"Controls randomness in the output. Values between 0 and 1. Lower values make the output more focused and deterministic."},"type":{"type":"string","enum":["chat","completion"],"description":"Specifies whether to use a chat or completion model."},"functions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":true},"required":{"type":"array","items":{"type":"string"}}}}}},"description":"An array of functions that the model can call. This allows for more structured and interactive completions."},"structured_output":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable structured output for this completion."},"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":true,"description":"Defines the properties of the structured output"},"type":{"type":"string","enum":["object"],"description":"The type of the schema, always \"object\" for structured output"},"title":{"type":"string","description":"The title of the schema"},"description":{"type":"string","description":"A description of the schema"},"required":{"type":"array","items":{"type":"string"},"description":"An array of required property names"}},"description":"The schema defining the structure of the output. This is used when structured output is enabled."}},"description":"Configuration for generating structured output."}},"required":["type"]}},"uniqueKey":"oneOf.1.raw_input.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.raw_input","typeLabel":"object | null"},"raw_output":{"type":"object","additionalProperties":true,"description":"The raw output from the chat completion process","uniqueKey":"oneOf.1.raw_output","typeLabel":"object"},"compatibility_date":{"type":"string","format":"date-time","description":"The date used for compatibility checks","uniqueKey":"oneOf.1.compatibility_date","typeLabel":"string\u003cdate-time>"},"prompt_version_id":{"type":"string","description":"The ID of the prompt version used for this chat completion","uniqueKey":"oneOf.1.prompt_version_id","typeLabel":"string"},"prompt_application_id":{"oneOf":[{"type":"string","description":"The ID of the prompt application, if applicable","uniqueKey":"oneOf.1.prompt_application_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The ID of the prompt application, if applicable","uniqueKey":"oneOf.1.prompt_application_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.prompt_application_id","typeLabel":"string | null"},"workspace_id":{"type":"string","description":"The ID of the workspace where this chat completion was executed","uniqueKey":"oneOf.1.workspace_id","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"The timestamp when this chat completion was created","uniqueKey":"oneOf.1.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"The timestamp when this chat completion was last updated","uniqueKey":"oneOf.1.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"oneOf.1","typeLabel":"Chat completion webhook response · object"},{"type":"object","title":"Chat completion stream response","properties":{"id":{"type":"string","description":"The ID of the completion","uniqueKey":"oneOf.2.id","typeLabel":"string"},"object":{"type":"string","description":"The object of the completion","uniqueKey":"oneOf.2.object","typeLabel":"string"},"created":{"type":"integer","description":"The created time of the completion","uniqueKey":"oneOf.2.created","typeLabel":"integer"},"model":{"type":"string","description":"The model of the completion","uniqueKey":"oneOf.2.model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"delta":{"type":"object","properties":{"role":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.role.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.role.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.role","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.content","typeLabel":"string | null"},"function_call":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.name","typeLabel":"string | null"},"arguments":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.arguments.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.arguments.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0.arguments","typeLabel":"string | null"}},"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"arguments":{"oneOf":[{"type":"string"},{"type":"null"}]}},"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].delta.function_call","typeLabel":"object | null"}},"uniqueKey":"oneOf.2.choices.items.[INDEX].delta","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].finish_reason","typeLabel":"string | null"},"index":{"type":"integer","uniqueKey":"oneOf.2.choices.items.[INDEX].index","typeLabel":"integer"},"logprobs":{"oneOf":[{"type":"number","uniqueKey":"oneOf.2.choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"oneOf.2.choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.choices.items.[INDEX].logprobs","typeLabel":"number | null"}},"uniqueKey":"oneOf.2.choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.2.choices","typeLabel":"object[]"},"message":{"type":"object","description":"The complete message object for the stream response","properties":{"role":{"type":"string","description":"The role of the message author (e.g., \"assistant\")","uniqueKey":"oneOf.2.message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","description":"The content of the message","uniqueKey":"oneOf.2.message.content.oneOf.0","typeLabel":"string"},{"type":"null","description":"The content of the message","uniqueKey":"oneOf.2.message.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.message.content","typeLabel":"string | null"},"function_call":{"oneOf":[{"type":"object","description":"Information about a function call, if applicable","properties":{"name":{"oneOf":[{"type":"string","description":"The name of the function being called","uniqueKey":"oneOf.2.message.function_call.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The name of the function being called","uniqueKey":"oneOf.2.message.function_call.oneOf.0.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.message.function_call.oneOf.0.name","typeLabel":"string | null"},"arguments":{"oneOf":[{"type":"string","description":"The arguments passed to the function","uniqueKey":"oneOf.2.message.function_call.oneOf.0.arguments.oneOf.0","typeLabel":"string"},{"type":"null","description":"The arguments passed to the function","uniqueKey":"oneOf.2.message.function_call.oneOf.0.arguments.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.message.function_call.oneOf.0.arguments","typeLabel":"string | null"}},"uniqueKey":"oneOf.2.message.function_call.oneOf.0","typeLabel":"object"},{"type":"null","description":"Information about a function call, if applicable","properties":{"name":{"oneOf":[{"type":"string","description":"The name of the function being called"},{"type":"null","description":"The name of the function being called"}]},"arguments":{"oneOf":[{"type":"string","description":"The arguments passed to the function"},{"type":"null","description":"The arguments passed to the function"}]}},"uniqueKey":"oneOf.2.message.function_call.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.message.function_call","typeLabel":"object | null"},"tool_calls":{"type":"array","description":"An array of tool calls made during the completion","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tool being called","uniqueKey":"oneOf.2.message.tool_calls.items.[INDEX].name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments passed to the tool","uniqueKey":"oneOf.2.message.tool_calls.items.[INDEX].arguments","typeLabel":"string"}},"uniqueKey":"oneOf.2.message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.2.message.tool_calls","typeLabel":"object[]"},"structured_content":{"type":"object","additionalProperties":true,"description":"Structured content of the message, if applicable","uniqueKey":"oneOf.2.message.structured_content","typeLabel":"object"}},"uniqueKey":"oneOf.2.message","typeLabel":"object"}},"uniqueKey":"oneOf.2","typeLabel":"Chat completion stream response · object"}],"uniqueKey":"","typeLabel":"Chat completion response · object | Chat completion webhook response · object | Chat completion stream response · object"},"examples":{"Plain Text":{"title":"Plain Text","value":{"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."}}}]}},"With Output Format":{"title":"With Output Format","value":{"id":"crsv-i52z8vnqekc","object":"chat.completion","created":1728399621,"choices":[{"message":{"role":"assistant","content":{"rationale":"The content of the PDF is not provided, so a summary cannot be generated.","message":"No summary can be generated."}}}]}},"With Webhook":{"title":"With Webhook","value":{"id":"b83b1558-de5b-4e45-b517-7bececbdd154","status":"created","inputContent":{"files":[],"messages":[],"variables":null},"outputContent":null,"rawInput":{"canvas_id":"95cec438-6080-44fe-8275-28b16bd40178","variables":{},"webhook_url":"https://your-webhook-url.com"},"rawOutput":null,"compatibilityDate":"2024-10-14T00:00:00.000Z","promptVersionId":"76065caa-c519-441a-8fe2-cc43e29664ab","promptApplicationId":null,"workspaceId":"3f55cfd9-4427-4887-a181-d9ad39967802","createdAt":"2024-10-14T19:00:53.664Z","updatedAt":"2024-10-14T19:00:53.664Z","deletedAt":null}},"With Webhook Completed":{"title":"With Webhook Completed","value":{"id":"b83b1558-de5b-4e45-b517-7bececbdd154","status":"succeeded","inputContent":{"files":[],"messages":[],"variables":{"document":{"file_url":"https://example.com/document.pdf"}}},"outputContent":{"role":"assistant","structured_content":false,"content":{"fileSummary":"This document contains quarterly financial reports showing a 15% revenue increase compared to last quarter, with key highlights in operational efficiency improvements and market expansion in the APAC region."},"input_messages":"user: Please analyze this document and provide a summary."},"rawInput":{"canvas_id":"95cec438-6080-44fe-8275-28b16bd40178","variables":{"document":{"file_url":"https://example.com/document.pdf"}},"webhook_url":"https://your-webhook-url.com"},"rawOutput":{"fileSummary":"This document contains quarterly financial reports showing a 15% revenue increase compared to last quarter, with key highlights in operational efficiency improvements and market expansion in the APAC region."},"compatibilityDate":"2024-10-14T00:00:00.000Z","promptVersionId":"76065caa-c519-441a-8fe2-cc43e29664ab","promptApplicationId":null,"workspaceId":"3f55cfd9-4427-4887-a181-d9ad39967802","createdAt":"2024-10-14T19:00:53.664Z","updatedAt":"2024-10-14T19:01:15.892Z","deletedAt":null}}},"exampleType":"examples"}},"exampleType":"examples"},"3b124689-312d-46d8-867b-ec200ba63c4c":{"description":"unexpected error","content":{"application/json":{"schema":{}}},"exampleType":"generated"}},"security":{},"servers":{"f8c8ecf7-c25f-4e5a-8e20-c44514cb2cac":{"url":"https://api.tela.com"}}},"originalFileLocation":"api-reference/openapi.yml"},"subdomain":"meistrari","siteName":"Tela","title":"Run Canvas - Tela","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/completion/create","matchLevel":0},"pt-BR":{"href":"/api-reference/completion/create","matchLevel":0}}},"lastModified":"2026-10-29T19:09:48.156Z","originalFileLocation":"api-reference/completion/create.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Executes a canvas\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tela\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run Canvas - Tela\">\u003cmeta data-mint-head property=\"og:description\" content=\"Executes a canvas\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tela\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tela.com/api-reference/completion/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://meistrari.mintlify.app/_mintlify/api/og/v2?division=Completions\u0026amp;title=Run+Canvas\u0026amp;description=Executes+a+canvas\u0026amp;theme=bc02c453c572dc454ca5d848\u0026amp;signature=ead4f2b93dafcce1a3c897b6eb07da4a8a23c806f228d7291d736a7ad246be50\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Run Canvas - Tela\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Executes a canvas\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://meistrari.mintlify.app/_mintlify/api/og/v2?division=Completions\u0026amp;title=Run+Canvas\u0026amp;description=Executes+a+canvas\u0026amp;theme=bc02c453c572dc454ca5d848\u0026amp;signature=ead4f2b93dafcce1a3c897b6eb07da4a8a23c806f228d7291d736a7ad246be50\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/meistrari/iDbVYACJhr5G8i3-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tela\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#171717\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tela.com/api-reference/completion/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/completion/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tela.com/#organization\",\"name\":\"Tela\",\"url\":\"https://docs.tela.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/meistrari/pblu7JGV78zF0-_0/logo/tela-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=pblu7JGV78zF0-_0\u0026q=85\u0026s=2203db70c6af3499a392576fba857701\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tela.com#website\",\"name\":\"Tela\",\"url\":\"https://docs.tela.com\",\"publisher\":{\"@id\":\"https://docs.tela.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tela.com/api-reference/completion/create#webpage\",\"url\":\"https://docs.tela.com/api-reference/completion/create\",\"name\":\"Run Canvas\",\"description\":\"Executes a canvas\",\"dateModified\":\"2026-10-29T19:09:48.156Z\",\"isPartOf\":{\"@id\":\"https://docs.tela.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tela.com/api-reference/completion/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tela.com/api-reference/completion/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tela\",\"item\":\"https://docs.tela.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run Canvas\",\"item\":\"https://docs.tela.com/api-reference/completion/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tela.com/api-reference/completion/create#apireference\",\"headline\":\"Run Canvas\",\"name\":\"Run Canvas\",\"description\":\"Executes a canvas\",\"url\":\"https://docs.tela.com/api-reference/completion/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tela.com/api-reference/completion/create#webpage\"},\"dateModified\":\"2026-10-29T19:09:48.156Z\",\"publisher\":{\"@id\":\"https://docs.tela.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tela.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tela\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Tela","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/en/welcome"}]},{"tab":"API Reference","groups":[{"group":"Introduction","pages":[{"title":"Introduction","description":"Base URL, authentication and conventions shared by every Tela API endpoint","icon":"book-open","href":"/api-reference/introduction"}]},{"group":"Completions","pages":[{"title":"Run Canvas","openapi":"POST /v2/chat/completions","href":"/api-reference/completion/create"},{"title":"Retrieve Canvas Run","description":"Retrieve the status and details of an asynchronous chat completion using its unique identifier, enabling efficient polling and status monitoring.","openapi":"GET /v2/chat/completions/{id}","href":"/api-reference/completion/get"},{"title":"List completion runs","openapi":"GET /v1/completion-run","href":"/api-reference/completion-run/get-v1-completion-run"}]},{"group":"Files","pages":[{"title":"Upload a File","openapi":"POST /v2/file","href":"/api-reference/file/create"},{"title":"Upload a File (v3)","openapi":"POST /v3/files","href":"/api-reference/file/upload"}]},{"group":"Canvases","pages":[{"title":"List canvases","openapi":"GET /prompt","href":"/api-reference/canvas/get-prompt"},{"title":"Get a canvas","openapi":"GET /prompt/{id}","href":"/api-reference/canvas/get-prompt-id"}]},{"group":"Versions","pages":[{"title":"List Prompt Versions","openapi":"GET /prompt-version","href":"/api-reference/prompt-version/get"},{"title":"Create Prompt Version","openapi":"POST /prompt-version","href":"/api-reference/prompt-version/create"},{"title":"Get Prompt Version","openapi":"GET /prompt-version/{id}","href":"/api-reference/prompt-version/get-by-id"},{"title":"Update Prompt Version","openapi":"PATCH /prompt-version/{id}","href":"/api-reference/prompt-version/update"},{"title":"Delete Prompt Version","openapi":"DELETE /prompt-version/{id}","href":"/api-reference/prompt-version/delete"},{"title":"Get the latest version of a canvas","openapi":"GET /prompt/{id}/latest-version","href":"/api-reference/prompt-version/get-prompt-id-latest-version"},{"title":"Get the promoted (production) version of a canvas","openapi":"GET /prompt/{id}/promoted-version","href":"/api-reference/prompt-version/get-prompt-id-promoted-version"},{"title":"List version history of a canvas","openapi":"GET /prompt-version/history","href":"/api-reference/prompt-version/get-prompt-version-history"},{"title":"Get the version index map of a canvas","openapi":"GET /prompt-version/index-map","href":"/api-reference/prompt-version/get-prompt-version-index-map"}]},{"group":"Version messages","pages":[{"title":"List messages of a prompt version","openapi":"GET /prompt-version-message","href":"/api-reference/prompt-version-message/get-prompt-version-message"},{"title":"Create a prompt version message","openapi":"POST /prompt-version-message","href":"/api-reference/prompt-version-message/post-prompt-version-message"},{"title":"Get a prompt version message","openapi":"GET /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/get-prompt-version-message-id"},{"title":"Update a prompt version message","openapi":"PATCH /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/patch-prompt-version-message-id"},{"title":"Delete a prompt version message","openapi":"DELETE /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/delete-prompt-version-message-id"}]},{"group":"Environments","pages":[{"title":"List environments","openapi":"GET /environment","href":"/api-reference/environment/get-environment"},{"title":"Create environment","openapi":"POST /environment","href":"/api-reference/environment/post-environment"},{"title":"List environment publication history","openapi":"GET /environment/versions","href":"/api-reference/environment/get-environment-versions"},{"title":"Get the version published to an environment","openapi":"GET /environment/version","href":"/api-reference/environment/get-environment-version"},{"title":"Publish a version to an environment","openapi":"POST /environment/publish-by-name","href":"/api-reference/environment/post-environment-publish-by-name"},{"title":"Delete environment","openapi":"DELETE /environment/{id}","href":"/api-reference/environment/delete-environment-id"}]},{"group":"Test cases","pages":[{"title":"Retrieve Test Cases","openapi":"GET /test-case","href":"/api-reference/test-case/get"},{"title":"Create Test Cases","openapi":"POST /test-case","href":"/api-reference/test-case/create"},{"title":"Get Test Case by ID","openapi":"GET /test-case/{id}","href":"/api-reference/test-case/get-by-id"},{"title":"Update Test Case","openapi":"PATCH /test-case/{id}","href":"/api-reference/test-case/update"},{"title":"Delete Test Case","openapi":"DELETE /test-case/{id}","href":"/api-reference/test-case/delete"},{"title":"Run a test case","openapi":"POST /test-case/{id}/run","href":"/api-reference/test-case/post-test-case-id-run"},{"title":"Run many test cases","openapi":"POST /test-case/run-all","href":"/api-reference/test-case/post-test-case-run-all"},{"title":"Abort a running test case","openapi":"POST /test-case/{id}/abort","href":"/api-reference/test-case/post-test-case-id-abort"}]},{"group":"Test case tags","pages":[{"title":"Add tags to many test cases","openapi":"POST /test-case/bulk-add-tags","href":"/api-reference/test-case-tag/post-test-case-bulk-add-tags"},{"title":"Remove tags from many test cases","openapi":"POST /test-case/bulk-remove-tags","href":"/api-reference/test-case-tag/post-test-case-bulk-remove-tags"},{"title":"List tags of a test case","openapi":"GET /test-case/{id}/tags","href":"/api-reference/test-case-tag/get-test-case-id-tags"},{"title":"Assign tags to a test case","openapi":"POST /test-case/{id}/tags","href":"/api-reference/test-case-tag/post-test-case-id-tags"},{"title":"Remove a tag from a test case","openapi":"DELETE /test-case/{id}/tags/{tagId}","href":"/api-reference/test-case-tag/delete-test-case-id-tags-tagid"},{"title":"List test case tags of a canvas","openapi":"GET /test-case-tags","href":"/api-reference/test-case-tag/get-test-case-tags"},{"title":"Create a test case tag","openapi":"POST /test-case-tags","href":"/api-reference/test-case-tag/post-test-case-tags"},{"title":"Update a test case tag","openapi":"PATCH /test-case-tags/{id}","href":"/api-reference/test-case-tag/patch-test-case-tags-id"},{"title":"Delete a test case tag","openapi":"DELETE /test-case-tags/{id}","href":"/api-reference/test-case-tag/delete-test-case-tags-id"}]},{"group":"Tasks","pages":[{"title":"Query Tasks","openapi":"POST /task/query","href":"/api-reference/task/query"},{"title":"List tasks","openapi":"GET /task","href":"/api-reference/task/get-task"},{"title":"Create tasks","openapi":"POST /task","href":"/api-reference/task/post-task"},{"title":"Get a task","openapi":"GET /task/{id}","href":"/api-reference/task/get-task-id"},{"title":"Update a task","openapi":"PATCH /task/{id}","href":"/api-reference/task/patch-task-id"},{"title":"Delete a task","openapi":"DELETE /task/{id}","href":"/api-reference/task/delete-task-id"},{"title":"Create a task export job","openapi":"POST /task/export-job","href":"/api-reference/task/post-task-export-job"},{"title":"Get an export job","openapi":"GET /task/export-job/{id}","href":"/api-reference/task/get-task-export-job-id"},{"title":"Get an export download URL","openapi":"GET /task/export-job/{id}/download","href":"/api-reference/task/get-task-export-job-id-download"}]},{"group":"Workstation Events","pages":[{"title":"Create webhook subscription","openapi":"POST /prompt-application/{id}/webhooks","href":"/api-reference/webhook/post-prompt-application-id-webhooks"},{"title":"List webhook subscriptions","openapi":"GET /prompt-application/{id}/webhooks","href":"/api-reference/webhook/get-prompt-application-id-webhooks"},{"title":"List webhook deliveries of an application","openapi":"GET /prompt-application/{id}/webhook-deliveries","href":"/api-reference/webhook/get-prompt-application-id-webhook-deliveries"},{"title":"Get webhook subscription","openapi":"GET /webhook/{webhookId}","href":"/api-reference/webhook/get-webhook-webhookid"},{"title":"Update webhook subscription","openapi":"PATCH /webhook/{webhookId}","href":"/api-reference/webhook/patch-webhook-webhookid"},{"title":"Delete webhook subscription","openapi":"DELETE /webhook/{webhookId}","href":"/api-reference/webhook/delete-webhook-webhookid"},{"title":"Send a test event to a webhook","openapi":"POST /webhook/{webhookId}/test","href":"/api-reference/webhook/post-webhook-webhookid-test"},{"title":"Send a test event to an arbitrary URL","openapi":"POST /webhook/test-url","href":"/api-reference/webhook/post-webhook-test-url"},{"title":"List deliveries of a webhook","openapi":"GET /webhook/{webhookId}/deliveries","href":"/api-reference/webhook/get-webhook-webhookid-deliveries"},{"title":"Resend a webhook delivery","openapi":"POST /webhook-delivery/{deliveryId}/resend","href":"/api-reference/webhook/post-webhook-delivery-deliveryid-resend"}]},{"group":"Workflow runs","pages":[{"title":"List workflow runs","openapi":"GET /workflow/runs","href":"/api-reference/workflow-run/get-workflow-runs"},{"title":"Get a workflow run","openapi":"GET /workflow/runs/{id}","href":"/api-reference/workflow-run/get-workflow-runs-id"},{"title":"Cancel a workflow run","openapi":"POST /workflow/runs/{id}/cancel","href":"/api-reference/workflow-run/post-workflow-runs-id-cancel"}]}]}]},{"language":"pt-BR","tabs":[{"tab":"Documentação","pages":[{"title":"Documentação","href":"/pt/welcome"}]},{"tab":"Referência de API","groups":[{"group":"Introdução","pages":[{"title":"Introduction","description":"Base URL, authentication and conventions shared by every Tela API endpoint","icon":"book-open","href":"/api-reference/introduction"}]},{"group":"Completions","pages":[{"title":"Run Canvas","openapi":"POST /v2/chat/completions","href":"/api-reference/completion/create"},{"title":"Retrieve Canvas Run","description":"Retrieve the status and details of an asynchronous chat completion using its unique identifier, enabling efficient polling and status monitoring.","openapi":"GET /v2/chat/completions/{id}","href":"/api-reference/completion/get"},{"title":"List completion runs","openapi":"GET /v1/completion-run","href":"/api-reference/completion-run/get-v1-completion-run"}]},{"group":"Arquivos","pages":[{"title":"Upload a File","openapi":"POST /v2/file","href":"/api-reference/file/create"},{"title":"Upload a File (v3)","openapi":"POST /v3/files","href":"/api-reference/file/upload"}]},{"group":"Canvases","pages":[{"title":"List canvases","openapi":"GET /prompt","href":"/api-reference/canvas/get-prompt"},{"title":"Get a canvas","openapi":"GET /prompt/{id}","href":"/api-reference/canvas/get-prompt-id"}]},{"group":"Versões","pages":[{"title":"List Prompt Versions","openapi":"GET /prompt-version","href":"/api-reference/prompt-version/get"},{"title":"Create Prompt Version","openapi":"POST /prompt-version","href":"/api-reference/prompt-version/create"},{"title":"Get Prompt Version","openapi":"GET /prompt-version/{id}","href":"/api-reference/prompt-version/get-by-id"},{"title":"Update Prompt Version","openapi":"PATCH /prompt-version/{id}","href":"/api-reference/prompt-version/update"},{"title":"Delete Prompt Version","openapi":"DELETE /prompt-version/{id}","href":"/api-reference/prompt-version/delete"},{"title":"Get the latest version of a canvas","openapi":"GET /prompt/{id}/latest-version","href":"/api-reference/prompt-version/get-prompt-id-latest-version"},{"title":"Get the promoted (production) version of a canvas","openapi":"GET /prompt/{id}/promoted-version","href":"/api-reference/prompt-version/get-prompt-id-promoted-version"},{"title":"List version history of a canvas","openapi":"GET /prompt-version/history","href":"/api-reference/prompt-version/get-prompt-version-history"},{"title":"Get the version index map of a canvas","openapi":"GET /prompt-version/index-map","href":"/api-reference/prompt-version/get-prompt-version-index-map"}]},{"group":"Mensagens de versão","pages":[{"title":"List messages of a prompt version","openapi":"GET /prompt-version-message","href":"/api-reference/prompt-version-message/get-prompt-version-message"},{"title":"Create a prompt version message","openapi":"POST /prompt-version-message","href":"/api-reference/prompt-version-message/post-prompt-version-message"},{"title":"Get a prompt version message","openapi":"GET /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/get-prompt-version-message-id"},{"title":"Update a prompt version message","openapi":"PATCH /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/patch-prompt-version-message-id"},{"title":"Delete a prompt version message","openapi":"DELETE /prompt-version-message/{id}","href":"/api-reference/prompt-version-message/delete-prompt-version-message-id"}]},{"group":"Ambientes","pages":[{"title":"List environments","openapi":"GET /environment","href":"/api-reference/environment/get-environment"},{"title":"Create environment","openapi":"POST /environment","href":"/api-reference/environment/post-environment"},{"title":"List environment publication history","openapi":"GET /environment/versions","href":"/api-reference/environment/get-environment-versions"},{"title":"Get the version published to an environment","openapi":"GET /environment/version","href":"/api-reference/environment/get-environment-version"},{"title":"Publish a version to an environment","openapi":"POST /environment/publish-by-name","href":"/api-reference/environment/post-environment-publish-by-name"},{"title":"Delete environment","openapi":"DELETE /environment/{id}","href":"/api-reference/environment/delete-environment-id"}]},{"group":"Casos de teste","pages":[{"title":"Retrieve Test Cases","openapi":"GET /test-case","href":"/api-reference/test-case/get"},{"title":"Create Test Cases","openapi":"POST /test-case","href":"/api-reference/test-case/create"},{"title":"Get Test Case by ID","openapi":"GET /test-case/{id}","href":"/api-reference/test-case/get-by-id"},{"title":"Update Test Case","openapi":"PATCH /test-case/{id}","href":"/api-reference/test-case/update"},{"title":"Delete Test Case","openapi":"DELETE /test-case/{id}","href":"/api-reference/test-case/delete"},{"title":"Run a test case","openapi":"POST /test-case/{id}/run","href":"/api-reference/test-case/post-test-case-id-run"},{"title":"Run many test cases","openapi":"POST /test-case/run-all","href":"/api-reference/test-case/post-test-case-run-all"},{"title":"Abort a running test case","openapi":"POST /test-case/{id}/abort","href":"/api-reference/test-case/post-test-case-id-abort"}]},{"group":"Tags de casos de teste","pages":[{"title":"Add tags to many test cases","openapi":"POST /test-case/bulk-add-tags","href":"/api-reference/test-case-tag/post-test-case-bulk-add-tags"},{"title":"Remove tags from many test cases","openapi":"POST /test-case/bulk-remove-tags","href":"/api-reference/test-case-tag/post-test-case-bulk-remove-tags"},{"title":"List tags of a test case","openapi":"GET /test-case/{id}/tags","href":"/api-reference/test-case-tag/get-test-case-id-tags"},{"title":"Assign tags to a test case","openapi":"POST /test-case/{id}/tags","href":"/api-reference/test-case-tag/post-test-case-id-tags"},{"title":"Remove a tag from a test case","openapi":"DELETE /test-case/{id}/tags/{tagId}","href":"/api-reference/test-case-tag/delete-test-case-id-tags-tagid"},{"title":"List test case tags of a canvas","openapi":"GET /test-case-tags","href":"/api-reference/test-case-tag/get-test-case-tags"},{"title":"Create a test case tag","openapi":"POST /test-case-tags","href":"/api-reference/test-case-tag/post-test-case-tags"},{"title":"Update a test case tag","openapi":"PATCH /test-case-tags/{id}","href":"/api-reference/test-case-tag/patch-test-case-tags-id"},{"title":"Delete a test case tag","openapi":"DELETE /test-case-tags/{id}","href":"/api-reference/test-case-tag/delete-test-case-tags-id"}]},{"group":"Tarefas","pages":[{"title":"Query Tasks","openapi":"POST /task/query","href":"/api-reference/task/query"},{"title":"List tasks","openapi":"GET /task","href":"/api-reference/task/get-task"},{"title":"Create tasks","openapi":"POST /task","href":"/api-reference/task/post-task"},{"title":"Get a task","openapi":"GET /task/{id}","href":"/api-reference/task/get-task-id"},{"title":"Update a task","openapi":"PATCH /task/{id}","href":"/api-reference/task/patch-task-id"},{"title":"Delete a task","openapi":"DELETE /task/{id}","href":"/api-reference/task/delete-task-id"},{"title":"Create a task export job","openapi":"POST /task/export-job","href":"/api-reference/task/post-task-export-job"},{"title":"Get an export job","openapi":"GET /task/export-job/{id}","href":"/api-reference/task/get-task-export-job-id"},{"title":"Get an export download URL","openapi":"GET /task/export-job/{id}/download","href":"/api-reference/task/get-task-export-job-id-download"}]},{"group":"Eventos da Workstation","pages":[{"title":"Create webhook subscription","openapi":"POST /prompt-application/{id}/webhooks","href":"/api-reference/webhook/post-prompt-application-id-webhooks"},{"title":"List webhook subscriptions","openapi":"GET /prompt-application/{id}/webhooks","href":"/api-reference/webhook/get-prompt-application-id-webhooks"},{"title":"List webhook deliveries of an application","openapi":"GET /prompt-application/{id}/webhook-deliveries","href":"/api-reference/webhook/get-prompt-application-id-webhook-deliveries"},{"title":"Get webhook subscription","openapi":"GET /webhook/{webhookId}","href":"/api-reference/webhook/get-webhook-webhookid"},{"title":"Update webhook subscription","openapi":"PATCH /webhook/{webhookId}","href":"/api-reference/webhook/patch-webhook-webhookid"},{"title":"Delete webhook subscription","openapi":"DELETE /webhook/{webhookId}","href":"/api-reference/webhook/delete-webhook-webhookid"},{"title":"Send a test event to a webhook","openapi":"POST /webhook/{webhookId}/test","href":"/api-reference/webhook/post-webhook-webhookid-test"},{"title":"Send a test event to an arbitrary URL","openapi":"POST /webhook/test-url","href":"/api-reference/webhook/post-webhook-test-url"},{"title":"List deliveries of a webhook","openapi":"GET /webhook/{webhookId}/deliveries","href":"/api-reference/webhook/get-webhook-webhookid-deliveries"},{"title":"Resend a webhook delivery","openapi":"POST /webhook-delivery/{deliveryId}/resend","href":"/api-reference/webhook/post-webhook-delivery-deliveryid-resend"}]},{"group":"Execuções de workflow","pages":[{"title":"List workflow runs","openapi":"GET /workflow/runs","href":"/api-reference/workflow-run/get-workflow-runs"},{"title":"Get a workflow run","openapi":"GET /workflow/runs/{id}","href":"/api-reference/workflow-run/get-workflow-runs-id"},{"title":"Cancel a workflow run","openapi":"POST /workflow/runs/{id}/cancel","href":"/api-reference/workflow-run/post-workflow-runs-id-cancel"}]}]}]}]},"title":"Run Canvas - Tela","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-26-lDe7V.js","utils-CWQmgYtH.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-4-Aw3rSD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C2zjXYA5.js","snippetPresets-DFmpFA7C.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-FJpQavWq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D_GvPF7k.js","shallow-Bs2ZB0NO.js","getApiPlaygroundDisplay-DCcqJJk-.js","CodeSnippet-DzDxawVe.js","CodeSnippets-aUr7fU-7.js","Page-CT9uE8Ip.js","getPastedJson-Y1fKsj_I.js","icon-DI4zTsDr.js","MethodPill-C0nDlmSQ.js","DuplicateIcon-NUXbx2nQ.js","createIcon-BdTHrPAi.js","DynamicMarkdown-CtpgKJwj.js","SectionHeading-B3x35tOt.js","axios-vUo_bRtp.js","Markdown-3OmurJMP.js","clsx-DMKzROTp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-1ms6tsT-.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ke9xIMFx.js"]}