Triall Reasoning API

The Reasoning API from Triall — 10 operation(s) for reasoning.

GitHub OpenAPI

Operations 10

GET /api/reasoning/anonymous-status Anonymous Status #
POST /api/reasoning/start-anonymous Start Anonymous Reasoning #
POST /api/reasoning/start Start Reasoning #
POST /api/reasoning/{session_id}/repair Repair Reasoning #
GET /api/reasoning/{session_id} Get Session #
POST /api/reasoning/{session_id}/inject Inject Feedback #
POST /api/reasoning/{session_id}/stop Stop Session #
POST /api/reasoning/{session_id}/abandon Abandon Session #
POST /api/reasoning/{session_id}/retry Retry Session #
POST /api/reasoning/{session_id}/claim Claim Anonymous Session #

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/triall-ai:triall-ai-reasoning-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

triall-ai-reasoning-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Triall Reasoning API
  description: Iterative AI Reasoning System
  version: 0.1.0
tags:
- name: Reasoning
paths:
  /api/reasoning/anonymous-status:
    get:
      summary: Anonymous Status
      description: Check if this IP can start an anonymous trial run.
      operationId: anonymous_status_api_reasoning_anonymous_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Reasoning
  /api/reasoning/start-anonymous:
    post:
      summary: Start Anonymous Reasoning
      description: 'Start a free anonymous trial run. No auth required.

        Limited to 3 runs per IP per 24-hour rolling window, test_run preset only.'
      operationId: start_anonymous_reasoning_api_reasoning_start_anonymous_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnonymousReasoningRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/start:
    post:
      summary: Start Reasoning
      description: 'Start a new reasoning session.

        Returns the session ID. Use WebSocket to receive real-time updates.'
      operationId: start_reasoning_api_reasoning_start_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReasoningRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
      tags:
      - Reasoning
  /api/reasoning/{session_id}/repair:
    post:
      summary: Repair Reasoning
      description: '§3.R Repair. Flat 2 credits. Creates a CHILD session (repair_of=parent); the client

        connects a WS to the returned session_id to stream the repair (phase:''repair'').'
      operationId: repair_reasoning_api_reasoning__session_id__repair_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}:
    get:
      summary: Get Session
      description: Get session status and results.
      operationId: get_session_api_reasoning__session_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}/inject:
    post:
      summary: Inject Feedback
      description: Inject human feedback into an active reasoning session.
      operationId: inject_feedback_api_reasoning__session_id__inject_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InjectFeedback'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}/stop:
    post:
      summary: Stop Session
      description: 'Stop an active reasoning session.


        The v3 pipeline only polls the cooperative stop flag at phase boundaries, so an

        in-flight LLM call (a streaming synthesis, the tribunal, a council voice) keeps

        running — and accruing OpenRouter cost — until the next boundary. To make "stop"

        actually halt spend, we CANCEL the reasoning task: the CancelledError unwinds through

        the httpx stream (aborting the request) and run_pipeline_v3''s graceful-stop handler,

        which emits exactly one session_stopped and settles the money ONCE for work done so

        far. The flag stays set as belt-and-suspenders for the legacy cooperative path.'
      operationId: stop_session_api_reasoning__session_id__stop_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}/abandon:
    post:
      summary: Abandon Session
      description: 'Lightweight stop endpoint for sendBeacon on page unload.

        No auth required — but only works if session exists and is running.

        This is safe because setting the stop flag is idempotent and only

        affects the caller''s own session (session_id is unguessable UUID).'
      operationId: abandon_session_api_reasoning__session_id__abandon_post
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}/retry:
    post:
      summary: Retry Session
      description: '''Not good enough'' - retry reasoning with the rejected output.

        Returns immediately. Use WebSocket for updates.'
      operationId: retry_session_api_reasoning__session_id__retry_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
  /api/reasoning/{session_id}/claim:
    post:
      summary: Claim Anonymous Session
      description: Claim an anonymous session after user signs up / logs in.
      operationId: claim_anonymous_session_api_reasoning__session_id__claim_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Reasoning
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContextFile:
      properties:
        name:
          type: string
          maxLength: 255
          title: Name
        content:
          type: string
          maxLength: 10000000
          title: Content
        type:
          type: string
          title: Type
        size:
          type: integer
          title: Size
        isBase64:
          type: boolean
          title: Isbase64
          default: false
        mimeType:
          anyOf:
          - type: string
          - type: 'null'
          title: Mimetype
      type: object
      required:
      - name
      - content
      - type
      - size
      title: ContextFile
      description: A file attached as context (can be text or base64-encoded binary).
    ReasoningRequest:
      properties:
        task:
          type: string
          maxLength: 50000
          minLength: 1
          title: Task
        context:
          anyOf:
          - type: string
            maxLength: 100000
          - type: 'null'
          title: Context
        context_files:
          anyOf:
          - items:
              $ref: '#/components/schemas/ContextFile'
            type: array
            maxItems: 10
          - type: 'null'
          title: Context Files
        config:
          anyOf:
          - $ref: '#/components/schemas/ReasoningConfig'
          - type: 'null'
        language:
          type: string
          title: Language
          description: ISO 639-1 language code for LLM output
          default: en
      type: object
      required:
      - task
      title: ReasoningRequest
      description: Request to start a reasoning session.
    AnonymousReasoningRequest:
      properties:
        task:
          type: string
          title: Task
        language:
          type: string
          title: Language
          default: en
      type: object
      required:
      - task
      title: AnonymousReasoningRequest
    InjectFeedback:
      properties:
        feedback:
          type: string
          maxLength: 10000
          minLength: 1
          title: Feedback
      type: object
      required:
      - feedback
      title: InjectFeedback
      description: Human feedback to inject into the reasoning loop.
    ReasoningConfig:
      properties:
        council_models:
          items:
            type: string
          type: array
          title: Council Models
        generator_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generator Model
        critic_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Critic Model
        refiner_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Refiner Model
        temperature:
          type: number
          maximum: 2.0
          minimum: 0.0
          title: Temperature
          default: 0.7
        max_tokens:
          type: integer
          maximum: 128000.0
          minimum: 100.0
          title: Max Tokens
          default: 32000
        max_iterations:
          type: integer
          maximum: 10.0
          minimum: 1.0
          title: Max Iterations
          default: 2
        criteria:
          anyOf:
          - type: string
          - type: 'null'
          title: Criteria
        output_length:
          type: string
          enum:
          - short
          - medium
          - long
          title: Output Length
          default: long
        mode:
          type: string
          enum:
          - generate
          - council
          - ultrathink
          title: Mode
          default: generate
        critique_only:
          type: boolean
          title: Critique Only
          default: false
        critique_vectors:
          items:
            $ref: '#/components/schemas/CritiqueVector'
          type: array
          title: Critique Vectors
          default: []
        devils_advocate:
          type: boolean
          title: Devils Advocate
          default: true
        web_search:
          type: string
          enum:
          - 'off'
          - 'on'
          title: Web Search
          default: 'off'
        gear:
          anyOf:
          - type: string
            enum:
            - verdict
            - trial
          - type: 'null'
          title: Gear
        score_threshold:
          type: number
          maximum: 10.0
          minimum: 1.0
          title: Score Threshold
          default: 8.0
        improvement_delta:
          type: number
          maximum: 5.0
          minimum: 0.0
          title: Improvement Delta
          default: 0.5
        convergence_window:
          type: integer
          maximum: 10.0
          minimum: 2.0
          title: Convergence Window
          default: 3
        convergence_delta:
          type: number
          maximum: 2.0
          minimum: 0.1
          title: Convergence Delta
          default: 0.3
      type: object
      title: ReasoningConfig
      description: 'Configuration for a Triall reasoning session.


        IMPORTANT: `council_models` is the canonical representation. The three models

        are PEERS, not role assignments. They rotate through generator/critic/refiner

        roles across iterations and operate in parallel during council phase. The order

        in the array determines only which model starts iteration 0 as the generator;

        every other role assignment is derived dynamically.


        The legacy `generator_model`, `critic_model`, `refiner_model` fields are

        deprecated aliases preserved for backward compatibility. Their names are

        historical artifacts and do NOT describe role assignment. New code should

        read `council_models` directly. See COUNCIL_MECHANICS.md.


        The system runs exactly `max_iterations` iterations, then returns the

        highest-scored iteration''s output. Early termination only occurs on

        significant score regression (>1.5 point drop).'
    CritiqueVector:
      type: string
      enum:
      - accuracy
      - logic
      - completeness
      - edge_cases
      - clarity
      - practicality
      - security
      - bias
      title: CritiqueVector
      description: Types of critique focus.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer