USDF Agent files API
Files for agents and wallets: llms.txt, the skill, this document, the MCP server, the token's logo and list, and the security contact.
Files for agents and wallets: llms.txt, the skill, this document, the MCP server, the token's logo and list, and the security contact.
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/usdf-fi:usdf-fi-agent-files-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: Foundry Agent files API
version: v1
description: 'One API for every listed model, priced and settled in USDF: 1 USDF = $1 of compute, redeemable 1:1 for USDG. Pay with an API key (Authorization: Bearer sk_..., or x-api-key on the Messages API), or per request with no account under /x402 (x402, or MPP). The account''s keys, withdrawals, settings and wallet take a signed-in session. With a key, a request places a hold for its most possible cost and is charged the provider''s reported usage at the published price (GET /v1/pricing); over x402 it pays that most possible cost, its quote, up front, is charged its usage at the same price and gets the rest back. Every answer carries its receipt, and every request is a leaf in the public usage log (GET /v1/log/proof/{request_id}). Amounts are USDF base units as decimal strings (1 unit = 0.000001 USDF). Errors are {error: {message, type, code}}, except on the Messages API, which answers in its own envelope. Rate limits: GET /v1/limits.'
servers:
- url: https://api.usdf.fi
tags:
- name: Agent files
description: 'Files for agents and wallets: llms.txt, the skill, this document, the MCP server, the token''s logo and list, and the security contact.'
paths:
/mcp:
post:
operationId: mcp
tags:
- Agent files
summary: MCP server
description: 'The MCP server over streamable HTTP, stateless: POST one JSON-RPC message per request. Tools: list_models, quote, list_tools, quote_tool, chat, balance, receipt, x402_pay, agents_market_search, agents_market_call. With no key, chat is paid with x402 (MPP credentials are read from params._meta), receipt answers the public receipt and balance a wallet''s USDF and USDG given its address.'
security:
- apiKey: []
- {}
requestBody:
required: true
description: A JSON-RPC 2.0 message.
content:
application/json:
schema:
type: object
responses:
'200':
description: The JSON-RPC answer, as JSON or as one server-sent event.
content:
application/json:
schema:
type: object
text/event-stream:
schema:
type: string
default:
$ref: '#/components/responses/Error'
/llms.txt:
get:
operationId: getLlmsTxt
tags:
- Agent files
summary: llms.txt
description: What USDF is, how to pay, and where every machine-readable surface is, as plain text.
security: []
responses:
'200':
description: The file.
content:
text/plain:
schema:
type: string
default:
$ref: '#/components/responses/Error'
/skill.md:
get:
operationId: getSkill
tags:
- Agent files
summary: Agent skill
description: Step by step from buying USDF to paying with x402, as an agent skill file.
security: []
responses:
'200':
description: The skill.
content:
text/markdown:
schema:
type: string
default:
$ref: '#/components/responses/Error'
/openapi.json:
get:
operationId: getOpenapi
tags:
- Agent files
summary: This document
description: The OpenAPI 3.1 document of every route this gateway serves to the public, to keys, to sessions and to x402 payers. Cached for five minutes; send its etag in If-None-Match to get 304 when it has not changed.
security: []
parameters:
- name: if-none-match
in: header
required: false
description: An etag from an earlier read.
schema:
type: string
responses:
'200':
description: The document.
headers:
etag:
$ref: '#/components/headers/etag'
content:
application/json:
schema:
type: object
'304':
description: Not changed since the etag sent.
default:
$ref: '#/components/responses/Error'
/:
get:
operationId: getService
tags:
- Agent files
summary: Service
description: Names the service and where its health, prices and MCP server are.
security: []
responses:
'200':
description: The service.
content:
application/json:
schema:
type: object
properties:
service:
type: string
docs:
type: string
health:
type: string
mcp:
type: string
required:
- service
default:
$ref: '#/components/responses/Error'
/usdf.png:
get:
operationId: getLogo
tags:
- Agent files
summary: USDF logo
description: 512 px, transparent outside the coin.
security: []
responses:
'200':
description: The logo.
content:
image/png:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/Error'
head:
operationId: headLogo
tags:
- Agent files
summary: USDF logo (headers)
security: []
responses:
'200':
description: The logo.
content:
image/png:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/Error'
/usdf-{size}.png:
get:
operationId: getLogoSized
tags:
- Agent files
summary: USDF logo at a size
security: []
parameters:
- name: size
in: path
required: true
description: The width in pixels.
schema:
type: string
enum:
- '32'
- '64'
- '128'
- '256'
- '512'
- '1024'
example: '64'
responses:
'200':
description: The logo.
content:
image/png:
schema:
type: string
format: binary
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
head:
operationId: headLogoSized
tags:
- Agent files
summary: USDF logo at a size (headers)
security: []
parameters:
- name: size
in: path
required: true
description: The width in pixels.
schema:
type: string
enum:
- '32'
- '64'
- '128'
- '256'
- '512'
- '1024'
example: '64'
responses:
'200':
description: The logo.
content:
image/png:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/Error'
/tokenlist.json:
get:
operationId: getTokenList
tags:
- Agent files
summary: Token list
security: []
responses:
'200':
description: 'The token list (the token-lists schema): USDF on each chain, with its logo.'
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/Error'
head:
operationId: headTokenList
tags:
- Agent files
summary: Token list (headers)
security: []
responses:
'200':
description: 'The token list (the token-lists schema): USDF on each chain, with its logo.'
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/Error'
/v1/config:
get:
operationId: getConfig
tags:
- Agent files
summary: Chain settings for pages
description: 'The chain id and the read endpoint a page on the site uses for its chain reads: this API''s own POST /v1/rpc where this deployment serves it (null when there is none: the page reads the chain''s public endpoints). The endpoint answers requests from the site''s own pages only. turnstile.site_key is the public key of the bot check a page shows before sign-up, a card top-up or a support report (null while there is none: no check is shown). x402.pay_to is the address pay-per-request payments settle to, the payee every 402 names (null when the gateway has none); a payer that reaches the gateway through another address checks the 402''s payee against it.'
security: []
responses:
'200':
description: The settings.
content:
application/json:
schema:
type: object
properties:
object:
type: string
enum:
- config
chain_id:
type: integer
rpc:
type: object
properties:
url:
type:
- string
- 'null'
required:
- url
turnstile:
type: object
properties:
site_key:
type:
- string
- 'null'
required:
- site_key
x402:
type: object
properties:
pay_to:
type:
- string
- 'null'
pattern: ^0x[0-9a-fA-F]{40}$
required:
- pay_to
minimums:
type: object
properties:
withdrawal_usdf:
type: string
description: The smallest withdrawal, in USDF ("0.10").
redemption_usdf:
type: string
description: The smallest redemption, in USDF.
required:
- withdrawal_usdf
- redemption_usdf
required:
- object
- chain_id
- rpc
- turnstile
- x402
- minimums
'429':
$ref: '#/components/responses/RateLimited'
default:
$ref: '#/components/responses/Error'
/v1/rpc:
post:
operationId: chainRead
tags:
- Agent files
summary: Chain reads for pages
description: 'The read endpoint pages on the site use for the chain, when GET /v1/config names it: one JSON-RPC 2.0 call or a batch of up to 20, chain reads only (eth_chainId, eth_blockNumber, eth_call, eth_getBalance, eth_getCode, eth_getTransactionReceipt, eth_getTransactionByHash, eth_getBlockByNumber, eth_estimateGas, eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory, eth_getTransactionCount, eth_getLogs; 403 rpc_method_not_allowed for any other, sends included). eth_getLogs takes 1 to 10 addresses and either one block by its hash or at most 5,000 blocks given by number (400 rpc_logs_bounds otherwise). A page of another site is refused (403 rpc_origin_not_allowed) before anything is read. An eth_call or eth_estimateGas runs with at most 3,000,000 gas: one that names more is refused (400 rpc_gas_cap), one that names none is given the cap. The answer is the chain''s: each call''s result, or the node''s own error code and message in its place. 404 while this deployment does not serve it.'
security: []
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- type: object
properties:
jsonrpc:
type: string
enum:
- '2.0'
id: {}
method:
type: string
params:
type: array
required:
- jsonrpc
- method
- type: array
minItems: 1
maxItems: 20
items:
type: object
properties:
jsonrpc:
type: string
enum:
- '2.0'
id: {}
method:
type: string
params:
type: array
required:
- jsonrpc
- method
responses:
'200':
description: 'The chain''s JSON-RPC answer: one result, or one per call of a batch.'
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/BadRequest'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/BadGateway'
'503':
$ref: '#/components/responses/Unavailable'
default:
$ref: '#/components/responses/Error'
/.well-known/security.txt:
get:
operationId: getSecurityTxt
tags:
- Agent files
summary: Security contact
description: 'Where to report a security problem (RFC 9116): the contact (protocol@usdf.fi unless the operator sets others), the disclosure policy, when the file stops being current, and its own address. 404 when the operator sets no contact.'
security: []
responses:
'200':
description: The file.
content:
text/plain:
schema:
type: string
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
/.well-known/x402:
get:
operationId: getX402WellKnown
tags:
- Agent files
summary: x402 discovery
description: 'The paid resources of this origin in the well-known shape the x402 indexes read: version 1, resources (the absolute URL of every x402 endpoint that serves a model now; each answers an unpaid POST with 402 and its quote), info (name, description, url) and instructions. Generated from the live catalog. 404 where x402 is not enabled. Without an API key or a signed-in session, the answer leaves out prices, route labels, limits and quotas.'
security: []
responses:
'200':
description: The discovery file.
content:
application/json:
schema:
type: object
properties:
version:
type: integer
resources:
type: array
items:
type: string
info:
type: object
instructions:
type: string
required:
- version
- resources
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
/x402/info:
get:
operationId: getX402Info
tags:
- Agent files
summary: x402 terms and endpoints
description: 'How to pay with x402 here and for what: the scheme (exact), the payee, the assets each network takes (USDF by signature transfer, the chain''s dollar by a signed transfer authorization), the metered price basis, every paid endpoint with the models it serves now and its cheapest price from the live catalog, and items: the endpoints whose example request is quoted here, in the x402 Bazaar''s discovery shape (resource, type, x402Version, accepts, extensions.bazaar.info, lastUpdated), each item''s accepts exactly what an unpaid POST of its example body answers now. 404 where x402 is not enabled. Without an API key or a signed-in session, the answer leaves out prices, route labels, limits and quotas.'
security: []
responses:
'200':
description: The terms and endpoints.
content:
application/json:
schema:
type: object
properties:
object:
type: string
x402Version:
type: integer
name:
type: string
scheme:
type: string
price_sheet:
type: string
pricing:
type: object
payTo:
anyOf:
- type: string
- type: 'null'
permit2:
type: string
assets:
type: array
items:
type: object
endpoints:
type: array
items:
type: object
items:
type: array
items:
type: object
lastUpdated:
type: string
required:
- object
- x402Version
- endpoints
- items
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
components:
headers:
x-ratelimit-reset:
description: 'On a 429: when a request is let through again, in milliseconds since the epoch.'
schema:
type: string
x-request-id:
description: The request's id (its receipt's request_id). Every error answer, 4xx and 5xx, carries one too.
schema:
type: string
x-ratelimit-remaining:
description: 'On a 429: what is left of it (0).'
schema:
type: string
retry-after:
description: Seconds to wait before retrying.
schema:
type: string
etag:
description: The document's version; send it back in If-None-Match.
schema:
type: string
x-ratelimit-limit:
description: 'On a 429: the refusing limit, in requests per its window (0 where the refusal is not a count of requests).'
schema:
type: string
schemas:
Error:
type: object
description: The error envelope of every endpoint but the Messages API. Some errors carry more fields beside `error` (a 402 from an x402 path carries the quote).
properties:
error:
type: object
properties:
message:
type: string
description: What went wrong, in words.
type:
type: string
description: 'The class of the error: invalid_request_error, authentication_error, insufficient_quota, permission_error, rate_limit_error, payment_required, upstream_error, service_unavailable, server_error.'
code:
anyOf:
- type: string
- type: integer
- type: 'null'
description: 'A stable code for the error, or null. In the router API''s envelope (where it is on: an API key on the router API''s paths, outside the site): the HTTP status as an integer, the stable code then in metadata.error_code.'
param:
anyOf:
- type: string
description: The request field at fault, where the error names one.
- type: 'null'
metadata:
type: object
description: Present on a 429, on a budget's refusal and on every error in the router API's envelope.
properties:
error_type:
type: string
description: rate_limit_exceeded on every 429; in the router API's envelope, its category of every error (invalid_request, authentication, payment_required, permission_denied, not_found, rate_limit_exceeded, provider_unavailable, timeout, server and the others it lists).
error_code:
anyOf:
- type: string
description: 'In the router API''s envelope: the stable code (what code is in the other envelope).'
- type: 'null'
scope:
type: string
description: 'In the router API''s envelope, on a budget''s refusal: key_limit.'
provider_code:
type: string
description: 'In the router API''s envelope, on a stream''s failure: the provider''s own status, where it gave one.'
limit_source:
type: string
description: 'On a budget''s refusal (402): key_limit for the key''s budgets, key_spend_limit for its trailing caps.'
reset_interval:
anyOf:
- type: string
description: 'The interval a budget starts again on, at 00:00 UTC: a day, a week from Monday or a month; null for a lifetime budget or a trailing cap.'
- type: 'null'
resets_at:
type: string
description: When the budget starts again (ISO 8601).
window:
type: string
description: 'A trailing cap''s span: 1h, 24h or 30d.'
required:
- message
- type
required:
- error
responses:
BadGateway:
description: The upstream provider failed and no other route could serve the request; nothing was charged.
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: No such object for these credentials, or a model that is not listed.
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: Over a rate limit; retry after the number of seconds in retry-after (GET /v1/limits lists every limit).
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
retry-after:
$ref: '#/components/headers/retry-after'
x-ratelimit-limit:
$ref: '#/components/headers/x-ratelimit-limit'
x-ratelimit-remaining:
$ref: '#/components/headers/x-ratelimit-remaining'
x-ratelimit-reset:
$ref: '#/components/headers/x-ratelimit-reset'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: The request is malformed or asks for something this endpoint refuses; nothing was charged.
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error:
description: An error.
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: 'The credentials are valid but may not do this (a key where a session is required, a key''s model list, a key used from an address off its IP allowlist: ip_not_allowed, another account''s object). A money or credential action with a session whose sign-in is older than its window is reauth_required (max_age_seconds: 300 for money leaving the account, 900 for keys, the wallet and the like): confirm it''s you (GET /v1/session/confirm) or sign in again, and send it once more. recent_link_hold: a sign-in method was added in the last 24 hours, so money and keys leave the account only from lifts_at, or now once this session confirms with a method it had before. API keys are never asked.'
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unavailable:
description: 'The feature or a dependency is unavailable on this gateway right now, or none of a model''s zero-retention routes can take the request now while it has one (zero_retention_unavailable: a request for such a model is served on those alone); retry after retry-after where it is sent.'
headers:
x-request-id:
$ref: '#/components/headers/x-request-id'
retry-after:
$ref: '#/components/headers/retry-after'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
apiKey:
type: http
scheme: bearer
bearerFormat: sk_...
description: 'An API key, as Authorization: Bearer sk_.... A key spends from the balance of the account it was made under (or its own budget), within its limits. Create keys with POST /v1/account/keys under a signed-in session.'
messagesApiKey:
type: apiKey
in: header
name: x-api-key
description: 'The same API key in the x-api-key header, as the Messages API''s clients send it. Authorization: Bearer sk_... is accepted on the Messages API as well.'
session:
type: http
scheme: bearer
bearerFormat: JWT
description: 'A signed-in session: the access token from signing in at usdf.fi, as Authorization: Bearer <token>. GET /v1/auth names the issuer, the app id and the key set it is checked against; POST /v1/session links a sign-in to its account. The account''s keys, withdrawals, settings and wallet, and sending, claiming or cancelling a link, take a session, not an API key.'
x402:
type: apiKey
in: header
name: payment-signature
description: 'Pay per request with x402, no account. A request without payment is answered 402 with the payment requirements (the payment-required header, and in the body as `x402`) and the quote: the most the request can cost. Pay in USDF (a signature transfer, after a one-time approval of USDF to the signature-transfer contract) or USDG (a signed transferWithAuthorization), and send the same request again with the signed payment in payment-signature. The payment is the quote. A model request whose bound is below the minimum charge (the gas of returning a payment at the chain''s gas price now, with a margin, rounded up) is quoted that minimum instead (the quote''s minimum_charge, with floored true) and charged it whole. The paid answer carries payment-response; a request quoted above the minimum is charged what it used at that price, never more than the payment, the rest refunded in the asset paid (the receipt''s paid and refund) unless it is smaller than the gas of returning it, which is kept. A request that fails once paid is refunded in full, in the asset paid. Apart from the minimum charge, a request is charged at most its list price, never below cost. Every model is priced at or below its list price.'
mpp:
type: http
scheme: Payment
description: 'The same payment as an MPP credential: where MPP is on (GET /v1/reserve lists it per chain), a 402 from an x402 path also carries Payment challenges in WWW-Authenticate (method evm, intent charge, in USDG by a signed transfer authorization or USDF by signature transfer); the retry carries Authorization: Payment <credential>. A paid answer carries Payment-Receipt.'
nodeCredential:
type: http
scheme: bearer
bearerFormat: nk_...
description: 'A node credential, as Authorization: Bearer nk_...: what a machine receives once its owner approves it (POST /v1/network/device, then POST /v1/network/device/token). It registers and runs that one node, with the payout address and terms its owner approved, and reads that node''s own figures and earnings; it claims nothing, spends nothing and is taken nowhere else. Removing the node revokes it.'
videoReadToken:
type: http
scheme: bearer
bearerFormat: vtk_...
description: 'The read token of a video job paid with x402, from its 202 answer, as Authorization: Bearer vtk_.... It is shown only once, and the job cannot be read without it.'