> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tela.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List completion runs

> Returns a paginated list of completion runs in the authenticated workspace, most recently updated first (`updatedAt` desc, then `id` desc). Rows are returned with camelCase keys (unlike the snake_case webhook payload).



## OpenAPI

````yaml GET /v1/completion-run
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /v1/completion-run:
    get:
      tags:
        - Completion Run
      summary: List completion runs
      description: >
        Returns a paginated list of completion runs in the authenticated
        workspace, most recently updated first (`updatedAt` desc, then `id`
        desc). Rows are returned with camelCase keys (unlike the snake_case
        webhook payload).


        When `promptApplicationId`, `promptVersionId` or `promptId` is given,
        the referenced resource must be accessible to the caller (404
        otherwise), except when federated runs already exist for that filter.
        Requires the `member` role or higher; workspace-level API keys satisfy
        this.
      parameters:
        - name: limit
          in: query
          required: false
          description: Page size. Defaults to 10 and is clamped to 1–100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: offset
          in: query
          required: false
          description: Number of runs to skip. Defaults to 0.
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: objectLinks
          in: query
          required: false
          description: >-
            When `true`, `meta.links.*` are returned as objects instead of query
            strings.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: promptApplicationId
          in: query
          required: false
          description: Restrict to runs of this Workstation/App.
          schema:
            type: string
            format: uuid
        - name: promptVersionId
          in: query
          required: false
          description: Restrict to runs of this Canvas version.
          schema:
            type: string
            format: uuid
        - name: promptId
          in: query
          required: false
          description: Restrict to runs of this Canvas (prompt).
          schema:
            type: string
            format: uuid
        - name: tags
          in: query
          required: false
          description: >-
            Tags the run must contain (all of them). JSON-encoded array
            (`["a","b"]`) or comma-separated list (`a,b`).
          schema:
            type: string
      responses:
        '200':
          description: Paginated list of completion runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletionRunListResponse'
              example:
                data:
                  - id: b83b1558-de5b-4e45-b517-7bececbdd154
                    status: succeeded
                    inputContent:
                      variables:
                        document:
                          files:
                            - file_url: https://example.com/document.pdf
                      messages: []
                      files:
                        - name: document
                          url: https://example.com/document.pdf
                          usedAt: variables
                    outputContent:
                      role: assistant
                      content:
                        fileSummary: >-
                          Quarterly financial report with a 15% revenue
                          increase.
                    rawInput:
                      canvas_id: 95cec438-6080-44fe-8275-28b16bd40178
                      version_id: 76065caa-c519-441a-8fe2-cc43e29664ab
                      variables:
                        document:
                          file_url: https://example.com/document.pdf
                    rawOutput:
                      fileSummary: Quarterly financial report with a 15% revenue increase.
                    compatibilityDate: '2024-10-14'
                    metadata:
                      promptVersion:
                        modelConfigurations:
                          model: gpt-4o
                          type: chat
                        variablesDefinitions:
                          - name: document
                            type: file
                            required: true
                    tags:
                      - batch-1
                    creditsUsed: 3
                    promptId: 95cec438-6080-44fe-8275-28b16bd40178
                    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
                meta:
                  totalCount: 1
                  limit: 10
                  offset: 0
                  currentPage: 1
                  totalPages: 1
                  links:
                    first: >-
                      ?promptVersionId=76065caa-c519-441a-8fe2-cc43e29664ab&limit=10&offset=0
                    last: >-
                      ?promptVersionId=76065caa-c519-441a-8fe2-cc43e29664ab&limit=10&offset=0
                    next: null
                    previous: null
        '400':
          description: Invalid query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The caller's role is below `member`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The referenced app, Canvas version or Canvas was not found or is not
            accessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CompletionRunListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CompletionRun'
        meta:
          $ref: '#/components/schemas/TaskPaginationMeta'
      required:
        - data
        - meta
    Error: {}
    CompletionRun:
      type: object
      title: Completion run
      description: A single execution of a Canvas version. Keys are camelCase.
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - created
            - failed
            - running
            - succeeded
        inputContent:
          $ref: '#/components/schemas/TaskInputContent'
        outputContent:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            The assistant message produced by the run (`role`, `content`, …), or
            the workflow response.
        rawInput:
          $ref: '#/components/schemas/TaskRawInput'
        rawOutput:
          type: object
          nullable: true
          additionalProperties: true
        compatibilityDate:
          type: string
          format: date
          nullable: true
        metadata:
          $ref: '#/components/schemas/CompletionRunMetadata'
        tags:
          type: array
          items:
            type: string
        creditsUsed:
          type: integer
          nullable: true
        promptId:
          type: string
          format: uuid
          nullable: true
        promptVersionId:
          type: string
          format: uuid
          nullable: true
        promptApplicationId:
          type: string
          format: uuid
          nullable: true
        workspaceId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - status
        - tags
        - workspaceId
        - createdAt
        - updatedAt
    TaskPaginationMeta:
      type: object
      title: Pagination metadata
      properties:
        totalCount:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        currentPage:
          type: integer
        totalPages:
          type: integer
        lastReference:
          type: integer
          description: >-
            Highest `reference` among the app's/agent's non-deleted tasks (`0`
            when neither `promptApplicationId` nor `agentId` was given). Only
            present on `GET /task`.
        links:
          type: object
          description: >-
            Links to other pages. Query strings (e.g.
            `?promptApplicationId=…&limit=10&offset=10`) by default, or objects
            (`{ ...filters, limit, offset }`) when `objectLinks=true`.
          properties:
            first:
              oneOf:
                - type: string
                - type: object
                  additionalProperties: true
            last:
              oneOf:
                - type: string
                - type: object
                  additionalProperties: true
            next:
              nullable: true
              oneOf:
                - type: string
                - type: object
                  additionalProperties: true
            previous:
              nullable: true
              oneOf:
                - type: string
                - type: object
                  additionalProperties: true
          required:
            - first
            - last
            - next
            - previous
      required:
        - totalCount
        - limit
        - offset
        - currentPage
        - totalPages
        - links
    TaskInputContent:
      type: object
      nullable: true
      title: Input content
      description: >-
        Normalized input of the execution. `null` until the run has been
        prepared.
      properties:
        variables:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TaskInternalVariableContent'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/TaskMessage'
        files:
          type: array
          items:
            $ref: '#/components/schemas/TaskInputFile'
    TaskRawInput:
      type: object
      nullable: true
      title: Raw input
      description: >-
        The completion request the task is executed with. Same shape as the
        `/v2/chat/completions` body; `application_id` is set by the server from
        `promptApplicationId`.
      properties:
        application_id:
          type: string
          format: uuid
          description: >-
            Set by the server; any value you send is overwritten with
            `promptApplicationId`.
        canvas_id:
          type: string
          format: uuid
        version_id:
          type: string
          format: uuid
        environment_name:
          type: string
        variables:
          type: object
          description: >-
            Variables keyed by the app's variable names. Files are passed here
            (see `TaskVariableValue`).
          additionalProperties:
            $ref: '#/components/schemas/TaskVariableValue'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/TaskMessage'
        input:
          type: string
        webhook_url:
          type: string
          description: URL that receives a POST when the execution finishes.
        override:
          $ref: '#/components/schemas/Override'
        stream:
          type: boolean
        async:
          type: boolean
        long_response:
          type: boolean
        label:
          type: string
        tags:
          type: array
          items:
            type: string
    CompletionRunMetadata:
      type: object
      nullable: true
      properties:
        requestedEnvironmentName:
          type: string
        promptVersion:
          type: object
          description: Snapshot of the Canvas version used for the run.
          properties:
            modelConfigurations:
              type: object
              additionalProperties: true
            variablesDefinitions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  type:
                    type: string
                    enum:
                      - file
                      - text
                      - mixed
                  required:
                    type: boolean
                  description:
                    type: string
                  processingOptions:
                    type: object
                    properties:
                      allowMultimodal:
                        type: boolean
                  content:
                    type: string
                required:
                  - name
                  - type
                  - required
        resourceContext:
          $ref: '#/components/schemas/TaskResourceContext'
    TaskInternalVariableContent:
      description: >-
        Normalized variable value as stored on the task. A string, `{ files:
        [...] }`, or `{ text, files }` (a single file object is normalized into
        `files`).
      oneOf:
        - type: string
        - type: object
          properties:
            files:
              type: array
              items:
                $ref: '#/components/schemas/TaskVariableFile'
          required:
            - files
        - type: object
          properties:
            text:
              oneOf:
                - type: string
                - type: object
                  additionalProperties:
                    type: string
            files:
              type: array
              items:
                $ref: '#/components/schemas/TaskVariableFile'
          required:
            - text
            - files
    TaskMessage:
      type: object
      properties:
        role:
          type: string
        content:
          description: A string, a single content part, or an array of content parts.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/TaskMessageContentPart'
            - type: array
              items:
                $ref: '#/components/schemas/TaskMessageContentPart'
        function_call:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          required:
            - name
            - arguments
      required:
        - role
        - content
    TaskInputFile:
      type: object
      description: >-
        A file that took part in the execution, either from a variable (`usedAt:
        variables`) or from a message (`usedAt: messages`).
      properties:
        name:
          type: string
          description: Variable name, or `message-{index}` for files found in messages.
        type:
          type: string
        usedAt:
          type: string
          enum:
            - variables
            - messages
        url:
          type: string
        mimeType:
          type: string
        jobId:
          type: string
          description: Parser job identifier, when the file was parsed.
        filename:
          type: string
        pages:
          type: number
        parserData:
          type: object
          additionalProperties: true
          description: Parser result payload (structure not documented here).
        filePagesAsImage:
          type: array
          items:
            type: string
    TaskVariableValue:
      description: >-
        Value of a variable when creating a task. A string for text variables; a
        file object for a single file; `{ files: [...] }` for several files; `{
        text, files }` for mixed content.
      oneOf:
        - type: string
          title: Text
        - $ref: '#/components/schemas/TaskVariableFile'
        - type: object
          title: Files
          properties:
            files:
              type: array
              items:
                $ref: '#/components/schemas/TaskVariableFile'
          required:
            - files
        - type: object
          title: Mixed
          properties:
            text:
              oneOf:
                - type: string
                - type: object
                  additionalProperties:
                    type: string
            files:
              type: array
              items:
                $ref: '#/components/schemas/TaskVariableFile'
          required:
            - text
            - files
    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
    TaskResourceContext:
      type: object
      description: >-
        Set by the server on tasks that run against a resource shared from
        another workspace (federated). Client-supplied values are discarded.
      properties:
        isFederated:
          type: boolean
        entitlementId:
          type: string
          nullable: true
        executionWorkspaceId:
          type: string
        billingWorkspaceId:
          type: string
        resourceWorkspaceId:
          type: string
        credentialWorkspaceId:
          type: string
        projectId:
          type: string
          nullable: true
    TaskVariableFile:
      type: object
      title: File
      properties:
        file_url:
          type: string
          description: Publicly reachable URL or a `vault://` reference of the file.
        file_name:
          type: string
        mime_type:
          type: string
        vault_reference:
          type: string
        options:
          type: object
          properties:
            range:
              type: array
              description: Page range to process (e.g. for PDFs).
              items:
                type: number
      required:
        - file_url
    TaskMessageContentPart:
      oneOf:
        - type: object
          title: Text part
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: string
          required:
            - type
            - text
        - type: object
          title: Image part
          properties:
            type:
              type: string
              enum:
                - image_url
            image_url:
              type: object
              properties:
                url:
                  type: string
                detail:
                  type: string
                  enum:
                    - auto
                    - high
                    - low
              required:
                - url
          required:
            - type
            - image_url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or UUID

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.