Get started
Build with USDF.
One OpenAI-compatible endpoint for every listed model. Pay per request in USDF with no account, or from a prepaid balance with an API key.
On this page
Get started
Make a first request, with or without an account.
Pay per request
Quote, sign one payment and send the request again.
API reference
Every endpoint with its parameters and samples.
Agents
Agents with their own balance, key and spending policy.
Platforms and providers
Sub-keys for platforms, and serving your own endpoint.
USDF is the dollar of the machine economy: the dollar agents pay with, and the dollar compute is priced in.
Every other way to buy compute turns money into credits: a fee to get in, locked to one platform, no way back out, earning nothing. USDF stays money. Every USDF is backed 1:1 by USDG in a stock contract with no admin keys, redeemable at any time, with no fee in and no fee out. Spend it on 100+ models, send it, borrow against it, or stake it as sUSDF and earn from the whole network.
| Reason | What it means |
|---|---|
| Zero fee in, zero fee out | Buying wraps USDG into USDF one to one and redeeming unwraps it. The contract takes no fee, and the gateway pays the gas on deposits and withdrawals. |
| Still your dollar | Withdraw it, send it to anyone by link or address, or borrow against it. |
| It earns | USDF Rewards pay holders 100% of the Paxos reserve rewards plus 50% of network revenue: compute, launch and provider fees, tools and lending. |
| Agents hold it | An agent pays per request in USDF with no account and no API key. |
| Backed 1:1, in public | A stock OpenZeppelin contract with no owner. The reserve is onchain and published at Transparency. |
Foundry issues USDF, the dollar of the machine economy: backed 1:1 by Paxos USDG in a stock contract, zero fees, redeemable any time, spent per request on 100+ models by people, apps and agents, and staked as sUSDF to earn from the whole network. No owner, no admin keys, and the reserve is public.
USDF is a dollar for compute on Robinhood Chain. 1 USDF = $1 of compute, redeemable 1:1 for USDG at any time.
The gateway at https://api.usdf.fi serves chat, embeddings, images, speech, transcription, rerank and video through one OpenAI-compatible API. Every request is metered in USDF and returns a receipt.
200+ agents run on USDF. They pay for their own compute per request, from a wallet or from a balance with spend limits.
There are two ways to pay. Pay per request needs no account and no key: ask for a quote, sign one payment, send the request again. A prepaid balance with API keys suits sustained volume.
Every surface, its address and what it takes:
| Surface | URL | Auth |
|---|---|---|
| Pay per request | https://api.usdf.fi/x402/v1/… | A signed payment per request |
| OpenAI-compatible API | https://api.usdf.fi/v1 | API key |
| MCP server | https://api.usdf.fi/mcp | API key, or a payment per call |
| Receipt of any request | https://api.usdf.fi/x402/v1/receipts/{id} | None |
| Agent skill | https://api.usdf.fi/skill.md | None |
| Machine-readable map | https://api.usdf.fi/llms.txt | None |
| Signed model catalog | https://api.usdf.fi/v1/catalog | None |
The chain and the token, read live from the gateway:
| Item | Value |
|---|---|
| Chain | Robinhood Chain – eip155:<chain-id> |
| RPC URL | |
| Explorer | |
| USDF contract | |
| USDG contract | |
| Decimals | 6 decimals, for both tokens |
| Base unit | 1 unit = $0.000001 |
Samples use <model>, the first available chat model.
You need a wallet on Robinhood Chain that holds USDF or USDG. No USDF yet? Buy it on the Buy page, or swap any token for it. Payments cost no gas: the gateway submits every transfer.
Paying in USDF needs a one-time approval to Permit2. That approval is the only transaction you send, and it needs a little ETH on Robinhood Chain for gas. Paying in USDG needs no approval and no gas.
1. Ask for a quote
Send the request with no credentials. The gateway answers 402 with the exact amount and the two payments it accepts. An unpaid quote costs nothing.
Request
curl -i https://api.usdf.fi/x402/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 64
}'Response, trimmed
402 Payment Required
payment-required: <base64 JSON: x402Version, resource, accepts>
www-authenticate: Payment id="…", method="evm", intent="charge", …
{
"error": { "message": "payment required", "type": "payment_required", "code": "x402" },
"quote": {
"model": "<model>",
"max_tokens": 64,
"price_version": "<price sheet>",
"amount": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"accepted": [
{ "symbol": "USDF", "method": "permit2" },
{ "symbol": "USDG", "method": "eip3009" }
]
},
"x402": { "x402Version": 2, "accepts": [ … ] }
}2. Pay and send
Sign one of the accepted payments and send the identical request with it. The TypeScript SDK does both steps for you, and pays in USDF when the wallet has approved Permit2, otherwise in USDG.
Paid request
curl https://api.usdf.fi/x402/v1/chat/completions \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <encoded payment>" \
-d '{
"model": "<model>",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 64
}'<encoded payment> is the signed payment, base64-encoded JSON. How to sign it.
3. Read the answer and its receipt
The answer is a normal chat completion with a receipt. The quote is what you pay. The metered cost is reported beside it.
Response, excerpt
{
"id": "<request_id>",
"choices": [ … ],
"receipt": {
"request_id": "<request_id>",
"paid": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"usage_cost": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"payment": { "tx": "<transaction hash>", "asset": "USDF", "method": "permit2" },
"settlement": { "scheme": "x402 exact", "network": "eip155:<chain-id>" }
}
}Use a prepaid balance and API keys for sustained volume. Requests are held, charged and receipted against the balance.
1. Sign in and create a key
Sign in, then create a key on the dashboard. A key starts with sk_ and is shown once. Store it as USDF_API_KEY.
2. Fund the balance
Send USDF from your linked wallet, add USDG without gas, or buy on the Buy page. Every way is in Fund the balance.
3. Set the base URL
Point any OpenAI-compatible client at:
https://api.usdf.fi/v1
4. Send a request
Chat completion
curl https://api.usdf.fi/v1/chat/completions \
-H "Authorization: Bearer $USDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 256
}'Response
{
"id": "<request_id>",
"object": "chat.completion",
"model": "<model>",
"choices": [ … ],
"usage": { "prompt_tokens": …, "completion_tokens": … },
"receipt": {
"request_id": "<request_id>",
"status": "ok",
"cost": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"balance": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"settlement": {
"status": "unsettled",
"lookup": "https://api.usdf.fi/v1/receipts/<request_id>"
}
}
}Authentication
Each credential goes in one header. Keys are stored only as a hash.
| Credential | Header | Used for |
|---|---|---|
| API key | Authorization: Bearer sk_… | /v1 and MCP |
| Session token | Authorization: Bearer <session token> | Account, keys and agents |
| x402 payment | PAYMENT-SIGNATURE: <encoded payment> | /x402 |
| MPP credential (Machine Payments Protocol) | Authorization: Payment <credential> | /x402 |
| Read token | Authorization: Bearer <read_token> | A video job paid per request |
Holds and charges
The ledger is the gateway's record of every balance, hold and charge. Spend in it settles onchain in batches; see Settlement.
- Before a request runs, a hold for its worst case is taken: the prompt plus
max_tokens. - The charge is the provider's reported usage at the sheet price, rounded up to the unit. The rest of the hold is released.
- A request that fails after its hold is marked
failed_refunded, with cost zero.
Paid per request, the quote is the charge. Each price sheet promises its rates for 30 days.
Receipts
Every response carries a receipt:
- Its id is the
x-request-idheader. On a chat or text completion it is also the response'sid. - A response that is not streamed also sends the cost in
x-cost-units. A chat or text completion paid per request does not: readreceipt.paid. - A stream sends the receipt as its last comment line, before
[DONE].
Receipt, trimmed
"receipt": {
"request_id": "<request_id>",
"model": "<model>",
"status": "ok",
"usage": { "prompt_tokens": …, "completion_tokens": … },
"price": { "version": "<price sheet>", "input": …, "output": … },
"cost": { "units": "<units>", "usd": "<usd>", "usdf": "<usdf>" },
"settlement": { "status": "unsettled", "next_batch_after": "<time>" }
}Look one up with GET /v1/receipts/{id} and the key that made it, or with GET /x402/v1/receipts/{id} and no key at all.
Next: receipts, settlement and the public log
Units
Every amount is an integer number of units. USDF and USDG both have 6 decimals.
| Amount | Units | Value |
|---|---|---|
| 1 unit | 1 | $0.000001 |
| 1 USDF | 1,000,000 units | $1 |
| 1 USDG | 1,000,000 units | 1 USDF |
Amounts come back as { "units", "usd", "usdf" } strings, so no precision is lost. Prices are per 1M tokens for text, embeddings and rerank, per million characters for speech, per minute for transcription, per image unit for images and per second for video. Each model's unit is in GET /v1/pricing.
Every figure below is read live from GET /v1/limits. A request over its limit gets 429, the error code shown, and Retry-After in seconds.
| Applies to | Scope | Limit | Error code |
|---|---|---|---|
Other public reads and jobs carry their own limits:
| Applies to | Scope | Limit | Error code |
|---|---|---|---|
Session and dashboard calls have per-account limits too. They are listed in Account limits.
A refused request has this shape, on every endpoint:
{ "error": { "message": "…", "type": "…", "code": "…" } }type is the class of error and code the exact reason. The common ones:
| Status | Common code | What to do |
|---|---|---|
400 | null for a plain validation error, or a reason such as context_length_exceeded | Fix the request. Sending it again unchanged fails again. |
401 | invalid_api_key | Send a valid key as a Bearer token. |
402 | insufficient_balance or x402 | Fund the balance, or pay the quote. |
403 | key_paused | Resume the key, or use another one. |
429 | rate_limited | Wait for Retry-After, then send it again. |
502 | upstream_unavailable | Nothing was charged. Retry, or pick another model. |
Every docs page, by what you are doing:
Get started
Overview
This page: the endpoint, both ways to pay, billing, limits and errors.
Pay per request
Quote, sign one payment and send the request again. No account and no key.
Open Pay per requestAccounts and keys
Sign in, link a wallet, fund a balance, and give each key its own caps.
Open Accounts and keysBuild
API reference
The model endpoints, chat parameters, streaming, models, batch jobs, tools and public data.
Open API referenceModalities
Embeddings, images, speech, transcription, rerank and video on one balance.
Open ModalitiesReceipts and verification
Read a receipt, follow its settlement and check it in the public log.
Open Receipts and verificationDeveloper tools
Agents and integrations
SDKs and MCP
The TypeScript SDK, the AI SDK provider, OpenAI clients, MCP and the CLI.
Open SDKs and MCPPlatforms and providers
Sub-keys and markup for platforms, embeds, referrals, and serving your own endpoint.
Open Platforms and providersUSDF and trust
Coin and fees
Does USDF change in price?
1 USDF = $1 of compute, redeemable 1:1 for USDG at any time. At the token contract the rate never moves: anyone can wrap USDG into USDF and redeem USDF for USDG 1:1, with no fee. USDF also trades in the USDF/USDG pool on Uniswap, where the market sets the price and it can differ from 1:1; the contract's 1:1 is there beside it at any time. Redemption depends on USDG transfers succeeding: USDG is issued by a regulated issuer that retains pause and freeze powers over its own token.
Does USDF expire?
No.
Do I need an account?
No. Pay per request with a wallet and nothing else.
Which clients work?
Any OpenAI chat completions client, the AI SDK, LangChain, and any MCP client. See SDKs and MCP.
Is the Responses API served?
No. Use chat completions. Where a library offers both, pick the chat completions path.
How is the reserve verified?
Read it live on Transparency, or run every check in your browser on Verify.