TaScan AI API

The ai API from TaScan — 6 operation(s) for ai.

GitHub OpenAPI

Operations 10

GET /chat/threads Chat threads #
POST /chat/threads New chat thread #
GET /chat/threads/{id} A chat thread with its messages #
PUT /chat/threads/{id} Rename a chat thread #
DELETE /chat/threads/{id} Delete a chat thread #
PATCH /chat/threads/{id} Rename a chat thread #
POST /chat/threads/{id}/messages Append messages to a chat thread #
POST /chat/attachments Upload a photo for a chat thread #
GET /insights AI Insights #
POST /insights/{id}/{action} Apply or dismiss an insight #

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/tascan-io:tascan-io-ai-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

tascan-io-ai-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TaScan AI API
  version: 1.1.0
  description: 'TaScan: Task. Scan. Done. Verified Work for humans, AI agents and devices. Create and dispatch work, collect evidence (photos, GPS, NFC/QR/RFID scans, device readings, agent output), verify it under pinned policies, and get a signed Action Receipt anyone can check without trusting TaScan. Covers projects and task lists, workers and payments, zones, tags and assets, evidence ingestion, verifications, receipts, agent coordination (cycles, builds, fan-outs, runs), keys, budgets and delegations. MCP clients should use the native MCP server instead: https://app.tascan.io/mcp (npm: tascan-mcp), which exposes the same capabilities as tools. Protocol spec: https://app.tascan.io/docs/protocol/TASCAN-PROTOCOL-v0.1.md. Independent receipt verifier: npx tascan-verify.'
  contact:
    name: TaScan
    url: https://tascan.io
  termsOfService: https://tascan.io/terms
servers:
- url: https://app.tascan.io/api/v1
security:
- apiKey: []
tags:
- name: AI
paths:
  /chat/threads:
    get:
      summary: Chat threads
      description: 'SR-API3: chat_threads, newest first (limit 1-200, default 50). A session sees its own threads (admin_id = itself, as simple.html lists them); a key sees the threads of its org''s admins (admin_id narrows). Read tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: get_chat_threads
      parameters:
      - name: admin_id
        in: query
        required: false
        schema:
          type: string
        description: 'Key only: one admin'
      - name: limit
        in: query
        required: false
        schema:
          type: integer
        description: 1-200
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_list_chat_threads
    post:
      summary: New chat thread
      description: 'SR-API3: inserts simple.html''s shape { admin_id, org_id, title (default New Chat) }. A session creates its own; a key names admin_id (an admin of its org). Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: post_chat_thread
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 1-80 characters
                admin_id:
                  type: string
                  description: Key only
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_save_chat_thread
  /chat/threads/{id}:
    get:
      summary: A chat thread with its messages
      description: 'SR-API3: the thread and its admin_chat_logs (role, content, created_at; oldest first, at most 200). Another admin''s thread (session) or another org''s: 404. Read tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: get_chat_thread
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Thread id
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_list_chat_threads
    put:
      summary: Rename a chat thread
      description: 'SR-API3: { title?, preview? } (+ updated_at). PATCH is the same. Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: put_chat_thread
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Thread id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 1-80 characters
                preview:
                  type: string
                  description: Cut to 80 characters
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_save_chat_thread
    delete:
      summary: Delete a chat thread
      description: 'SR-API3: simple.html''s delete (its admin_chat_logs, then the thread; chat logs carry no receipt), after a receipted chat_thread_deleted ledger event (503 and nothing deleted when it cannot be written). Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: delete_chat_thread
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Thread id
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_delete_chat_thread
    patch:
      summary: Rename a chat thread
      description: 'SR-API3: { title?, preview? } (+ updated_at). PATCH is the same. Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: patch_chat_thread
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Thread id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 1-80 characters
                preview:
                  type: string
                  description: Cut to 80 characters
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_save_chat_thread
  /chat/threads/{id}/messages:
    post:
      summary: Append messages to a chat thread
      description: 'SR-CHAT1: { messages: [{ role, content }] } appends 1 or 2 turns to admin_chat_logs in the shape chat.js writes (org_id, admin_id = the thread''s admin, page portal for a session or api for a key, role, content, thread_id, one created_at each), then sets the thread''s message_count (its stored row count), preview (the last message, 80 characters) and updated_at. role is user or assistant; content is non-empty text of at most 32 KB (UTF-8) with no data: URL (400 / 413). A session reaches only its own threads, a key its org''s admins'' threads; anything else is 404. A receipted chat_messages_appended ledger event (the content hashed, never copied) is written first: 503 and nothing saved when it cannot be. 201 { data: thread + appended + audit_event_id }. Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: an owner or admin session may append.'
      tags:
      - AI
      operationId: post_chat_thread_messages
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Thread id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - messages
              properties:
                messages:
                  type: array
                  minItems: 1
                  maxItems: 2
                  items:
                    type: object
                    required:
                    - role
                    - content
                    additionalProperties: false
                    properties:
                      role:
                        type: string
                        enum:
                        - user
                        - assistant
                      content:
                        type: string
                        description: 'Text, at most 32 KB of UTF-8, no data: URL'
      responses:
        '201':
          description: 'Appended. JSON body: { data: { id, admin_id, org_id, title, preview, message_count, created_at, updated_at, appended, audit_event_id } }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit); 404 for a thread the caller does not reach; 413 for content over 32 KB.
        '503':
          description: The receipt could not be written; nothing was saved.
      x-mcp-tools:
      - tascan_append_chat_messages
  /chat/attachments:
    post:
      summary: Upload a photo for a chat thread
      description: 'SR-CHAT1: { thread_id, content_type, data_base64, name? } stores one photo for a chat thread the caller reaches (a session: its own; a key: its org''s admins'') and returns an opaque attachment_id. The bytes pass the API''s photo check (image/jpeg, image/png or image/gif, at most 3.5 MB decoded, the magic bytes must match the type) and are stored by the server in TaScan''s private photo storage under the org and the thread. No URL and no token is returned. The portal helper then sends { type: attachment, attachment_id } in a chat turn with attachmentThreadId; chat.js resolves it, for that thread''s own admin only, to a 5-minute signed storage URL that only the model sees. Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: an owner or admin session may upload.'
      tags:
      - AI
      operationId: post_chat_attachment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - thread_id
              - content_type
              - data_base64
              additionalProperties: false
              properties:
                thread_id:
                  type: string
                  description: The chat thread the photo belongs to
                content_type:
                  type: string
                  enum:
                  - image/jpeg
                  - image/png
                  - image/gif
                data_base64:
                  type: string
                  description: The photo, base64 (at most 3.5 MB decoded)
                name:
                  type: string
                  description: The file name to show (cut to 120 characters)
      responses:
        '201':
          description: 'Stored. JSON body: { data: { attachment_id, thread_id, content_type, bytes, name, use } }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit); 404 for a thread the caller does not reach; 413 over 3.5 MB.
        '503':
          description: The photo could not be stored.
  /insights:
    get:
      summary: AI Insights
      description: 'SR-API3: ai_suggestions of the org, newest first: status pending (default), applied, dismissed, explained, expired or all; project_id; limit 1-100. tascan_auto_resolve / tascan_recommend_fix act on task issues, not on these. Read tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session. SR-S2 r7 (list level only): rows of lists assigned to another agent are left out IN THE QUERY, before the limit / offset is applied, so a page is never short and never counts them.'
      tags:
      - AI
      operationId: get_insights
      parameters:
      - name: status
        in: query
        required: false
        schema:
          type: string
        description: Default pending
      - name: project_id
        in: query
        required: false
        schema:
          type: string
        description: Project id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
        description: 1-100
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_list_insights
  /insights/{id}/{action}:
    post:
      summary: Apply or dismiss an insight
      description: 'SR-API3: simple.html''s exact status writes: apply -> applied, dismiss -> dismissed (+ dismissed_reason from { reason }). Apply returns the suggestion (title, body, action_type, action_data) for the caller to carry out and runs no AI. Only a pending or explained insight (else 409 not_pending). Write tier. Also accepts an admin portal session (the Supabase JWT of an admin_users row) as the bearer: any admin role may read; every other method needs an owner or admin session.'
      tags:
      - AI
      operationId: post_insight_action
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Insight id
      - name: action
        in: path
        required: true
        schema:
          type: string
          enum:
          - apply
          - dismiss
        description: apply | dismiss
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: dismiss only; at most 500 characters
      responses:
        '200':
          description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
        4XX:
          description: Client error (validation, auth, scope, rate limit).
      x-mcp-tools:
      - tascan_resolve_insight
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key from the TaScan admin Team page.  Format: tsk_live_...  Send as: Authorization: Bearer tsk_live_xxx.  Rate limit 60 requests/min.'
x-generated:
  by: live-event/scripts/gen-agent-docs.js
  from:
  - api-v1-helpers.js ROUTES
  - api-v1.js handler switch
  - coord-*-lib.js matchers
  - receipt.js
  - tascan-mcp/tools.cjs
  operations: 218
  mcp_tools: 141