Grade
by x-preflight in Documents & files
X Preflight: read a draft post against X's open-sourced ranking code. Returns what is already settled before you post, whether it enters the pool strangers are drawn from, how long it stays retrievable, which filters delete it, and which gates nobody can know in advance. Every claim cites a file and line in X's published source. Never writes the post. Nothing stored.
POST https://kevinhoff.com/api/paid/grade
Last 30 days
Status and outage history · Atom feed
- Uptime
- 94.7%
- Response time
- 409 ms typical, 615 ms slowest 5%
- Last check
- 2 h ago
- Next check
- any minute now
How to call it
POST https://kevinhoff.com/api/paid/grade
Each call costs $0.01 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://kevinhoff.com/api/paid/grade
content-type: application/json
{
"text": "the draft post you are about to publish on x.com"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
all_video_over_10s | boolean | No | OPTIONAL, defaults to false. Whether EVERY attachment is video running longer than ten seconds. One photo or one short clip makes this false. |
brief | boolean | No | OPTIONAL, defaults to false. True returns the classification only and drops the prose, which is 78% of the generation. Answers in seconds instead of tens of seconds, same model and same price. Use it if your client has a short timeout. |
followers_under_1000 | boolean | No | OPTIONAL, defaults to false. Whether the author is under the small-account cap that the one per-batch lift applies to. |
post_kind | string | No | OPTIONAL, defaults to original. A reply's parent is not in the text, so no tool can read this off the draft. Declare it only if it is not an original. One of: original, reply, quote, repost. |
reader_follows_back | boolean | No | OPTIONAL, defaults to false. Whether the reader follows the author back. Decides in-network versus out-of-network, which changes the reply chain. |
text | string | Yes | The draft post. Never rewritten, never stored. |
Example response
The provider's example. We can't check it without paying.
Example response, 27 lines
{
"gates": [
{
"head": "It can be found by strangers.",
"n": 1,
"name": "On the list",
"src": "phoenixRankAllCandidateProcessor.strato:446-451",
"state": "go"
}
],
"model": {
"built_for": "copy_link",
"negative_risk": {
"level": "low"
},
"survival": {
"verdict": "clear"
}
},
"structural": [
{
"detail": "An original or a quote is written to the index out-of-network readers are drawn from.",
"fact": "enters the pool",
"src": "phoenixRankAllCandidateProcessor.strato:446-451"
}
]
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://kevinhoff.com/api/paid/grade' \
-H 'content-type: application/json' \
--data-raw '{"text":"the draft post you are about to publish on x.com"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://kevinhoff.com/api/paid/grade' \
-H 'content-type: application/json' \
--data-raw '{"text":"the draft post you are about to publish on x.com"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fkevinhoff.com%2Fapi%2Fpaid%2Fgrade&method=POST
const res = await pay("https://kevinhoff.com/api/paid/grade", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"text": "the draft post you are about to publish on x.com"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://kevinhoff.com/api/paid/grade",
json={
"text": "the draft post you are about to publish on x.com",
},
)
print(res.status_code, res.text)Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 400 ms | $0.01 |
| 6 h ago | Passed | 402 | 299 ms | $0.01 |
| 10 h ago | Passed | 402 | 294 ms | $0.01 |
| 13 h ago | Passed | 402 | 437 ms | $0.01 |
| 17 h ago | Passed | 402 | 194 ms | $0.01 |
| 21 h ago | Passed | 402 | 637 ms | $0.01 |
| 25 h ago | Passed | 402 | 615 ms | $0.01 |
| 28 h ago | Timed out | - | - | - |
| 32 h ago | Passed | 402 | 350 ms | $0.01 |
| 35 h ago | Passed | 402 | 251 ms | $0.01 |
| 39 h ago | Passed | 402 | 409 ms | $0.01 |
| 42 h ago | Passed | 402 | 473 ms | $0.01 |
| 46 h ago | Passed | 402 | 516 ms | $0.01 |
| 2 days ago | Passed | 402 | 509 ms | $0.01 |
| 2 days ago | Passed | 402 | 402 ms | $0.01 |