Foundry: prepaid AI compute in USDF

fi.usdf由 usdf.fi 发布官方发布者v1.0.0更新于 Oct 26, 2026

Prepaid AI compute in USDF: models, quotes and chat with a receipt; pay per call (x402) or by key

已验证Streamable HTTP可网页运行金融商业与电商AI 与机器学习

概览

AI 生成的概览

以 USDF 预付 AI 算力的网关:可列出模型与工具、获取报价、运行对话与付费调用,并查看余额和收据。

可以做什么
  • 列出可用模型的价格、上下文窗口与可用状态,以及可调用工具的价格和输入
  • 在运行前估算对话请求或工具调用的费用
  • 运行对话补全,并返回文本及包含 token、价格、成本与余额的收据
  • 搜索按次计费的智能体与 API 市场,并按 id 在价格上限内调用某个条目
  • 代为支付需要 x402 付款的网址,并从密钥账户扣费
  • 查询可用余额与预算,并获取历史请求的收据
适用场景
适合希望助手通过单一 USDF 预付余额调用托管语言模型或第三方付费 API,并且需要逐次报价与收据的场景。当成本透明和按次计费比流式输出或长时间响应更重要时使用。
运行要求
远程端点 api.usdf.fi,使用 streamable HTTP,无需本地安装包。基于密钥的对话、工具调用、市场调用和余额查询需要以 Authorization bearer 头传入 API 密钥。无密钥时对话按次通过 x402 支付,余额可用钱包地址查询。需要网络访问。
安装前请注意
每次对话、工具和市场调用都会从密钥所属账户扣除真实预付资金,x402 支付另加最高 5% 的费用。报价只是估算而非上限,完成后的请求按实际用量计费。Authorization 头携带可消费的 API 密钥,应视为机密。调用会写入账户余额与结算记录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Foundry: prepaid AI compute in USDF,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/fi.usdf%2Fgateway/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "foundry-prepaid-ai-compute-in-usdf": {
      "type": "http",
      "url": "https://api.usdf.fi/mcp"
    }
  }
}

工具

10

list_models

List models

Models the gateway serves with their prices (USD per 1M tokens, the same figure in USDF), context window, output limits and whether a route is available right now. No key needed.

无需输入参数。

quote

Quote a request

The hold the chat tool places before running a request, in USDF and USD (output capped at 4096 tokens). It is an estimate, not a ceiling: a completed request is billed the provider's reported usage, normally less. Pass prompt or messages. No key needed; a request for attested hardware (a :private model id or provider.private), and any request from a Private-tier key, is quoted on its attested routes, at the model's price.

输入参数model必填promptmessagesprovidermax_tokens

list_tools

List tools

Tools you can call through POST /v1/tools/{id}, paid from the same balance and key as chat, each with its price in USDF (what it costs plus 5% at most) and the input it takes, ordered by title. Every tool listed can be called now. q keeps the tools whose id, title or description has those words; a page holds up to 200, and page.next names the next one. No key needed.

输入参数qcursor

quote_tool

Quote a tool call

What a call to a tool would hold for this input before it runs (its most it can cost), in USDF and USD, with the tool's price. It checks the input as the call would, and runs and holds nothing. No key needed.

输入参数tool必填input

x402_pay

Pay an x402 URL

Calls a URL that asks for an x402 payment and pays it for you: the gateway pays the seller in USDC from its own float and charges this key in USDF cost plus 5% at most, no minimum (the seller's amount and a fee of at most 5% of it; never free credit), within the key's and its agent's limits. Needs an API key. Returns the seller's answer with the payment and its receipt; a payment is charged only once the chain shows it, and one that never settles costs nothing. quote: true answers what it would cost and pays nothing. Third-party tools to call this way are listed under marketplace in list_tools (GET /v1/tools?source=marketplace).

输入参数url必填bodyquotemethodheadersnetworkmax_price

agents_market_call

Call a listing

Calls a listing of the agents market by its id (svc_..., from agents_market_search), paid from this key's USDF balance (never free credit) within the key's and its agent's limits and at most max_price: what one call costs and nothing on top; a call its seller does not answer 2xx costs nothing, or no more than what its seller kept of it. Every listing is called the same way, and answers 503 market_calls_unarmed while calls to the market are not switched on. Needs an API key. Returns the seller's answer and the receipt. The input goes to the seller, whose own policy governs what it keeps.

输入参数id必填inputmax_price必填

chat

Chat completion

Runs a chat completion and returns the text with its receipt (tokens, price, cost, balance, settlement). With an API key it spends from that key's balance, holding the most the request can cost first. Not streamed. Output is capped at 4096 tokens. A call without a progress token answers within 55 s of arriving. With a progress token, progress is sent every 15 s and the call may run 10 minutes, so the client must reset its timeout on progress (resetTimeoutOnProgress: true in the TypeScript SDK) or wait that long. At its deadline, or when the client's connection closes, a call is cut: the text produced so far is returned with finish_reason "length" and billed on the provider's usage report where the provider gives one, otherwise on an estimate never above max_tokens; for a model whose reasoning is not streamed, at the held output budget. Cancellation messages are not supported: a call the client stops waiting for without disconnecting runs to completion or its deadline and is billed. With no key, the call is paid with x402 in USDF (signature transfer) or USDG (signed transfer), as POST /x402/v1/chat/completions: without a payment it returns isError with the payment requirements (x402Version, resource, accepts) as structuredContent; sign one accept and call again with the payment in _meta["x402/payment"], the payment argument or the PAYMENT-SIGNATURE header. The quote is the call's maximum cost at the published price (prompt at one token per byte, output at max_tokens, capped as above, no minimum), paid up front; the call is charged what it uses at that price and the rest is refunded in the asset paid, the gateway paying the gas. A paid call runs to its end or its deadline whether or not the client waits and returns the receipt and _meta["x402/payment-response"]; at the deadline the text so far is returned with finish_reason "length" and a note, charged what it used and the rest refunded. A call no provider accepted before its deadline, or whose provider failed or ende

输入参数model必填paymentmessages必填max_tokenstemperature

balance

Balance

With an API key: what the key can spend now, the account's balance and the amount held for requests running, and what is left of the key's budget, in USDF. With address instead, and no key: that wallet's USDF and USDG on the chain now, and how much USDF it lets the signature-transfer contract spend, which x402 payments come from.

输入参数address

receipt

Receipt

With the API key that made the request: its receipt, with the usage, the price sheet version, the cost and, once settled, the settlement, its transaction and the rows behind the onchain digest. With no key: the public receipt of any request id, x402 ones included, with its line in the usage log, the payment, the settlement and where its proof is (GET /x402/v1/receipts/{id}).

输入参数request_id必填

版本历史

1
  1. v1.0.0最新Oct 16, 2026

评分

已满足适用检查项的 83%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。