twtapi-com Agent API

The Agent API from twtapi-com — 2 operation(s) for agent.

Operations 2

GET /api/v1/agent/tools Tools #
POST /api/v1/agent/invoke Invoke #

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/twtapi-com:twtapi-com-agent-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

twtapi-com-agent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TwtAPI Backend Agent API
  description: API proxy & billing platform for Twitter/RapidAPI
  version: 0.1.0
tags:
- name: Agent
paths:
  /api/v1/agent/tools:
    get:
      summary: Tools
      description: '列出所有可用工具(需要 skill_key 鉴权)。


        返回:

        ``{"tools": [...]}``。注意响应体不是统一的 success() 包装,

        与 /invoke 保持一致的裸结构,这是 Agent 客户端的既有契约。


        副作用:

        无(只读内存中的工具目录),但仍受 AGENT_ENABLED 开关约束。'
      operationId: tools_api_v1_agent_tools_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Agent
  /api/v1/agent/invoke:
    post:
      summary: Invoke
      description: '执行一次 Agent 工具调用(需要 skill_key 鉴权,调用成功即扣费)。


        参数:

        body: tool(工具名)、params(工具参数)、session_id(可选,仅用于日志串联)。

        background_tasks: 用于在响应返回后异步写调用日志,不阻塞用户。


        返回:

        AgentInvokeResponse(code=200, tool, data, credits_used)。


        异常(均为 ApiException,由全局处理器转成统一错误体):

        404 40420 功能未开启;404 40421 工具不存在;400 40021 必填参数缺失;

        403 40321 被风控拦截;429/503 限流相关(见 _check_limits);

        402 40201 余额不足;502 50201 上游异常(且已退款)。'
      operationId: invoke_api_v1_agent_invoke_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentInvokeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentInvokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Agent
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentInvokeResponse:
      properties:
        code:
          type: integer
          title: Code
          default: 0
        tool:
          type: string
          title: Tool
        data:
          title: Data
        credits_used:
          type: number
          title: Credits Used
      type: object
      required:
      - tool
      - credits_used
      title: AgentInvokeResponse
      description: Agent 接口出参。credits_used 便于前端即时展示本次消耗。
    AgentInvokeRequest:
      properties:
        tool:
          type: string
          title: Tool
        params:
          additionalProperties: true
          type: object
          title: Params
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
      type: object
      required:
      - tool
      title: AgentInvokeRequest
      description: 'Agent 接口调用入参。


        params 用 default_factory 而非直接 ``= {}``:可变默认值会在

        多次请求间共享同一对象,是典型的串数据隐患。

        session_id 为空时由服务端开启新会话。'