Space Frontiers Payments API

The Payments API from Space Frontiers — 1 operation(s) for payments.

Operations 1

POST /v2/payments/mpp/top-up Fund the authenticated account balance using Stripe MPP #

Documentation

Specifications

Other Resources

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/machinelibrary-ai:machinelibrary-ai-payments-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

machinelibrary-ai-payments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Machine Library Payments API
  version: 0.1.0
  contact:
    email: contact@machinelibrary.ai
    name: Machine Library
    url: https://machinelibrary.ai/contacts
  description: 'Search, retrieve, and synthesize scholarly and public-interest documents through Machine Library, the search and AI product by Space Frontiers Company. Document recognition endpoints (`/v1/recognitions`: PDF, EPUB, and DJVU to structured Markdown) share this host and are described at `/v1/recognitions/docs/openapi.json`; the site reference at https://machinelibrary.ai/docs/api/reference presents both specs merged.'
  license:
    identifier: MIT
    name: MIT (API description only; retrieved content retains its own rights)
  termsOfService: https://machinelibrary.ai/terms-of-service
servers:
- description: Machine Library
  url: https://api.machinelibrary.ai
- description: Space Frontiers (compatible endpoint)
  url: https://api.spacefrontiers.org
tags:
- name: Payments
paths:
  /v2/payments/mpp/top-up:
    post:
      tags:
      - Payments
      operationId: createMppBalanceTopUp
      summary: Fund the authenticated account balance using Stripe MPP
      description: The first authenticated request returns a Stripe MPP challenge. Retry the same request with the resulting Payment credential to settle and credit the existing USD balance.
      security:
      - bearer_auth: []
      - api_key: []
      - oauth2:
        - search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - package
              properties:
                package:
                  type: string
                  enum:
                  - usd-5
                  - usd-10
                  - usd-25
                  - usd-50
                  - usd-100
                  - usd-250
                  - usd-500
                  - usd-1000
      x-payment-info:
        intent: charge
        method: stripe
        amount: '500'
        currency: usd
        description: Prepaid-credit packages from $5 to $1000; select one in the request body.
        offers:
        - intent: charge
          method: stripe
          amount: '500'
          currency: usd
          description: Prepaid-credit package usd-5; select it in the request body.
        - intent: charge
          method: stripe
          amount: '1000'
          currency: usd
          description: Prepaid-credit package usd-10; select it in the request body.
        - intent: charge
          method: stripe
          amount: '2500'
          currency: usd
          description: Prepaid-credit package usd-25; select it in the request body.
        - intent: charge
          method: stripe
          amount: '5000'
          currency: usd
          description: Prepaid-credit package usd-50; select it in the request body.
        - intent: charge
          method: stripe
          amount: '10000'
          currency: usd
          description: Prepaid-credit package usd-100; select it in the request body.
        - intent: charge
          method: stripe
          amount: '25000'
          currency: usd
          description: Prepaid-credit package usd-250; select it in the request body.
        - intent: charge
          method: stripe
          amount: '50000'
          currency: usd
          description: Prepaid-credit package usd-500; select it in the request body.
        - intent: charge
          method: stripe
          amount: '100000'
          currency: usd
          description: Prepaid-credit package usd-1000; select it in the request body.
      responses:
        '200':
          description: Payment settled and balance credited.
        '400':
          description: Malformed package or Payment credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid account credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: MPP payment challenge or verification failure.
          headers:
            WWW-Authenticate:
              schema:
                type: string
        '409':
          description: Payment is already being processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Agent payments are temporarily disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ApiError:
      properties:
        detail:
          oneOf:
          - type: string
          - additionalProperties: true
            properties:
              code:
                type: string
            type: object
        status:
          enum:
          - error
          type: string
      required:
      - status
      - detail
      type: object
  securitySchemes:
    api_key:
      description: Machine Library API key from https://machinelibrary.ai/keys.
      in: header
      name: X-Api-Key
      type: apiKey
    bearer_auth:
      bearerFormat: API key or OAuth 2.0 access token
      description: Send the same API key, or an OAuth 2.0 access token, as a Bearer token.
      scheme: bearer
      type: http
    oauth2:
      description: Authorization code with mandatory S256 PKCE. Public clients use dynamic registration; see https://machinelibrary.ai/auth.md. Access spends the consenting account's credits.
      flows:
        authorizationCode:
          authorizationUrl: https://api.machinelibrary.ai/v2/oauth/authorize
          refreshUrl: https://api.machinelibrary.ai/v2/oauth/token
          scopes:
            search: Search and retrieve research documents using your account credits.
          tokenUrl: https://api.machinelibrary.ai/v2/oauth/token
      type: oauth2
externalDocs:
  description: Authentication, limits, errors, retries, and API lifecycle
  url: https://machinelibrary.ai/docs/api/operations
x-service-info:
  categories:
  - data
  - search
  docs:
    apiReference: https://machinelibrary.ai/docs/api/reference
    homepage: https://machinelibrary.ai
    llms: https://machinelibrary.ai/llms.txt
x-provenance:
  method: harvested
  publisher: Space Frontiers
  source: https://machinelibrary.ai/docs/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)