APIPASS API Marketplace Credits Internal API

The Credits Internal API from APIPASS API Marketplace — 2 operation(s) for credits internal.

Operations 2

POST /api/v1/internal/add-credits Add Credits #
POST /api/v1/internal/gift-credits Gift Credits #

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/apipass:apipass-credits-internal-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

apipass-credits-internal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ApiPass Platform Credits Internal API
  version: 1.0.0
tags:
- name: Credits Internal
paths:
  /api/v1/internal/add-credits:
    post:
      tags:
      - Credits Internal
      summary: Add Credits
      description: '增加用户积分(内部接口)


        - 使用分布式锁保证并发安全

        - 通过 idempotency_key 防止重复处理(支付重试场景)

        - 写入 DB 的同时同步更新 Redis 缓存,避免缓存脏读'
      operationId: add_credits_api_v1_internal_add_credits_post
      parameters:
      - name: x-admin-token
        in: header
        required: true
        schema:
          type: string
          description: Admin Token
          title: X-Admin-Token
        description: Admin Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCreditsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/internal/gift-credits:
    post:
      tags:
      - Credits Internal
      summary: Gift Credits
      description: '赠送用户积分(内部接口)


        - 与 add-credits 逻辑相同,但 credits_log 中 Type 固定显示为 "Free Credits"

        - 自动生成幂等键,无需调用方传入'
      operationId: gift_credits_api_v1_internal_gift_credits_post
      parameters:
      - name: x-admin-token
        in: header
        required: true
        schema:
          type: string
          description: Admin Token
          title: X-Admin-Token
        description: Admin Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GiftCreditsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AddCreditsRequest:
      properties:
        user_id:
          type: string
          title: User Id
          description: 用户 ID
        amount:
          type: number
          exclusiveMinimum: 0.0
          title: Amount
          description: 增加的积分数量(必须为正数)
        idempotency_key:
          type: string
          title: Idempotency Key
          description: 幂等键,相同 key 只处理一次,建议使用支付订单号
        description:
          type: string
          title: Description
          description: 积分来源描述,仅用于日志
          default: ''
      type: object
      required:
      - user_id
      - amount
      - idempotency_key
      title: AddCreditsRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    GiftCreditsRequest:
      properties:
        user_id:
          type: string
          title: User Id
          description: 用户 ID
        amount:
          type: number
          exclusiveMinimum: 0.0
          title: Amount
          description: 赠送的积分数量(必须为正数)
        note:
          type: string
          title: Note
          description: 赠送备注,仅用于日志
          default: ''
      type: object
      required:
      - user_id
      - amount
      title: GiftCreditsRequest
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer