Built for agents

Agent guide

Your agent rents verified H100 and H200 time by the 15-minute interval and pays in USDG through Bull streams, from its own wallet. Attesta never holds funds. A 2-of-3 verifier panel checks every interval.

Base URL
https://attesta-production-c04b9873.up.railway.app

Checking the API…

What your agent needs
Step 1

Sign in with the agent's wallet

Ask for a message, sign it with the wallet (EIP-191 personal_sign, no transaction, no gas), and trade the signature for an API key.

POST https://attesta-production-c04b9873.up.railway.app/v1/auth/challenge {"wallet": "0xYourAgentWallet", "role": "buyer"} → {"nonce": "...", "message": "Attesta sign-in\n..."} POST https://attesta-production-c04b9873.up.railway.app/v1/auth/login {"nonce": "...", "signature": "0x<signature of message>"} → {"api_key": "atk_...", "wallet": "0x..."} Send it on every signed-in call: Authorization: Bearer atk_...
Step 2

Find GPUs and get a quote

gpus matches machines of exactly that size. max_usd_per_hour includes Attesta's fee. A quote holds its price for 60 seconds. Give it either hours or a budget in cap_usdg (whole intervals that fit inside it), not both.

GET https://attesta-production-c04b9873.up.railway.app/v1/offers?sku=H100&gpus=1&max_usd_per_hour=2.60 POST https://attesta-production-c04b9873.up.railway.app/v1/quotes {"sku": "H100", "gpus": 1, "trust_class": "bonded_attested", "hours": 2} → {"quote_id": "qt_...", "line_items": {"totalUsdg": "...", "bullStreams": 9, ...}, "max_exposure_usdg": "...", "expires_at": "..."}
Step 3

Preview the spend, then launch

The preview is required. It returns the exact cost and anything your spend policy blocks.

POST https://attesta-production-c04b9873.up.railway.app/v1/spend/preview (Authorization, Idempotency-Key) {"action": "launch", "quote_id": "qt_..."} → {"preview_id": "pv_...", "allowed": true, "denials": [], "summary": "..."} POST https://attesta-production-c04b9873.up.railway.app/v1/jobs (Authorization, Idempotency-Key) {"preview_id": "pv_...", "quote_id": "qt_...", "workload": {"image": "pytorch/pytorch:latest"}} → {"id": "job_...", "next_actions": [{"kind": "fund", "stream_key": "fee", "steps": [...]}, ...]}

Need time before launching? Preview with "action": "reserve", then POST /v1/jobs/reserve with that preview_id and quote_id: the GPUs are held for you for 5 minutes, and the quote stays valid while they are held.

Step 4

Fund the Bull streams from the agent's wallet

Each fund action carries unsigned transactions: an optional USDG approve, then createStream. Send them in order from the agent's wallet, read the stream id from the StreamCreated event of the Bull Streams contract, and report it. Attesta checks the stream on chain before it counts.

POST https://attesta-production-c04b9873.up.railway.app/v1/jobs/job_.../funded (Authorization, Idempotency-Key) {"stream_key": "fee", "stream_id": "<id from StreamCreated>", "tx_hashes": ["0x..."]}

Before signing, check every transaction:

If reporting fails after the stream is on chain, report the same stream again. Never send a second stream for the same stream_key.

Step 5

Watch the job, keep it funded, stop when done

GET https://attesta-production-c04b9873.up.railway.app/v1/jobs/job_... → state, current_interval, next_actions fund actions: the next 15-minute interval; send and report as in step 4 cancel actions: after a stop, send them to recover unvested USDG Need more time? Extend a running job under the same caps: POST https://attesta-production-c04b9873.up.railway.app/v1/spend/preview {"action": "extend", "job_id": "job_...", "extra_hours": 1} POST https://attesta-production-c04b9873.up.railway.app/v1/jobs/job_.../extend {"preview_id": "pv_...", "extra_hours": 1} Done? Stop it: POST https://attesta-production-c04b9873.up.railway.app/v1/spend/preview {"action": "close", "job_id": "job_..."} POST https://attesta-production-c04b9873.up.railway.app/v1/jobs/job_.../close {"preview_id": "pv_..."} GET https://attesta-production-c04b9873.up.railway.app/v1/receipts/job_... → public receipt: streams, attestation, meters, panel votes GET https://attesta-production-c04b9873.up.railway.app/v1/credits/0xYourAgentWallet → credits banked after a failed provision or a failed interval

Credits are also listed by the MCP tool list_credits.

MCP

Attesta is also an MCP server: streamable HTTP at https://attesta-production-c04b9873.up.railway.app/mcp (POST, stateless, JSON responses). Sign in over REST first and send Authorization: Bearer atk_.... Writes need a confirmed preview_spend.

MCP setup

Sign in over REST first (step 1) to get an atk_... key, then connect your agent's app. The server is streamable HTTP, POST only, stateless, with JSON responses.

Claude Code

claude mcp add --transport http attesta "https://attesta-production-c04b9873.up.railway.app/mcp" --header "Authorization: Bearer $ATTESTA_API_KEY"

Cursor, VS Code and other apps that use an mcpServers settings file:

{ "mcpServers": { "attesta": { "url": "https://attesta-production-c04b9873.up.railway.app/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }

list_skus, search_offers, create_quote and get_receipt work without a key. Every other tool needs Authorization: Bearer atk_....

MCP tools
list_skusno argumentsGPU products (H100 and H200). No key needed
search_offersoptional sku, gpus (1-8), region, trust_class, max_usd_per_hour, limitAvailable offers. No key needed
create_quotesku, gpus, trust_class, exactly one of hours or cap_usdg; optional region, offer_idA quote that lasts 60 seconds. No key needed
preview_spendaction: reserve | launch | extend | close; quote_id or job_id; optional extra_hoursExact cost and policy check. Required before reserve, launch, extend or close
reserve_jobpreview_id, quote_id, confirm: trueHolds the GPUs for 5 minutes
launch_jobpreview_id, quote_id, confirm: true; optional image, commandStarts the job; returns unsigned Bull transactions
submit_paymentjob_id, stream_key, stream_id; optional tx_hashesReports a stream your wallet sent
get_jobjob_idJob status, current interval and next_actions
list_jobsno argumentsYour jobs
close_jobpreview_id, job_id, confirm: true; optional reasonStops the job; returns cancel transactions
extend_jobpreview_id, job_id, extra_hours, confirm: trueAdds hours under the same caps
get_receiptjob_idPublic receipt. No key needed
get_policyno argumentsYour spend policy
set_policyoptional hourly_cap_usdg, session_cap_usdg, daily_cap_usdg, max_hours_per_job, allow_trust_classesTightens caps only; loosening needs a fresh wallet signature on PUT /v1/policy (reauth)
list_creditsno argumentsCredits banked to your wallet after a failed provision or a failed interval

reserve_job, launch_job, extend_job and close_job need confirm: true as well as a confirmed preview_spend. No tool sends a blockchain transaction; the agent's wallet does.

SDKs

Python (sync Client and async AsyncClient). Install it from GitHub:

pip install "attesta[wallet] @ git+https://github.com/zyan90/attesta#subdirectory=sdk/python"

Do not run pip install attesta from PyPI: that name belongs to someone else.

import os from attesta import Client, Wallet wallet = Wallet(os.environ["AGENT_PRIVATE_KEY"]) # the key never leaves this process with Client("https://attesta-production-c04b9873.up.railway.app") as c: c.sign_in(wallet) offers = c.offers.search(sku="H100", gpus=1) quote = c.quotes.create(sku="H100", gpus=1, trust_class="bonded_attested", hours=2) preview = c.spend.preview(action="launch", quote_id=quote.quote_id) job = c.jobs.launch(preview_id=preview.preview_id, quote_id=quote.quote_id, image="pytorch/pytorch:latest") # job.next_actions: sign and send each Bull transaction with your wallet, then # c.jobs.funded(job.id, action.stream_key, stream_id, tx_hashes)

The SDK never sends a blockchain transaction; your agent does. Errors raise AttestaError(status, code, message).

TypeScript: createClient in src/sdk/client.ts of github.com/zyan90/attesta. Not on npm yet.

Fees and trust classes

Offers and quotes use trust_class. max_usd_per_hour already includes Attesta's fee. Bull's stream fee (0.5%, min $0.05, max $250 per stream) is paid in ETH on top. Jobs are capped at $1,000; the minimum job is $10. How the classes protect you: Trust.

Spend policy

Every wallet has a spend policy, checked by each preview. A new wallet starts with:

Read it with GET /v1/policy or get_policy; change it with PUT /v1/policy or set_policy. Tightening is instant. Loosening needs a fresh wallet signature: a new /v1/auth/challenge, signed, sent as reauth: { nonce, signature } on PUT /v1/policy, so set_policy over MCP can only tighten. The $1,000 job cap cannot be raised.

Limits and errors
x402 pay-per-call (no account)Coming soon

Paid quotes and 5-minute GPU holds over x402 are built into the API but not switched on here yet.

Open endpoints
GET/v1/healthIs the API up, and are payments live or simulated
GET/v1/skusGPU types on offer
GET/v1/offersOffers: sku, gpus (exact), region, trust_class, max_usd_per_hour (incl. fee)
POST/v1/quotesA 60-second quote for a job
GET/v1/providers/:idOne provider
GET/v1/receipts/:idA job receipt, public
GET/v1/credits/:walletCredits banked to a wallet after a failed provision or a failed interval
POST/v1/auth/challengeGet the sign-in message for your wallet
POST/v1/auth/loginSend the signature, get an API key
Signed-in endpoints · Authorization: Bearer atk_... · Idempotency-Key on POST
POST/v1/spend/previewExact cost and policy check; required before reserve, launch, extend, close
POST/v1/jobs/reserveHold the quoted GPUs for 5 minutes
POST/v1/jobsLaunch a job; returns unsigned Bull transactions
GET/v1/jobsYour jobs
GET/v1/jobs/:idOne job, with next_actions to fund or cancel
POST/v1/jobs/:id/fundedReport a stream you sent
POST/v1/jobs/:id/extendAdd hours under the same caps
POST/v1/jobs/:id/closeStop and get unvested USDG back
GET/v1/policyYour spend policy
PUT/v1/policyChange your spend policy

People can book from the website too. Browse GPUs · How Attesta keeps you safe: Trust