AI2Fin AI Assistant API

Chat conversations, messaging, and assistant file handling

Operations 8

GET /api/chat/conversations List conversations #
POST /api/chat/conversations Create conversation #
GET /api/chat/conversations/{id} Get conversation #
POST /api/chat/message Send chat message #
POST /api/chat/upload Upload chat files #
POST /api/chat/stream Stream assistant response #
GET /api/chat/stream-test Test streaming endpoint #
GET /api/chat/files/{userId}/{fileName} Download chat file #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ai2fin-com:ai2fin-com-ai-assistant-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ai2fin-com-ai-assistant-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AI2Fin Financial Management AI Assistant API
  description: Financial management platform with AI-powered categorization, tax optimization, and bill management.
  version: 1.0.0
  contact:
    name: AI2Fin Support
    url: https://ai2fin.com
  license:
    name: Proprietary
servers:
- url: https://api.ai2fin.com
  description: Production
- url: http://localhost:3001
  description: Local Development
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: AI Assistant
  description: Chat conversations, messaging, and assistant file handling
paths:
  /api/chat/conversations:
    get:
      tags:
      - AI Assistant
      summary: List conversations
      description: Retrieve chat conversations for the authenticated user
      responses:
        '200':
          description: Conversations retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChatConversation'
      operationId: getApiChatConversations
      x-operation-id-source: derived
    post:
      tags:
      - AI Assistant
      summary: Create conversation
      description: Create a new chat conversation thread
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Optional title for the conversation
      responses:
        '201':
          description: Conversation created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/ChatConversation'
      operationId: postApiChatConversations
      x-operation-id-source: derived
  /api/chat/conversations/{id}:
    get:
      tags:
      - AI Assistant
      summary: Get conversation
      description: Fetch a conversation with full message history
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Conversation retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      conversation:
                        $ref: '#/components/schemas/ChatConversation'
                      messages:
                        type: array
                        items:
                          $ref: '#/components/schemas/ChatMessage'
        '404':
          description: Conversation not found
      operationId: getApiChatConversationsById
      x-operation-id-source: derived
  /api/chat/message:
    post:
      tags:
      - AI Assistant
      summary: Send chat message
      description: Send a user message and receive the AI assistant response
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - message
              properties:
                conversationId:
                  type: string
                  description: Existing conversation identifier
                message:
                  type: string
                  description: User message content
                assetUrls:
                  type: array
                  items:
                    type: string
                  description: Optional uploaded asset URLs for the assistant to analyze
      responses:
        '200':
          description: Assistant response returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      conversationId:
                        type: string
                      message:
                        $ref: '#/components/schemas/ChatMessage'
      operationId: postApiChatMessage
      x-operation-id-source: derived
  /api/chat/upload:
    post:
      tags:
      - AI Assistant
      summary: Upload chat files
      description: Upload one or more files (receipts, invoices, documents) for assistant processing
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - files
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
      responses:
        '200':
          description: Files uploaded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      files:
                        type: array
                        items:
                          $ref: '#/components/schemas/ChatFile'
      operationId: postApiChatUpload
      x-operation-id-source: derived
  /api/chat/stream:
    post:
      tags:
      - AI Assistant
      summary: Stream assistant response
      description: Initiate a streaming assistant response using Server-Sent Events (SSE)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - message
              properties:
                conversationId:
                  type: string
                message:
                  type: string
                assetUrls:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: SSE stream started
          content:
            text/event-stream:
              schema:
                type: string
      operationId: postApiChatStream
      x-operation-id-source: derived
  /api/chat/stream-test:
    get:
      tags:
      - AI Assistant
      summary: Test streaming endpoint
      description: Verify SSE streaming connectivity
      responses:
        '200':
          description: Stream test succeeded
          content:
            text/event-stream:
              schema:
                type: string
      operationId: getApiChatStreamTest
      x-operation-id-source: derived
  /api/chat/files/{userId}/{fileName}:
    get:
      tags:
      - AI Assistant
      summary: Download chat file
      description: Retrieve a previously uploaded file if the user is authorized
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
      - name: fileName
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File stream
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: File not found
      operationId: getApiChatFilesByUserIdByFileName
      x-operation-id-source: derived
components:
  schemas:
    ChatMessage:
      type: object
      properties:
        id:
          type: string
        conversationId:
          type: string
        role:
          type: string
          enum:
          - user
          - assistant
          - system
        content:
          type: string
        toolsUsed:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
    ChatConversation:
      type: object
      properties:
        id:
          type: string
        title:
          type:
          - string
          - 'null'
        messageCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ChatFile:
      type: object
      properties:
        assetUrl:
          type: string
        fileName:
          type: string
        mimeType:
          type: string
        size:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: First-party access token for your own signed-in session, obtained from the /api/enterprise-auth/login endpoint. The REST API returns your own account data to you — it is a first-party consumer surface, not a third-party integration channel. Data from connected bank feeds (open-banking / CDR data) is your own data, returned only to you in your own authenticated session.
    cookieAuth:
      type: apiKey
      in: cookie
      name: ai2_sess
      description: Session cookie for web applications
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for the MCP Inspector endpoint (/mcp/inspector) only. Generate your own key via /api/api-keys. Format: mcp_<64 hex characters>. API keys carry mcp:* scopes and authenticate MCP Inspector operations — they are not accepted on the REST API (/api/...) or the main MCP endpoint (/mcp), which use OAuth bearer tokens.'