Creed sanctum-chatbot API

The sanctum-chatbot API from Creed — 5 operation(s) for sanctum-chatbot.

OpenAPI Specification

creed-sanctum-chatbot-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Creed achievements sanctum-chatbot API
  description: Creed API - Christian AI Chatbot
  version: 1.0.0
tags:
- name: sanctum-chatbot
paths:
  /sanctum/api/chatbot:
    post:
      tags:
      - sanctum-chatbot
      summary: Chatbot Endpoint
      operationId: chatbot_endpoint_sanctum_api_chatbot_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sanctum/api/chats:
    get:
      tags:
      - sanctum-chatbot
      summary: Get User Chats
      description: Get all chats for the current authenticated user
      operationId: get_user_chats_sanctum_api_chats_get
      security:
      - HTTPBearer: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 20
          title: Limit
      - name: x-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sanctum/api/chats/{chat_id}/messages:
    get:
      tags:
      - sanctum-chatbot
      summary: Get Chat Messages
      description: Get messages for a specific chat
      operationId: get_chat_messages_sanctum_api_chats__chat_id__messages_get
      security:
      - HTTPBearer: []
      parameters:
      - name: chat_id
        in: path
        required: true
        schema:
          type: string
          title: Chat Id
      - name: recent
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Recent
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 100
          title: Limit
      - name: x-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sanctum/api/chat/suggestions:
    get:
      tags:
      - sanctum-chatbot
      summary: Get Chat Suggestions
      description: Get chat suggestions for the Christian companion app in user's preferred language.
      operationId: get_chat_suggestions_sanctum_api_chat_suggestions_get
      security:
      - HTTPBearer: []
      parameters:
      - name: conversation_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
      - name: x-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuggestionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sanctum/api/chatbot/compact:
    post:
      tags:
      - sanctum-chatbot
      summary: Compact Conversation
      description: Trigger conversation compaction inline. Called after a successful chat message.
      operationId: compact_conversation_sanctum_api_chatbot_compact_post
      security:
      - HTTPBearer: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: x-user-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-User-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompactRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompactResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Source:
      properties:
        title:
          type: string
          title: Title
        url:
          type: string
          title: Url
        snippet:
          anyOf:
          - type: string
          - type: 'null'
          title: Snippet
        favicon:
          anyOf:
          - type: string
          - type: 'null'
          title: Favicon
        domain:
          anyOf:
          - type: string
          - type: 'null'
          title: Domain
      type: object
      required:
      - title
      - url
      title: Source
    ChatRequest:
      properties:
        message:
          type: string
          title: Message
          default: ''
        conversation_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
        sendAudio:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Sendaudio
          default: false
        newUser:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Newuser
          default: false
        promptKey:
          anyOf:
          - type: string
          - type: 'null'
          title: Promptkey
          description: Used alongside daily topic quest
        image_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Image Ids
      type: object
      title: ChatRequest
    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
    SuggestionsResponse:
      properties:
        suggestions:
          items:
            type: string
          type: array
          title: Suggestions
      type: object
      required:
      - suggestions
      title: SuggestionsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CompactRequest:
      properties:
        conversation_id:
          type: string
          title: Conversation Id
      type: object
      required:
      - conversation_id
      title: CompactRequest
    ChatResponse:
      properties:
        reply:
          anyOf:
          - type: string
          - type: 'null'
          title: Reply
        conversation_id:
          type: string
          title: Conversation Id
        bible_verses:
          items:
            type: string
          type: array
          title: Bible Verses
          default: []
        sources:
          anyOf:
          - items:
              $ref: '#/components/schemas/Source'
            type: array
          - type: 'null'
          title: Sources
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        audio_base64:
          anyOf:
          - type: string
          - type: 'null'
          title: Audio Base64
      type: object
      required:
      - conversation_id
      title: ChatResponse
    CompactResponse:
      properties:
        success:
          type: boolean
          title: Success
        messages_compacted:
          type: integer
          title: Messages Compacted
          default: 0
        skipped:
          type: boolean
          title: Skipped
          default: false
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
      type: object
      required:
      - success
      title: CompactResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase JWT token