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。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。