Treasure Data LLM API

The LLM API — 87 operations for AI agents, agent schedules, chats and chat interfaces, actions, knowledge bases, artifacts, image generation, integrations and projects. The programmatic surface behind AI Agent Foundry and Treasure AI Studio.

OpenAPI Specification

treasure-data-llm-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: llm-api
  version: 1.0.0
servers:
  - url: https://llm-api.treasuredata.com
  - url: https://llm-api.eu01.treasuredata.com
  - url: https://llm-api.ap02.treasuredata.com
  - url: https://llm-api.treasuredata.co.jp
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: TD1
paths:
  /api/actions:
    get:
      summary: index
      tags:
        - Action
      responses:
        '200':
          description: List of actions filtered by UI tags
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        links:
                          type: object
                          properties:
                            self:
                              type: string
                            chat:
                              type: string
                              nullable: true
                          required:
                            - self
                        attributes:
                          type: object
                          properties:
                            integrationId:
                              type: string
                            promptId:
                              type: string
                            chatWidgetType:
                              nullable: true
                              type: string
                            chatWidgetLabel:
                              nullable: true
                              type: string
                            webhookTextUrl:
                              type: string
                              nullable: true
                            slackRequestUrl:
                              type: string
                              nullable: true
                            uiTags:
                              type: array
                              items:
                                type: string
                          required:
                            - integrationId
                            - promptId
                            - chatWidgetType
                            - chatWidgetLabel
                            - webhookTextUrl
                            - slackRequestUrl
                            - uiTags
                      required:
                        - id
                        - type
                        - links
                        - attributes
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                    required:
                      - total
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      next:
                        type: string
                      prev:
                        type: string
                    required:
                      - first
                      - last
                required:
                  - data
                  - meta
                  - links
              example:
                data:
                  - id: 00000000-0000-0000-0000-000000000001
                    type: actions
                    links:
                      self: >-
                        http://www.example.com/api/actions/00000000-0000-0000-0000-000000000001
                    attributes:
                      integrationId: 00000000-0000-0000-0000-000000000001
                      promptId: 00000000-0000-0000-0000-000000000001
                      chatWidgetType: null
                      chatWidgetLabel: null
                      webhookTextUrl: >-
                        http://localhost:3000/api/actions/00000000-0000-0000-0000-000000000001/text
                      slackRequestUrl: null
                      uiTags: []
                  - id: 00000000-0000-0000-0000-000000000001
                    type: actions
                    links:
                      self: >-
                        http://www.example.com/api/actions/00000000-0000-0000-0000-000000000001
                    attributes:
                      integrationId: 00000000-0000-0000-0000-000000000001
                      promptId: 00000000-0000-0000-0000-000000000001
                      chatWidgetType: null
                      chatWidgetLabel: null
                      webhookTextUrl: >-
                        http://localhost:3000/api/actions/00000000-0000-0000-0000-000000000001/text
                      slackRequestUrl: null
                      uiTags:
                        - lang:en
                meta:
                  total: 45
                links:
                  first: >-
                    http://www.example.com/api/actions?filter%5Bui_tags%5D=lang%3Aes&page%5Blimit%5D=20&page%5Boffset%5D=0
                  last: >-
                    http://www.example.com/api/actions?filter%5Bui_tags%5D=lang%3Aes&page%5Blimit%5D=20&page%5Boffset%5D=40
                  next: >-
                    http://www.example.com/api/actions?filter%5Bui_tags%5D=lang%3Aes&page%5Blimit%5D=20&page%5Boffset%5D=40
                  prev: >-
                    http://www.example.com/api/actions?filter%5Bui_tags%5D=lang%3Aes&page%5Blimit%5D=20&page%5Boffset%5D=0
      parameters:
        - name: filter[parent_segment_id]
          in: query
          required: false
          schema:
            type: integer
          example: 0
        - name: filter[project_id]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: filter[prompt_id]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: filter[service_type]
          in: query
          required: false
          schema:
            type: string
          example: HOGE_HOGE
        - name: filter[skip_managed]
          in: query
          required: false
          schema:
            type: string
            enum:
              - auto
              - 'true'
              - 'false'
          example: 'false'
        - name: filter[ui_tags]
          in: query
          required: false
          schema:
            type: string
          example: lang:es
        - name: page[limit]
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
          example: 20
  /api/actions/{id}/slack:
    post:
      summary: slack
      tags:
        - Action
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
      responses:
        '200':
          description: >-
            Slack response containing either empty text for ephemeral mode or
            JSON for in-channel mode
          content:
            text/plain:
              schema:
                type: string
                description: Empty response for ephemeral slack_response_type
              example: ''
            application/json:
              schema:
                type: object
                properties:
                  response_type:
                    type: string
                    enum:
                      - in_channel
                    description: Type of Slack response
                  text:
                    type: string
                    description: Response text (typically empty)
                required:
                  - response_type
                  - text
              example:
                response_type: in_channel
                text: ''
        '401':
          description: Unauthorized - invalid timestamp or signature
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                  - status
                  - error
              example:
                status: '401'
                error: Unauthorized
        '404':
          description: Not Found - integration type is not slack or action not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                  - status
                  - error
              example:
                status: '404'
                error: Not Found
        '429':
          description: Too Many Requests - rate limit exceeded
          headers:
            retry-after:
              schema:
                type: integer
              description: Number of seconds to wait before retrying
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                  - status
                  - error
              example:
                status: '429'
                error: Rate limit exceeded
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                response_url:
                  type: string
                  description: Slack response URL for posting delayed responses
                text:
                  type: string
                  description: User input text from Slack command
                command:
                  type: string
                  description: The Slack slash command that triggered this action
              required:
                - response_url
                - text
                - command
            example:
              response_url: https://hooks.slack.com/commands/T12345678/12345678/abcdef
              text: user input text here
              command: /mycommand
  /api/agent_schedules:
    get:
      summary: index
      tags:
        - AgentSchedule
      responses:
        '200':
          description: >-
            Empty result set when interface type filter does not match any
            resources values
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        links:
                          type: object
                          properties:
                            self:
                              type: string
                          required:
                            - self
                        attributes:
                          type: object
                          properties:
                            createdAt:
                              type: string
                            updatedAt:
                              type: string
                            projectId:
                              type: string
                            agentId:
                              type: string
                            formInterfaceId:
                              type: string
                              nullable: true
                            chatInterfaceId:
                              nullable: true
                              type: string
                            interfaceType:
                              type: string
                              enum:
                                - form
                                - chat
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            status:
                              type: string
                              enum:
                                - active
                                - paused
                                - disabled
                            repeatUnit:
                              type: string
                              enum:
                                - no_repeat
                                - daily
                                - weekly
                                - monthly
                            repeatFrequency:
                              type: integer
                            repeatSubFrequency:
                              type: array
                              items:
                                type: integer
                            timezone:
                              type: string
                            startAt:
                              type: string
                            endAt:
                              nullable: true
                              type: string
                            parameterValues:
                              type: object
                              properties:
                                param1:
                                  type: string
                                  nullable: true
                                param2:
                                  type: string
                                  nullable: true
                                input:
                                  type: string
                                  nullable: true
                            sendEmailNotification:
                              type: boolean
                            emailRecipients:
                              type: array
                              items:
                                type: string
                            textResourceId:
                              nullable: true
                              type: string
                            workflowProjectId:
                              type: string
                              nullable: true
                            workflowSessionId:
                              nullable: true
                              type: string
                            workflowAttemptId:
                              nullable: true
                              type: string
                            lastExecutedAt:
                              nullable: true
                              type: string
                            executionCount:
                              type: integer
                            lastRunStatus:
                              nullable: true
                              type: string
                              enum:
                                - success
                                - failure
                            lastRunErrorMessage:
                              nullable: true
                              type: string
                          required:
                            - createdAt
                            - updatedAt
                            - projectId
                            - agentId
                            - formInterfaceId
                            - chatInterfaceId
                            - interfaceType
                            - name
                            - description
                            - status
                            - repeatUnit
                            - repeatFrequency
                            - repeatSubFrequency
                            - timezone
                            - startAt
                            - endAt
                            - parameterValues
                            - sendEmailNotification
                            - emailRecipients
                            - textResourceId
                            - workflowProjectId
                            - workflowSessionId
                            - workflowAttemptId
                            - lastExecutedAt
                            - executionCount
                            - lastRunStatus
                            - lastRunErrorMessage
                        relationships:
                          type: object
                          properties:
                            project:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                            createdBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                            updatedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                            agent:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                            formInterface:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                            chatInterface:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    id:
                                      type: string
                                  required:
                                    - type
                                    - id
                              required:
                                - data
                      required:
                        - id
                        - type
                        - links
                        - attributes
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                    required:
                      - total
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                    required:
                      - first
                      - last
                  included:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        links:
                          type: object
                          properties:
                            self:
                              type: string
                          required:
                            - self
                          nullable: true
                        attributes:
                          type: object
                          properties:
                            createdAt:
                              type: string
                              nullable: true
                            updatedAt:
                              type: string
                              nullable: true
                            name:
                              type: string
                            description:
                              nullable: true
                            useRuntimeTextResource:
                              type: boolean
                              nullable: true
                            useParentSegment:
                              type: boolean
                              nullable: true
                            useWorkflowExecutor:
                              type: boolean
                              nullable: true
                            isManaged:
                              type: boolean
                              nullable: true
                            managedType:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            projectId:
                              type: string
                            agentId:
                              type: string
                            promptTemplate:
                              type: string
                            formJsonSchema:
                              type: string
                            formUiSchema:
                              nullable: true
                            useTextResource:
                              type: boolean
                            starterMessage:
                              type: string
                            textInputEnabled:
                              type: boolean
                            textInputAgentId:
                              type: string
                            chatInterfaceButtons:
                              type: array
                              items: {}
                          required:
                            - name
                      required:
                        - id
                        - type
                        - attributes
                required:
                  - data
                  - meta
                  - links
              example:
                data: []
                meta:
                  total: 0
                links:
                  first: >-
                    http://www.example.com/api/agent_schedules?filter%5BinterfaceType%5D=nonexistent&page%5Blimit%5D=20&page%5Boffset%5D=0
                  last: >-
                    http://www.example.com/api/agent_schedules?filter%5BinterfaceType%5D=nonexistent&page%5Blimit%5D=20&page%5Boffset%5D=0
                included:
                  - id: 00000000-0000-0000-0000-000000000001
                    type: chatInterfaces
                    links:
                      self: >-
                        http://www.example.com/api/chat_interfaces/00000000-0000-0000-0000-000000000001
                    attributes:
                      createdAt: '2025-05-01T05:05:14.000Z'
                      updatedAt: '2025-05-01T05:05:14.000Z'
                      projectId: 00000000-0000-0000-0000-000000000001
                      name: hsniqued
                      starterMessage: ''
                      textInputEnabled: true
                      textInputAgentId: 00000000-0000-0000-0000-000000000001
                      isManaged: false
                      chatInterfaceButtons: []
                  - id: 00000000-0000-0000-0000-000000000001
                    type: chatInterfaces
                    links:
                      self: >-
                        http://www.example.com/api/chat_interfaces/00000000-0000-0000-0000-000000000001
                    attributes:
                      createdAt: '2025-05-01T05:05:14.000Z'
                      updatedAt: '2025-05-01T05:05:14.000Z'
                      projectId: 00000000-0000-0000-0000-000000000001
                      name: ijpodbmo
                      starterMessage: ''
                      textInputEnabled: true
                      textInputAgentId: 00000000-0000-0000-0000-000000000001
                      isManaged: false
                      chatInterfaceButtons: []
        '401':
          description: Rejected by 401
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                  - status
                  - error
              example:
                status: '401'
                error: User credentials aren't set on the request
      parameters:
        - name: filter[agentId]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: filter[formInterfaceId]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: filter[chatInterfaceId]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: filter[interfaceType]
          in: query
          required: false
          schema:
            type: string
          example: nonexistent
        - name: filter[projectId]
          in: query
          required: false
          schema:
            type: string
          example: 00000000-0000-0000-0000-000000000001
        - name: include
          in: query
          required: false
          schema:
            type: string
          example: chatInterface
        - name: sort
          in: query
          required: false
          schema:
            type: string
          example: id
    post:
      summary: create
      tags:
        - AgentSchedule
      responses:
        '201':
          description: Agent schedule successfully created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      links:
                        type: object
                        properties:
                          self:
                            type: string
                        required:
                          - self
                      attributes:
                        type: object
                        properties:
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          projectId:
                            type: string
                          agentId:
                            type: string
                          formInterfaceId:
                            type: string
                            nullable: true
                          chatInterfaceId:
                            nullable: true
                            type: string
                          interfaceType:
                            type: string
                          name:
                            type: string
                          description:
                            type: string
                            nullable: true
                          status:
                            type: string
                          repeatUnit:
                            type: string
                          repeatFrequency:
                            type: integer
                          repeatSubFrequency:
                            type: array
                            items:
                              type: integer
                          timezone:
                            type: string
                          startAt:
                            type: string
                          endAt:
                            nullable: true
                            type: string
                          parameterValues:
                            type: object
                            properties:
                              param2:
                                type: string
                              param1:
                                type: string
                              image_param:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    contentType:
                                      type: string
                                    binaryBase64:
                                      type: string
                                  required:
                                    - contentType
                                    - binaryBase64
                              array_param:
                                type: array
                                items:
                                  type: string
                              mixed_param:
                                type: array
                                items:
                                  type: string
                                  oneOf:
                                    - type: string
                                    - type: object
                                      properties:
                                        contentType:
                                          type: string
                                        binaryBase64:
                                          type: string
                                      required:
                                        - contentType
                                        - binaryBase64
                              regular_param:
                                type: 

# --- truncated at 32 KB (636 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/treasure-data/refs/heads/main/openapi/treasure-data-llm-api-openapi.yml