Valuein Mpp API
The Mpp API from Valuein, for mpp.
The Mpp API from Valuein, for mpp.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/valuein-biz:valuein-biz-mpp-api"
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.
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: 3.2.0
info:
title: Valuein Agent Pay Mpp API
version: 1.0.0
description: 'Pay-per-call access to point-in-time, auditable SEC EDGAR fundamentals for AI agents, over the Machine Payments Protocol (MPP, Stripe). No account is needed: ask, get a 402 challenge, pay it and retry the same URL.'
servers:
- url: https://api.valuein.biz
tags:
- name: MPP
paths:
/api/mpp/call:
post:
operationId: mppCall
summary: Call one paid data tool (pay-and-retry MPP resource)
description: 'Run one Valuein data tool. An unpaid request is answered 402 with a `WWW-Authenticate: Payment` challenge naming the exact amount; pay it with a Stripe Shared Payment Token and retry this SAME URL with `Authorization: Payment ` to receive the tool result inline. The funds are held first and captured only after the paid data has been delivered; if the data cannot be delivered the hold is released and nothing is charged. Once the capture has succeeded the same response carries the data and the receipt headers. A lost response can be looked up at GET /api/mpp/receipt. A subscriber may send their Bearer token in `X-Valuein-Authorization`, on both the unpaid request and the paid retry.'
x-payment-info:
offers:
- amount: null
currency: usd
description: 'Price is dynamic: the company passes still missing (one per company, one level, 24 hours) plus a per-run fee for compute, verification and market scans. The exact amount is stated in the 402 challenge (request.amount, in cents) before anything is authorized. GET /api/mpp/tools has the price book; the smallest possible charge is $1.00.'
intent: charge
method: stripe
parameters:
- name: X-Valuein-Authorization
in: header
required: false
description: 'Optional `Bearer <token>` for a subscriber rate. Send it on BOTH the unpaid request and the paid retry: the challenge is bound to the caller.'
schema:
type: string
requestBody:
required: true
content:
application/json:
example:
tool: get_company_fundamentals
arguments:
ticker: AAPL
schema:
type: object
required:
- tool
properties:
tool:
type: string
description: Tool name. GET /api/mpp/tools lists the payable tools.
arguments:
type: object
description: Tool arguments, as in an MCP tools/call. `cik`, `ciks`, `ticker` or `tickers` declare the companies being priced.
additionalProperties: true
level:
type: string
enum:
- pro
- full
description: Data level to buy a pass for. Default `pro`; `full` adds full history and smart money. Raised to the tool minimum.
companies:
type: array
items:
type: string
description: CIKs (or tickers) to buy passes for, when only some of the call companies are outside your plan.
responses:
'200':
description: 'Paid and delivered: the tool result (an MCP tools/call result), served inline. Headers `X-Valuein-Amount-Charged-Usd` and `X-Valuein-Charge-Id` carry the receipt. How to read a tool result (errors, paging): the "Reading tool results: errors and paging" section of https://api.valuein.biz/llms.txt, which is `agent_contract.markdown` of https://mcp.valuein.biz/manifest.json verbatim.'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: 'Invalid request: unknown or free tool, too many companies declared, a payment credential whose challenge was issued to a different caller, or a payment instrument the payment processor rejected. Nothing is captured.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: The Bearer token in X-Valuein-Authorization is not valid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: 'Payment Required. With a `WWW-Authenticate: Payment` header this is the challenge, answering an unpaid request, a malformed payment credential, or a credential that failed verification (expired, another host, a signature that is not ours, or issued for a different request; the body carries `reason`): `id, realm, method="stripe", intent="charge", expires, opaque, request` (`request` is base64url JSON with the amount in cents as a string, the currency and methodDetails: networkId, paymentMethodTypes). A 402 WITHOUT that header means the payment itself failed (declined, insufficient funds, amount mismatch, challenge already used, or the account cannot pay per call): read `code` in the body and, where the challenge was used, request a new one.'
headers:
WWW-Authenticate:
description: 'The MPP payment challenge. Present on a challenge; NOT always present: absent when the 402 reports a failed payment.'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The Bearer token in X-Valuein-Authorization has been revoked.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'408':
description: The challenge has expired or is no longer valid. Request a new challenge and pay that one.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: 'Rate limited: too many unpaid challenge requests, or the payment processor rate limited a paid request. Retry after the Retry-After delay.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'451':
description: MPP is unavailable in the caller region.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'502':
description: 'The payment processor was unavailable, the payment could not be completed, or the paid data could not be delivered. When the data could not be delivered or the capture failed, the body states you were not charged: funds are captured only after delivery. Code `PAYMENT_STATE_UNKNOWN` means the payment could not be confirmed either way and nothing was served: do not pay again before GET /api/mpp/receipt says what happened.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: MPP is disabled or not configured on this deployment, or the payment ledger or processor is temporarily unavailable. Retry after the Retry-After delay; the body says whether an authorization was cancelled.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- MPP
/api/mpp/well-known:
get:
operationId: mppWellKnown
summary: MPP capability discovery
description: Free. Whether MPP is enabled, the supported networks, the protocol version and the canonical endpoints.
responses:
'200':
description: Capability document.
content:
application/json:
schema:
type: object
additionalProperties: true
tags:
- MPP
/api/mpp/quote:
get:
operationId: mppQuote
summary: Price preview for a tool and scope
description: Free. The price and nonce for a tool over a set of companies, so an agent can budget before it asks for the data. The authoritative amount is always the one in the 402 challenge of POST /api/mpp/call.
parameters:
- name: tool
in: query
required: true
description: Tool name.
schema:
type: string
- name: tickers
in: query
required: false
description: Comma-separated tickers the call would cover (resolved to CIKs).
schema:
type: string
- name: ciks
in: query
required: false
description: Comma-separated CIKs the call would cover.
schema:
type: string
- name: level
in: query
required: false
description: 'Data level to buy a pass for: `pro` (default) or `full`. `tier` is the legacy name.'
schema:
type: string
enum:
- pro
- full
- name: x-valuein-mpp-pass
in: header
required: false
description: Company passes you already hold (comma-separated); they are not charged again.
schema:
type: string
responses:
'200':
description: The quote.
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Missing `tool`, or an unknown tool.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: The Bearer token is not valid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The account is suspended or cannot use pay-per-call.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The Bearer token has been revoked.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'451':
description: MPP is unavailable in the caller region.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: MPP is disabled or not configured on this deployment.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- MPP
/api/mpp/tools:
get:
operationId: mppTools
summary: The payable-tool menu and price book
description: Free. The whole price book (company passes, per-run fees, the token discount, the free-verification rule) and every payable tool with its category, so an agent never has to probe 402s to learn what it can buy.
responses:
'200':
description: The menu.
content:
application/json:
schema:
type: object
additionalProperties: true
tags:
- MPP
/api/mpp/receipt:
get:
operationId: mppReceipt
summary: Did I pay?
description: 'Free. The outcome of a completed call, looked up by the challenge id (nonce): `charged` with the charge id, `not_charged` with the reason, `refunded` (you were charged and the money was given back because the data was never delivered), or `unconfirmed` (the payment could not be confirmed and nothing was served; it is settled within about 15 minutes, by release or refund). 404 means no record of this nonce YET, not that you were not charged: a receipt can take up to a minute to become visible, so if you paid recently retry the lookup before paying again.'
parameters:
- name: nonce
in: query
required: true
description: The `id` of the payment challenge.
schema:
type: string
responses:
'200':
description: The receipt.
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Missing `nonce`.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No record of this nonce yet. If you paid within the last minute, retry the lookup before paying again; a receipt can take up to a minute to become visible.
content:
application/json:
schema:
type: object
additionalProperties: true
tags:
- MPP
components:
schemas:
Error:
type: object
required:
- error
- code
properties:
error:
type: string
description: Human-readable message.
code:
type: string
description: Stable machine-readable error code.
request_id:
type: string
description: Per-request id, echoed in X-Request-ID.
x-service-info:
categories:
- data
- finance
docs:
homepage: https://valuein.biz
apiReference: https://github.com/valuein/valuein/blob/main/AGENTS.md
llms: https://api.valuein.biz/llms.txt