twtapi-com Myapi API

The Myapi API from twtapi-com — 12 operation(s) for myapi.

Operations 12

GET /myapi/getApiKey Get Api Key #
GET /myapi/getMcpKey Get Mcp Key #
GET /myapi/getSkillKey Get Skill Key #
POST /myapi/resetApiKey Reset Api Key #
POST /myapi/resetMcpKey Reset Mcp Key #
POST /myapi/resetSkillKey Reset Skill Key #
GET /myapi/dashboard Dashboard #
GET /myapi/status Api Status #
GET /myapi/orders My Orders #
GET /myapi/requests My Requests #
GET /myapi/usage My Usage #
GET /myapi/plans Public Plans #

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-myapi-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-myapi-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TwtAPI Backend Myapi API
  description: API proxy & billing platform for Twitter/RapidAPI
  version: 0.1.0
tags:
- name: Myapi
paths:
  /myapi/getApiKey:
    get:
      summary: Get Api Key
      description: '返回当前用户的 api_key(通用 HTTP 网关凭据)。


        用户不存在时返回 404 + sub_code=40402(例如 session 里的用户已被删除)。'
      operationId: get_api_key_myapi_getApiKey_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/getMcpKey:
    get:
      summary: Get Mcp Key
      description: 返回当前用户的 mcp_key(MCP 协议接入凭据)。
      operationId: get_mcp_key_myapi_getMcpKey_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/getSkillKey:
    get:
      summary: Get Skill Key
      description: 返回当前用户的 skill_key(Agent / Skill 工具调用凭据)。
      operationId: get_skill_key_myapi_getSkillKey_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/resetApiKey:
    post:
      summary: Reset Api Key
      description: '重新生成 api_key。


        ValueError(用户不存在)会被吞掉并转成 404;不向外暴露 service 层的异常类型,

        也避免 500。'
      operationId: reset_api_key_myapi_resetApiKey_post
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/resetMcpKey:
    post:
      summary: Reset Mcp Key
      description: 重新生成 mcp_key。
      operationId: reset_mcp_key_myapi_resetMcpKey_post
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/resetSkillKey:
    post:
      summary: Reset Skill Key
      description: 重新生成 skill_key。
      operationId: reset_skill_key_myapi_resetSkillKey_post
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/dashboard:
    get:
      summary: Dashboard
      description: 'Return all data needed by the user dashboard in a single call.


        中文:一次返回 dashboard 所需的全部数据(前端首屏只发一个请求)。


        为什么要先单独查一次 user:缓存命中时 _build_dashboard_data 不会执行,

        那样被删除的用户会继续被返回缓存数据。所以「用户存在性」这一步必须

        在缓存之前做,属于刻意为之的额外查询。'
      operationId: dashboard_myapi_dashboard_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/status:
    get:
      summary: Api Status
      description: 'Return account status, credit balance, and current quota usage for an API key.


        中文:给「持 API key 的调用方」自查账户状态用(即文档里的 status 接口),

        因此鉴权走 get_api_key_user,与后台的 Cookie 会话互不依赖。


        返回:

        service/account_status/credits/套餐与限速/当前用量/月配额等;其中

        monthly_remaining 与 quota_period_start 便于调用方自己做额度告警。


        注意:

        本接口读到的 credits 与 /dashboard 的来源可能不同(见下方注释),

        这是「热路径账本」与「展示型缓存」两套数据源造成的差异。'
      operationId: api_status_myapi_status_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/orders:
    get:
      summary: My Orders
      description: 'Return paginated order history for the current user.


        中文:当前用户的订单分页列表(/orders)。


        参数:

        page/size: 页码(从 1 开始)与每页条数,size 上限 100,防止一次拉全表。

        lang: 文案语言,用于把失败原因翻译成对应语种。


        返回:

        total/page/size/items。每项除订单原始字段外,还额外带两个字段:

        status_reason_code(机器可读)与 status_reason(已本地化文案)。


        副作用:

        只读数据库;另有一次 count 查询用于分页总数。'
      operationId: my_orders_myapi_orders_get
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Size
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/requests:
    get:
      summary: My Requests
      description: 'Return the current user''s request log with sanitized parameters.


        中文:当前用户的调用日志分页列表(/requests),参数已脱敏。


        参数:

        page/size: 分页。

        endpoint: 可选,按接口标识精确过滤(会先 strip,空串视为不过滤)。

        status: 状态筛选,all / success / error,由 Query 的 pattern 约束取值。


        返回:

        total/page/size/items;每项的 params 是 _sanitize_request_params 清洗后的结构。


        注意:

        本接口没有 lang 参数(与 /orders 不同),且不返回本地化文案,只回原始字段,

        因此不涉及语言判定。


        副作用:

        只读数据库。'
      operationId: my_requests_myapi_requests_get
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Size
      - name: endpoint
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            maxLength: 120
          - type: 'null'
          title: Endpoint
      - name: status
        in: query
        required: false
        schema:
          type: string
          pattern: ^(all|success|error)$
          default: all
          title: Status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/usage:
    get:
      summary: My Usage
      description: 'Return usage trends without mixing credits, calls, and rate limits.


        中文:按时间窗口返回用量趋势(/usage),供前端的图表页使用。


        参数:

        period: 统计窗口,24h / 7d / 30d / current(当前配额周期),

        由 Query 的 pattern 约束;未知值不会走到这里。


        返回:

        period/period_start/period_end、总量与成功率、消耗额度、平均耗时、

        按天与按接口的两组明细,以及 limits 子对象(余额、配额、限速、有效期)。


        为什么要把 credits / calls / rate limits 分开放在不同区块:三者的语义和

        量纲完全不同(额度是货币化的,调用次数是计数,限速是速率),混在一个

        指标里会让前端无法正确表达,也容易让用户误以为「调用次数 = 余额」。


        副作用:

        只读数据库;共 3 条聚合查询(汇总、按天、按接口)。'
      operationId: my_usage_myapi_usage_get
      parameters:
      - name: period
        in: query
        required: false
        schema:
          type: string
          pattern: ^(24h|7d|30d|current)$
          default: 7d
          title: Period
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
  /myapi/plans:
    get:
      summary: Public Plans
      description: 'Return active API plans for public display (no auth required).


        中文:公开套餐列表接口,营销页使用,无需登录(因此不能返回任何用户数据)。


        返回:

        按语言缓存的套餐列表;TTL 30 分钟。


        缓存注意:

        key 一定带语言后缀(``public:plans:api:{lang}``),因为套餐名与按钮文案

        已本地化,不同语言必须是不同的缓存条目。后台改套餐时由

        admin.invalidate_plan_cache 主动清除(但它只清了部分语种,

        其余语种最长要等 TTL 到期)。'
      operationId: public_plans_myapi_plans_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Myapi
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