Torque Decide API

Assistant chat

GitHub OpenAPI

Operations 3

POST /api/v1/decide/fulfillment Portfolio fulfillment preview (transfer / checkout) #
POST /api/v1/decide/assistant/chat Torque Intelligence chat #
POST /api/v1/assistant/chat Torque Intelligence chat (deprecated alias) #

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/torque-fi:torque-fi-decide-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

torque-fi-decide-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Torque API v1 Decide API
  version: '24'
  description: Versioned Platform API for Torque Intelligence (READ), Assistant (DECIDE), and wallet execution (EXECUTE). Business integrators use Bearer sk_live_… (100 requests/minute per key; success responses include X-RateLimit-*; 429 adds Retry-After). Wallet execution requires smart wallet JWT; optional Idempotency-Key on POST execute routes (24h replay). Intelligence schema manifest v7. Legacy paths (/data, /opportunities, /actions, …) are deprecated aliases — see route catalog and X-Torque-Canonical-Path headers.
  contact:
    name: Torque
    url: https://torque.fi
servers:
- url: https://app.torque.fi
  description: Production
- url: http://localhost:3000
  description: Local development
tags:
- name: Decide
  description: Assistant chat
paths:
  /api/v1/decide/fulfillment:
    post:
      tags:
      - Decide
      summary: Portfolio fulfillment preview (transfer / checkout)
      description: DECIDE preview for pay/transfer intents. Requires smart wallet JWT (or business key + walletAddress where supported).
      x-torque-runtime-stage: decide
      security:
      - smartWalletJwt: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecideFulfillmentPostBody'
      responses:
        '200':
          description: Fulfillment preview (actionable plan or shortfall)
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
        '401':
          description: Invalid or missing smart wallet JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
      operationId: postApiV1DecideFulfillment
      x-operation-id-source: derived
  /api/v1/decide/assistant/chat:
    post:
      tags:
      - Decide
      summary: Torque Intelligence chat
      description: Conversational Torque Intelligence (Gemini + tools). Tool calls can return confirmable payloads (functionResults) for the client to sign.
      x-torque-runtime-stage: decide
      security:
      - businessApiKey: []
      parameters:
      - name: stream
        in: query
        required: false
        description: Set to true for SSE streaming
        schema:
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantChatPostBody'
      responses:
        '200':
          description: JSON reply or text/event-stream when stream=true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantChatResponse'
            text/event-stream:
              schema:
                type: string
                description: 'SSE lines: data: {JSON AssistantChatStreamEvent}'
        '401':
          description: Invalid or missing business API key (programmatic callers)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
        '402':
          description: Free-tier assistant credits exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantCreditsError'
        '500':
          description: Assistant error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
      operationId: postApiV1DecideAssistantChat
      x-operation-id-source: derived
  /api/v1/assistant/chat:
    post:
      tags:
      - Decide
      summary: Torque Intelligence chat (deprecated alias)
      description: Deprecated alias — use `/api/v1/decide/assistant/chat`. Conversational Torque Intelligence (Gemini + tools). Tool calls can return confirmable payloads (functionResults) for the client to sign.
      x-torque-runtime-stage: decide
      security:
      - businessApiKey: []
      parameters:
      - name: stream
        in: query
        required: false
        description: Set to true for SSE streaming
        schema:
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantChatPostBody'
      responses:
        '200':
          description: JSON reply or text/event-stream when stream=true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantChatResponse'
            text/event-stream:
              schema:
                type: string
                description: 'SSE lines: data: {JSON AssistantChatStreamEvent}'
        '401':
          description: Invalid or missing business API key (programmatic callers)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
        '402':
          description: Free-tier assistant credits exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantCreditsError'
        '500':
          description: Assistant error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TorqueV1Error'
      deprecated: true
      x-torque-canonical-path: /api/v1/decide/assistant/chat
      operationId: postApiV1AssistantChat
      x-operation-id-source: derived
components:
  schemas:
    AssistantChatPostBody:
      type: object
      required:
      - messages
      properties:
        messages:
          type: array
          items:
            type: object
            required:
            - role
            properties:
              role:
                type: string
              content: {}
            additionalProperties: true
        context:
          type: object
          properties:
            walletAddress:
              type: string
            solanaWalletAddress:
              type: string
            chainId:
              type: integer
            localCurrency:
              type: string
            authJWT:
              type: string
          additionalProperties: true
        conversationId:
          type: string
    AssistantCreditsError:
      type: object
      required:
      - error
      - message
      properties:
        error:
          type: string
          enum:
          - assistant_credits_exhausted
        message:
          type: string
        upgrade:
          type: boolean
        remaining:
          type: integer
        limit:
          type: integer
        resetAt:
          type:
          - integer
          - 'null'
    AssistantChatResponse:
      type: object
      properties:
        content: {}
        functionResults:
          type: array
          items:
            type: object
            properties:
              toolName:
                type: string
              result:
                type: object
                additionalProperties: true
        suggestions:
          type: array
          items:
            type: string
      additionalProperties: true
    TorqueV1Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
    DecideFulfillmentPostBody:
      type: object
      required:
      - surface
      - params
      properties:
        surface:
          type: string
          enum:
          - transfer
          - checkout
        walletAddress:
          type: string
        solanaWalletAddress:
          type: string
        params:
          type: object
          required:
          - assetSymbol
          - decimals
          - canonical
          - amount
          - executionChainId
          properties:
            assetSymbol:
              type: string
            decimals:
              type: integer
            canonical:
              type: number
            amount:
              type: number
            executionChainId:
              type: integer
            bucketOwnership:
              type: number
            portfolioNavUsd:
              type: number
            slippage:
              type: number
            privacyMode:
              type: string
            rawBalancesByChain:
              type: object
              additionalProperties: true
  securitySchemes:
    businessApiKey:
      type: http
      scheme: bearer
      bearerFormat: sk_live_…
      description: Merchant identity, programmatic Torque Intelligence (`GET /api/v1/intelligence/**`), and server-side assistant chat.
    smartWalletJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: RS256 JWT issued for the email smart-wallet session (same value as in-app smartWalletAuthJWT). Verified with JWT_PUBLIC_KEY / JWT_ISSUER.
x-torque-manifest-version: 24
x-torque-intelligence-schema-version: 7
x-torque-route-catalog:
- method: GET
  path: /api/v1/health
  stage: meta
- method: GET
  path: /api/v1/capabilities
  stage: meta
- method: GET
  path: /api/v1/openapi
  stage: meta
- method: GET
  path: /api/v1/accounts/business
  stage: accounts
  aliases:
  - /api/v1/business/me
- method: GET
  path: /api/v1/accounts/wallet
  stage: accounts
  aliases:
  - /api/v1/wallet/me
- method: POST
  path: /api/v1/accounts/end-users
  stage: accounts
- method: GET
  path: /api/v1/accounts/end-users
  stage: accounts
- method: GET
  path: /api/v1/accounts/end-users/{externalUserId}
  stage: accounts
- method: GET
  path: /api/v1/accounts/end-users/{externalUserId}/deposits
  stage: accounts
- method: GET
  path: /api/v1/intelligence/feed
  stage: read
- method: GET
  path: /api/v1/intelligence/views/trade-angles
  stage: read
  aliases:
  - /api/v1/intelligence/trade-angles
- method: GET
  path: /api/v1/intelligence/views/happening-now
  stage: read
  aliases:
  - /api/v1/intelligence/happening-now
- method: GET
  path: /api/v1/intelligence/views/brief
  stage: read
  aliases:
  - /api/v1/intelligence/brief
- method: GET
  path: /api/v1/intelligence/views/market-outlook
  stage: read
  aliases:
  - /api/v1/intelligence/market-outlook
- method: GET
  path: /api/v1/intelligence/datasets/earnings-spotlight
  stage: read
  aliases:
  - /api/v1/data/earnings-spotlight
  - /api/v1/widgets/earnings-spotlight
- method: GET
  path: /api/v1/intelligence/datasets/events
  stage: read
  aliases:
  - /api/v1/data/events
- method: GET
  path: /api/v1/intelligence/markets/yield
  stage: read
  aliases:
  - /api/v1/opportunities/yield
- method: GET
  path: /api/v1/intelligence/markets/lending
  stage: read
  aliases:
  - /api/v1/opportunities/lending
- method: GET
  path: /api/v1/read/portfolio
  stage: read
- method: POST
  path: /api/v1/connect/confirm
  stage: decide
- method: GET
  path: /api/v1/connect/confirm/verify
  stage: meta
- method: POST
  path: /api/v1/connect/confirm/complete
  stage: decide
- method: POST
  path: /api/v1/connect/authorize/session
  stage: accounts
- method: POST
  path: /api/v1/connect/authorize/complete
  stage: accounts
- method: POST
  path: /api/v1/connect/token
  stage: accounts
- method: POST
  path: /api/v1/decide/assistant/chat
  stage: decide
  aliases:
  - /api/v1/assistant/chat
- method: POST
  path: /api/v1/decide/fulfillment
  stage: decide
- method: POST
  path: /api/v1/execute/trades
  stage: execute
  aliases:
  - /api/v1/actions/trade/swap
- method: POST
  path: /api/v1/execute/trades/solana
  stage: execute
  aliases:
  - /api/v1/actions/trade/swap/solana
- method: POST
  path: /api/v1/execute/transfers/evm
  stage: execute
  aliases:
  - /api/v1/actions/transfer/evm
- method: POST
  path: /api/v1/execute/transfers/solana
  stage: execute
  aliases:
  - /api/v1/actions/transfer/solana
- method: POST
  path: /api/v1/execute/transfers/btc
  stage: execute
  aliases:
  - /api/v1/actions/transfer/btc
- method: POST
  path: /api/v1/execute/lends/evm
  stage: execute
  aliases:
  - /api/v1/actions/lend/evm
- method: POST
  path: /api/v1/execute/borrows/evm
  stage: execute
  aliases:
  - /api/v1/actions/borrow/evm
- method: POST
  path: /api/v1/distribution/bulk
  stage: execute
- method: GET
  path: /api/v1/distribution/runs
  stage: execute
- method: POST
  path: /api/v1/distribution/runs/{runId}/dry-run
  stage: execute
- method: POST
  path: /api/v1/distribution/runs/{runId}/confirm
  stage: execute
- method: GET
  path: /api/v1/distribution/runs/{runId}/reconciliation
  stage: execute