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

# Text Classification

> RAG-Buddy API endpoint for the Text-Classification use case.



## OpenAPI

````yaml post /tc/{version}
openapi: 3.1.0
info:
  title: RAG-Buddy API
  description: >-
    RAG-Buddy offers a number of services for taking your LLM/RAG pipeline to
    the next level. It introduces a range of innovative tools, designed to help
    developers supercharge their LLM applications.
  contact:
    name: RAG-Buddy Support Team
    email: ragbuddy@helvia.ai
  version: 1.0.0
servers:
  - url: https://api.ragbuddy.ai
    description: RAG-Buddy API server
security: []
paths:
  /tc/{version}:
    post:
      summary: Text Classification
      description: RAG-Buddy API endpoint for the Text-Classification use case.
      operationId: text_classification_tc__version__post
      parameters:
        - name: version
          in: path
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Version'
            title: API Version
            description: Version of the API to use
          description: Version of the API to use
        - name: helvia-rag-buddy-token
          in: header
          required: true
          schema:
            type: string
            title: Helvia-Rag-Buddy-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TcRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Version:
      type: string
      const: v1
      title: Version
    TcRequest:
      properties:
        remote_llm_url:
          type: string
          title: Remote Llm Url
        user_message:
          type: string
          title: User Message
        system_instructions:
          type: string
          title: System Instructions
      additionalProperties: true
      type: object
      required:
        - remote_llm_url
        - user_message
        - system_instructions
      title: TcRequest
    ChatCompletion:
      properties:
        id:
          type: string
          title: Id
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          type: array
          title: Choices
        created:
          type: integer
          title: Created
        model:
          type: string
          title: Model
        object:
          const: chat.completion
          title: Object
        system_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: System Fingerprint
        usage:
          anyOf:
            - $ref: '#/components/schemas/CompletionUsage'
            - type: 'null'
      additionalProperties: true
      type: object
      required:
        - id
        - choices
        - created
        - model
        - object
      title: ChatCompletion
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Choice:
      properties:
        finish_reason:
          type: string
          enum:
            - stop
            - length
            - tool_calls
            - content_filter
            - function_call
          title: Finish Reason
        index:
          type: integer
          title: Index
        message:
          $ref: '#/components/schemas/ChatCompletionMessage'
      additionalProperties: true
      type: object
      required:
        - finish_reason
        - index
        - message
      title: Choice
    CompletionUsage:
      properties:
        completion_tokens:
          type: integer
          title: Completion Tokens
        prompt_tokens:
          type: integer
          title: Prompt Tokens
        total_tokens:
          type: integer
          title: Total Tokens
      additionalProperties: true
      type: object
      required:
        - completion_tokens
        - prompt_tokens
        - total_tokens
      title: CompletionUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ChatCompletionMessage:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        role:
          const: assistant
          title: Role
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionMessageToolCall'
              type: array
            - type: 'null'
          title: Tool Calls
      additionalProperties: true
      type: object
      required:
        - content
        - role
      title: ChatCompletionMessage
    FunctionCall:
      properties:
        arguments:
          type: string
          title: Arguments
        name:
          type: string
          title: Name
      additionalProperties: true
      type: object
      required:
        - arguments
        - name
      title: FunctionCall
    ChatCompletionMessageToolCall:
      properties:
        id:
          type: string
          title: Id
        function:
          $ref: '#/components/schemas/Function'
        type:
          const: function
          title: Type
      additionalProperties: true
      type: object
      required:
        - id
        - function
        - type
      title: ChatCompletionMessageToolCall
    Function:
      properties:
        arguments:
          type: string
          title: Arguments
        name:
          type: string
          title: Name
      additionalProperties: true
      type: object
      required:
        - arguments
        - name
      title: Function
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````