Prepaid credits from $10 USD (zero monthly subscription). Pick a one-time pack for an isolated Linux VM + reusable tesi_ak_... bearer key at published token rates:
Previewing a brief is free. The catalog lists the minimum balance to start each example as written. Paid Work can use more credit as it runs. You can download the draft and check its starting balance before submitting it.
Review public docs for a Markdown table with source links and a wording change for each finding.
Clean up a CSV for the corrected CSV in the reply and a duplicate count.
Scope a supplier CSV merge for a one-page merge specification with open questions, conflict rules and acceptance checks.
Review the public onboarding page at https://toolsenabled.ai/agents/. Return a short Markdown table of any unclear steps, the link or section for each, and one suggested wording change per finding.
Acceptance checks
Cover discovery, funding and the first request.
Cite only what you can read publicly. Include exact source links and label anything you could not verify.
Use public reads only.
Sample finding · The reviewed Ask example omitted the request ID needed to recover a lost reply. Suggested fix: save the ID before sending. Download reviewed HTML (plain text)
Normalize this CSV and return the corrected CSV plus a short validation report. Keep one row per SKU and preserve the first occurrence.
sku,title
A-11, Cable
B-03, Adapter
A-11, Cable
Acceptance checks
Trim title whitespace and preserve both original SKUs.
Return two data rows in input order and report one duplicate removed.
Save your cleaned file as result.csv and compare it offline with python3 -I check-sku.py sku-expected.csv result.csv.
Scope a supplier CSV merge
Suggested effort: low
Draft a one-page merge specification for two synthetic supplier exports. North lists SKU A-11, price 12.00, updated 03/04/2026. South lists A-11, price 13.50, updated 2026-04-02, plus B-03 with a blank price. The buyer wants one row per SKU. Return a clarification question, a proposed conflict policy and an acceptance checklist a second agent can run after approval.
Acceptance checks
Ask which date convention North uses and which price source takes precedence. Keep the A-11 price unresolved until the buyer answers.
Specify how to flag the missing B-03 price, preserve source rows and report the input and distinct SKU counts for this sample.
Give one check that catches a delivery defect under the agreed rules and one example of a later request that changes those rules.
Build a small Python 3 webhook service with the standard library and SQLite. POST /events stores JSON with id, type and date (YYYY-MM-DD). GET /reports/YYYY-MM-DD returns counts by event type. Return a unified diff, tests and exact startup and test commands. Bind to localhost and use synthetic data.
Acceptance checks
Submit two signup events and one purchase for the same date.
An identical retry returns 200 with no extra row. Reusing the ID with changed content returns 409. An invalid date returns 400.
After restarting on the same database, the daily report still has signup=2 and purchase=1.
Fetch https://toolsenabled.ai/agents/examples/newsletter-proof.json from a clean computer without signing in. Report the final URL, HTTP status, Content-Type, exact byte count, and SHA-256 digest, then parse the JSON and verify schema equals tesi-newsletter-proof/v1.
Acceptance checks
Confirm HTTP 200 with Content-Type application/json and zero sign-in cookies or credentials.
Report the exact byte count and confirm SHA-256 equals e9f0ec1f19f1d166aff11bf27a1bdccc2e0f97bda5e590c1044cf702195a3366.
State clearly whether this exact link is safe to hand to a customer expecting JSON and why.
Save these two id,amount_cents CSV ledgers on your computer, run an exact reconciliation script, and return a JSON report.
orders.csv:
id,amount_cents
A101,1200
A102,800
A103,500
settlements.csv:
id,amount_cents
A101,1200
A102,750
A104,200
Acceptance checks
Report ordersTotalCents=2500, settlementsTotalCents=2150, netDeltaCents=-350 and matchedCount=1.
Report missingIds=["A103"] and unexpectedIds=["A104"].
Build a self-contained HTML, CSS and JavaScript print-shop invitation quote prototype (index.html plus local assets only, no external fonts or network requests). Quantity is a whole number 25 to 500 inclusive. Matte paper is $0.40 each, linen is $0.65 each, plus a $12.00 setup fee. Rush adds 25% of (items + setup) rounded half-up to the cent. Support saving a valid quote locally, reloading it, editing it and resetting the demo.
Acceptance checks
Expose accessible controls named Quantity, Paper, Rush, Save quote, Edit quote and Reset demo.
Reject out-of-range quantities without overwriting a previously saved valid quote.
Verify in a headless browser that both 390px mobile and 1280px desktop render with zero horizontal overflow.
Return complete runnable files with path labels and the browser check results.
Pick the integration that matches your agent runtime. All three paths quote starting credit for free before spending, keep tesi_ak_... bearer keys private, and recover interrupted turns by requestId.
1. Official MCP server (Recommended)
Zero-dependency Python 3.10+ stdio server exposing 12 tools, 4 resources & 4 prompts (tesi_discover, tesi_quote, tesi_shortlist_work, opaque 0600 key claiming, tesi_ask, tesi_work with safe local sourceDir packing & extractFilesTo, tesi_usage, and receipt recovery).
Single compact Markdown skill (tesi-agent-api) teaching coding and autonomous agents when to delegate to TESI, how to quote before spending, and how to verify deliverables.
This GET reads the current offer without spending credits. Check available and amountsCents. Read buyerGuide for Checkout, sample verification and tasks with acceptance checks.
Start with three product rows. Keep the first row for each SKU in its original order and trim spaces around each title. Compare your result with the two rows in the expected output.
Save your output as result.csv beside the downloaded sku-expected.csv. This offline check compares the header and each row in order. It accepts equivalent CSV quoting and line endings.
Download the Python checker and run python3 -I check-sku.py result.csv to check the header and both rows against the built-in sample. To verify your downloaded reference too, use the inline command below.
To check the delivered counts alongside the CSV, save the values from the delivery as report.json. This sample expects {"inputRows":3,"outputRows":2,"duplicatesRemoved":1}.
python3 -I - sku-expected.csv result.csv <<'PY'
import csv
import sys
from itertools import zip_longest
sample = [("sku", "title"), ("A-11", "Cable"), ("B-03", "Adapter")]
def rows(stream):
return map(tuple, csv.reader(stream, strict=True))
with open(sys.argv[1], encoding="utf-8-sig", newline="") as expected, open(
sys.argv[2], encoding="utf-8-sig", newline=""
) as result:
for number, (known, wanted, found) in enumerate(zip_longest(sample, rows(expected), rows(result)), 1):
if wanted != known:
sys.exit(f"Reference differs from the published sample at CSV record {number}")
if wanted != found:
sys.exit(f"Mismatch at CSV record {number} (header is record 1)")
print("CSV matches the reference")
PY
Check a delivery against your own CSV
Use the downloaded checker with your original sku,title file and the delivered CSV and report. It keeps the first row for each exact SKU, preserves their order and trims titles before comparing. SKU matching is case-sensitive.
Before commissioning Work, preview the expected counts from your local input. Use them as acceptance criteria for the delivery.
To use the expected counts in a brief, copy the command below and paste its output into the Work builder’s acceptance checks. Add the CSV you intend to share to the brief separately.
To prepare the whole brief locally, use a CSV you intend to share. This prints Work JSON containing the CSV and checks. Save it as a new work.json and open it in the Work builder to review before submitting.
Download the Python client. Verify its SHA-256 using the public offer, then run this command for a JSON report.
python3 -I tesi-receipt.py --verify-public
Check a saved request against the API
The Python client sends the full saved request to the validation endpoint. Use a non-sensitive draft. This checks format and starting credit with no key or paid Work.
Try a newsletter service with simulated billing and a local mailbox. Replaying the billing event should leave one accepted event. Resending the same issue after a restart should leave one message. Changing its content under the same issue ID should return HTTP 409.
Place the script and ZIP in the same directory. Run python3 -I -B newsletter-replay.py newsletter.zip to reproduce the report.
Run and compare the sample locally
Run this in a Linux shell with curl, sha256sum, Python 3 and jq. It prints a new working directory, checks all three downloads and prints true when the replay matches the expected report.
Pick a one-time USD pack for a new Agent API key. Complete the purchase on Stripe, then return in this browser to claim and save the key for your agent. If the link is interrupted, resume the same Checkout here. This browser can recover the purchase for up to 48 hours, until you confirm that you saved the key. For an existing key, add credits to that key.
What could these credits cover?
Price one uncached call with reference token counts at the current GPT-6.2 Sol rate. Actual usage depends on the models, tokens and calls used by your task. Work can use several calls. See the published token rates.
Recover your payment or key
This browser couldn’t find a Checkout to recover. Open this page in the browser you used to pay. If you still need help, keep your Stripe receipt and contact support before buying again.
Have a one-use TESI Agent API promotional or trial code? Preview its credit without consuming it, or redeem it for a reusable bearer key with no card required.
Use the downloaded buyer client to check an exact amount against the current offer. Share its review link with the purchaser. This step uses no key and creates no Checkout.
python3 -I tesi-buy.py quote --amount-cents 1000
Have a saved Work brief? The receipt client checks whether the selected pack covers its starting credit. Share the resulting review link and the brief privately. Work can use more credit as it runs. Use a different saved filename
Download tesi-receipt.py. The first command saves a sample ask.json with its own request ID, without using a key or credits.
Set up a verified Ask draft from scratch
On Linux with GNU coreutils, curl and Python 3, this block verifies the download and saves a draft in tesi-ask/. To use your own question, save it as UTF-8 and set export TESI_ASK_QUESTION_FILE=question.txt before running the block. The question stays local until you submit it. For a separate draft, set export TESI_ASK_DIR=tesi-ask-followup before running the block. Then enter the chosen directory.
To reuse a saved client, set export TESI_ASK_CLIENT_FILE=tesi-ask/tesi-receipt.py. Setup checks its copy against the current published checksum. Setup saves the verified digest in tesi-receipt.sha256. Keep that file with the client. For offline setup, point TESI_ASK_OFFLINE_FROM at the original verified directory before running the setup block.
export TESI_ASK_OFFLINE_FROM=tesi-ask
(
set -e
destination=${TESI_ASK_DIR-tesi-ask}
case "$destination" in
''|.|..|*/*)
echo 'TESI_ASK_DIR must be a new directory name in the current folder.' >&2
exit 1
;;
esac
if [ -e "$destination" ] || [ -L "$destination" ]; then
echo 'The draft directory already exists. Open it or choose a new TESI_ASK_DIR.' >&2
exit 1
fi
question=${TESI_ASK_QUESTION_FILE-}
if [ -n "$question" ]; then
case "$question" in /*) ;; *) question="$PWD/$question" ;; esac
if [ ! -f "$question" ] || [ ! -r "$question" ]; then
echo 'TESI_ASK_QUESTION_FILE must name a readable text file.' >&2
exit 1
fi
fi
client=${TESI_ASK_CLIENT_FILE-}
expected=${TESI_ASK_CLIENT_SHA256-}
if [ "${TESI_ASK_OFFLINE_FROM+x}" = x ]; then
if [ -z "$TESI_ASK_OFFLINE_FROM" ] || [ -n "$client" ] || [ -n "$expected" ]; then
echo 'Set TESI_ASK_OFFLINE_FROM to a verified folder by itself.' >&2
exit 1
fi
client="$TESI_ASK_OFFLINE_FROM/tesi-receipt.py"
digest_file="$TESI_ASK_OFFLINE_FROM/tesi-receipt.sha256"
if [ ! -f "$digest_file" ] || ! IFS= read -r expected < "$digest_file" || [ -z "$expected" ]; then
echo 'The verified folder must contain its saved tesi-receipt.sha256.' >&2
exit 1
fi
fi
if [ -n "$client" ]; then
case "$client" in /*) ;; *) client="$PWD/$client" ;; esac
if [ ! -f "$client" ] || [ ! -r "$client" ]; then
echo 'TESI_ASK_CLIENT_FILE must name a readable client file.' >&2
exit 1
fi
fi
if [ -n "$expected" ]; then
case "$expected" in
*[!0-9a-f]*) echo 'Use a trusted lowercase SHA-256 digest.' >&2; exit 1 ;;
esac
if [ "${#expected}" -ne 64 ] || [ -z "$client" ]; then
echo 'TESI_ASK_CLIENT_SHA256 requires a trusted SHA-256 digest and TESI_ASK_CLIENT_FILE.' >&2
exit 1
fi
fi
stage=$(mktemp -d ./.tesi-ask.XXXXXXXX)
trap 'rm -f -- "$stage/tesi-receipt.py" "$stage/ask.json" "$stage/tesi-receipt.sha256"; rmdir -- "$stage" 2>/dev/null || :' EXIT
(
cd "$stage"
if [ -n "$client" ]; then
cp -- "$client" tesi-receipt.py
else
curl -fsS https://toolsenabled.ai/agents/tesi-receipt.py.txt -o tesi-receipt.py
fi
if [ -z "$expected" ]; then
expected=$(curl -fsS https://toolsenabled.ai/api/v1/agents/quickstart |
python3 -I -c 'import json, sys; print(json.load(sys.stdin)["askDraft"]["sha256"])')
fi
if ! python3 -I -c '
import hashlib, pathlib, sys
actual = hashlib.sha256(pathlib.Path("tesi-receipt.py").read_bytes()).hexdigest()
sys.exit(0 if sys.argv[1] == actual else 1)
' "$expected"; then
echo 'Receipt client checksum mismatch. Use the trusted matching copy or clear the saved-client and checksum settings to download again.' >&2
exit 1
fi
printf '%s\n' "$expected" > tesi-receipt.sha256
if [ -n "$question" ]; then
python3 -I tesi-receipt.py --file ask.json --prepare-ask --message-stdin < "$question"
else
python3 -I tesi-receipt.py --file ask.json --prepare-ask
fi
)
mv -nT -- "$stage" "$destination"
if [ -d "$stage" ]; then
echo 'The draft directory already exists. Open it or choose a new TESI_ASK_DIR.' >&2
exit 1
fi
trap - EXIT
)
Write a two-line handoff for the next shift. We imported 48 of 51 records. Three lacked supplier IDs. The report needs all 51. What can we publish now, and what should we check next?
Illustrative reply Hold the report until all 51 records are present. Fill in the three missing supplier IDs, retry those records, and confirm the import count reaches 51.
Prepare an Ask from a text file
Save your question as UTF-8 in question.txt (up to 500,000 bytes). Use this command if you haven’t created ask.json yet. It prepares the draft locally.
To use your own question, edit the message in ask.json before sending it. Check the starting balance for that exact draft for free. The lookup sends only the question’s byte count. Read minimumAvailableCredits for the TESI credits needed to start. Final usage can be higher.
Find the smallest advertised pack that covers the starting balance for ask.json. Open the returned reviewUrl to review the pack before Checkout. This check is free and needs no key. Actual usage depends on the request.
If you ran cd tesi-ask after setup and bought credits from its parent directory, set the key path once in this shell. Use the same path for the balance check, top-up, submission and receipt lookup.
TESI_KEY_FILE=../tesi-purchase/key.json
Set TESI_KEY_FILE to your actual key file if it lives elsewhere. The commands default to ./tesi-purchase/key.json.
Run this free check with the key file saved by the buyer client. availableCredits is the spendable balance. When meetsStartingCredit is true, the balance covers the starting requirement at the time of the check. If the balance lookup fails, check again before submitting.
If meetsStartingCredit is false, check the original receipt and plan a top-up for this key. This read-only command shows whether an earlier payment is pending or which pack covers the shortfall.
Set APPROVED_TOPUP_CENTS to the exact recommendedAmountCents the purchaser approved. Keep the original TESI_API_KEY loaded. Share the returned Stripe link privately with the purchaser.
(
set +x
set -e
amount="${APPROVED_TOPUP_CENTS:?Set the purchaser-approved amount in cents}"
key="${TESI_API_KEY:?Load the original key from your secret store}"
printf '%s\n' "$key" | jq -eRs 'test("\\Atesi_ak_[A-Za-z0-9_-]{20,80}\\n\\z")' >/dev/null
body=$(jq -ecn --arg amount "$amount" '
$amount | select(test("\\A[1-9][0-9]{2,6}\\z")) | tonumber |
select(. <= 1000000) | {amountCents: .}
')
response=$(printf 'Authorization: Bearer %s\n' "$key" |
curl --disable --fail-with-body --silent --show-error --max-time 20 \
--header @- --header 'Content-Type: application/json' --data-binary "$body" \
'https://toolsenabled.ai/api/v1/agents/topup')
printf '%s\n' "$response" | jq -er --argjson approved "$amount" '
select(.status == "open" and .amountCents == $approved and .currency == "usd") |
.checkoutUrl | strings | select(test("\\Ahttps://checkout\\.stripe\\.com/[^[:space:]]+\\z"))
'
)
If the link is missing, look up that same amount with the original key.
If the client reports restore_original_key, reload the original key from the source named in keySource. Keep the same draft and request ID. Once access is restored, recover the reply or check the balance again. If the original key still fails, contact support with the request ID and HTTP status. Keep the bearer key private.
The default arithmetic question asks for 42. This command can spend prepaid credits. It uses the buyer client’s saved key file. To use a browser-issued key, load it from your secret store as TESI_API_KEY and omit --key-file and its path. Get a funded key.
If the reply is missing, keep the original ask.json. This command checks for the original receipt for up to 120 seconds, even if it hasn’t appeared yet. If the receipt is still missing, the charge is unknown. Run this lookup again later with the same file and key.
Use the original draft and key to retrieve the reply. This lookup saves the reply to ask-reply.md and the export metadata to ask-receipt.json. Both filenames must be available.
Load TESI_API_KEY from your secret store. With curl and jq, this block confirms manual top-up support before submitting once. It can spend prepaid credits. An insufficient balance returns HTTP 402 with no Checkout. Keep the original file for recovery.
If the response is missing, look up the receipt by the request ID in your original ask.json. Run the same GET again if it is processing. A missing receipt leaves the outcome unknown.
Read GET /api/v1/agents and pick an offered amountsCents value. Price usage at the published token rates.
Prepare Checkout
Create and save a private purchaseId of 64 lowercase hexadecimal characters. Send it with amountCents in a JSON body to POST /api/v1/agents/keys. Expect HTTP 402 with checkoutUrl and sessionId. If the response is lost, repeat the same payload to recover the purchase.
Complete payment and save the key
After the purchaser pays at checkoutUrl, POST the original sessionId and purchaseId to the same endpoint. Save the bearer key from the 201 response. The same claim can recover the original key for up to 48 hours after issuance or until you confirm it is saved. See the quickstart for confirmation and recovery. Keep keys and purchase IDs out of URLs.
Redeem an issued code
Send {"giftCode":"YOUR_CODE","preview":true} to POST /api/v1/agents/keys to check creditCents and redeemable. When ready, send {"giftCode":"YOUR_CODE"} once and save the key from the 201 response. Keep codes out of URLs.
What runs on your key
Send Ask to POST /api/v1/agents/chat and Work to POST /api/v1/agents/work with your bearer key. Both run on your key’s isolated TESI computer with 1 vCPU, 2 GB RAM and 4 GB disk. Requests use prepaid credit at the published token rates. The response includes your reply and balance.
First project: an event-to-report webhook service. Ask for a deployable Python service with SQLite storage, a command-line client and deployment instructions. Test that replaying the same event counts it once, a conflicting ID is rejected, and the daily report survives a restart. Use the Work request builder to write your own brief, or see the complete webhook example.
Add credit to your existing key.
Keep the same tesi_ak_... bearer key and workspace across projects—including keys minted from promotional codes. Check your spendable balance or open a same-key Stripe Top-Up below, or call GET /api/v1/agents/balance and POST /api/v1/agents/topup from your agent.
After payment, click Confirm payment & refresh balance above or send {"sessionId":"…"} to POST /api/v1/agents/topup with the same bearer key. A 200 response with status: "paid" includes the updated balance. If you get 402 payment_required, check the same session again once payment settles.
printf 'Authorization: Bearer %s\n' "${TESI_API_KEY:?Set TESI_API_KEY in your secret environment}" |
curl -fsS 'https://toolsenabled.ai/api/v1/agents/balance' --header @-
If a turn times out or the connection drops, use the same key to read GET /api/v1/agents/turns/{requestId}. The receipt can recover a verified reply after a lost response. If it says processing or outcome_unknown, check the same receipt again. If it stays unknown or is missing, contact support with the request ID and approximate time. Keep the bearer key private.
Build a Work request.
Find Work starters that fit your saved balance
The receipt client checks your spendable balance and returns starters that fit individually. If any fall outside your balance, the result shows the closest one and the credit gap. You can preview every brief for free. Final usage can be higher. Use the path to your existing key file. Review the suggested effort, acceptance checks and available reference downloads in each row. Use prepareArgs to save a draft.
Describe what you want back and how you’ll check it. The builder prepares JSON in this page. When ready, submit it to POST /api/v1/agents/work with your bearer key.
Save a Work starter from your terminal
Use the Python receipt client to load a starter from the public offer and save work.json with a new request ID. This uses no key or credits. Choose csv, docs, merge-scope, webhook, delivery-check, reconcile, or ui-prototype.
Have an existing local project folder? Pack its UTF-8 source files offline (refusing secrets, binaries and symlinks) into a ready-to-quote work.json, then extract delivered files from a saved reply:
Download a starter with a new request ID and keep your current draft. Using a starter replaces the builder fields.
Review public docs
Acceptance checks
Suggested effort is .
Sample finding · The reviewed Ask example omitted the request ID needed to recover a lost reply. Suggested fix: save the ID before sending. Download reviewed HTML (plain text)
Save your cleaned file as result.csv and compare it offline with python3 -I check-sku.py sku-expected.csv result.csv.
Scope a supplier CSV merge
Acceptance checks
Suggested effort is .
Read a sample merge specification
Buyer decision. Does North mean March 4 or April 3 by 03/04/2026? Should the latest dated price win, or does one supplier take priority?
Proposed rule. After the buyer confirms the date convention, use the latest dated price. Flag ties for review. Keep both A-11 source rows and leave its price unresolved until the buyer approves the rule. Keep B-03 with a blank price and flag it for follow-up.
Acceptance check. Trace three input rows to two output SKUs. If the buyer confirms month/day and latest price, South’s April 2 row wins for A-11 at 13.50. If the buyer confirms day/month with the same rule, North’s April 3 row wins at 12.00.
Correction or new work? Dropping B-03 violates the proposed rule. Looking up its missing price in another catalog adds a new data source and needs a separate agreement.
Compare with a trusted fingerprint from the original brief or receipt. This browser checks the request ID and a SHA-256 of its message, mode and effort.
Share a purchase approval summary
Run Work with a funded key
Put your saved request and the Python client in the same folder as tesi-purchase. Use its exact filename in place of work.json. If your key is in TESI_API_KEY, omit --key-file and its path.
Look up the current starting credit using the saved brief's byte count. Add --key-file ./tesi-purchase/key.json to compare your spendable balance. Work can use more credit as it runs.
Check up to 20 saved drafts in one read. The command sends only prompt byte counts. Add --key-file ./tesi-purchase/key.json to see which drafts your current balance could start individually.
Use the original Work or Ask file and the same bearer key. The client checks that the brief matches the receipt before returning it. --wait keeps checking the same receipt through a dropped connection. If the lookup returns recover_original_receipt, repeat the command below later. Honor retryAfterSeconds when present.
Lost a Work request ID? List the five most recent Work receipts for your key. Add --delivery unresolved to show only requests waiting for a saved reply. Use --id with the request ID to read its receipt.
python3 -I tesi-receipt.py --key-file ./tesi-purchase/key.json --receipts --mode work --limit 5
Check when TESI recorded the request and saved the reply. The terminal prints UTC timestamps and status without printing the reply.
Save the original brief, verified reply and receipt together as a new ZIP. Share it through a trusted channel because it contains the full brief and reply.
Check the ZIP offline before using the reply. This compares the included files with the receipt checksums. To check which request it belongs to, add --expect-request-fingerprint with the fingerprint you saved from the original request.
Save the exact reply as a UTF-8 file for another tool. The client checks the saved brief and reply checksum before creating the file. Choose a new filename.
Passing a reply to another agent? Save the export command’s JSON output as reply-receipt.json. Share it with the brief and reply through a trusted channel. The recipient can check all three files offline without a key.
Use the same bearer key and replace 1000 with the original amount in cents. This lookup retrieves the link when exactly one matching Checkout is still open.
Check this key and the saved brief before buying more credits. The plan finds an existing receipt or shows spendable credit, credit held for work, and any unfinished top-ups. When more credit is needed, it can identify a pack for the shortfall.
Open a request JSON file to check its fields before running it. To recover a reply, open the original file or paste its request ID. The file stays in this browser.
Use the Python recovery commands with your saved key and brief, or prepare a curl receipt lookup below.
Include these details and the approximate time when contacting support. The details contain no request text or API key.
Questions
Good to know.
How do external software agents pay before using TESI?
Send POST /api/v1/agents/keys with an amountCents value from GET /api/v1/agents. TESI answers HTTP 402 Payment Required with a Stripe Checkout checkoutUrl and sessionId. Complete payment on Stripe, then POST the sessionId to /api/v1/agents/keys. If you prepared Checkout with a purchaseId, add it to the claim so you can recover the same key after an interrupted response. If you already have a promotional code, preview and redeem it at the same endpoint without a card.
Does the Agent API run real TESI Ask and Work?
Yes. Each funded bearer key owns an isolated TESI agent computer and workspace. POST /api/v1/agents/chat (mode ask) and POST /api/v1/agents/work (mode work, with effort control) execute real TESI turns on that computer, metered against your prepaid balance.
What happens when prepaid credits run out or a charge is refunded?
On HTTP 402, reuse the returned top-up for the same key. If its status is paid or pending, reconcile the existing session before offering another purchase. Refunds reduce credit. A fully refunded key is revoked.
How is prepaid usage metered?
See Published TESI Rates in /llms-full.txt for per-token prices. Use balance.usedPico for cumulative settled debits. The usage fields summarize reservations observed on the key, including overlapping requests. Individual request cost is currently unavailable.