Get started
Your first job
A job is a Stable Diffusion 1.5 image or a Qwen2.5-1.5B text answer. Two GPUs with different owners run it and the scheduler compares their results. You are charged only when the two results match. Today every node is project-run, so both owner wallets belong to the project; prices, limits and live capacity are on Models.
Two ways in: the playground in your browser, or the API with curl. Both start with a free trial.
In the browser
Step 1: Connect a wallet (paid jobs only)
The free trial needs no wallet. For paid jobs, open the Jobs page and connect a wallet on Robinhood Chain (chain id 4663). The site asks your wallet to switch networks if needed.
Step 2: Deposit, or use the free trial
Free trial: a few jobs per hour from one IP address, no wallet. The limit is set by the scheduler and sent with every answer in the
x-sc-rate-limitheader.Prepaid balance: on the Jobs page, deposit ETH into the payments contract. It stays yours: only your wallet can withdraw what is not spent. See Billing.
The price is 0.5 gwei per work unit today. A 512×512 image at 15 steps is 2,400 units = 0.0000012 ETH; a 64-token text answer to a short prompt is about 514 units = 0.000000257 ETH.
Step 3: Pick a model and submit in the playground
Open the playground and pick a model: Stable Diffusion 1.5 for an image (describe it, pick a shape and quality) or Qwen2.5-1.5B for a short text answer (write the prompt, pick a length, add instructions if you like). Each model shows whether a pair of machines is ready now. The exact price is shown before you pay.
Paying from your balance needs no API key: your wallet signs one message per job (no gas, nothing moves on-chain yet), and the job goes into the same queue as API jobs, with the same re-checks, charge and receipt. The price is held from your available balance until the job ends.
If no two machines with different owners can take the model right now, the job is refused at once with "No pair of machines can take this job right now" (
503 no-node-pair): nothing is queued, held or charged. Try again later.Step 4: Follow its status
- queued
- Waiting for two nodes with different owners and the same backend.
- running
- The two nodes are working on it.
- checking
- One result is in; waiting for the second.
- agreed
- The results matched. A paid job is charged at the end of the epoch (every six hours).
- queued again (re-check)
- A paid job whose two results did not match, or whose two nodes did not finish, runs again on two other nodes with different owners and GPUs when such a pair is registered, up to 3 pairs in all. Its status goes back to queued and its round goes up; the site shows "Re-checking on another pair (round 2 of 3)". The price stays held.
- disagreed
- The results did not match (a paid job: on any pair it was tried on). Not charged, and no node is paid for it.
- rejected
- The image safety checker flagged it. Not charged.
- expired
- No verdict within 6 hours. Not charged.
Step 5: Open your private result
Only two parties can open an agreed result: this browser, which keeps the job's read secret, and, for a paid job, the wallet that paid, after a gasless sign-in on any device. Knowing the job id is not enough.
The two GPUs see your prompt
The two nodes that run a job see the prompt and produce the result while they work, and that cannot be recalled. Do not submit personal or sensitive text.Step 6: Keep the receipt (paid jobs)
A paid job shows a receipt under its invoice as soon as the two results are compared; the Verify button next to the result, and the Verify link under it in Your jobs, lead to it. Once the epoch's charge is on-chain the receipt is sealed: save it as a JSON file and choose "Verify in this browser" to check it against the chain yourself, through Robinhood Chain's public RPC rather than Sparecycle. A free trial job is not charged and has no receipt. See job receipts.
With the API (curl)
A free trial job, start to finish. Replace JOB_ID and READ_SECRET with the values from the first answer.
Step 1: Submit a free trial job
Terminal (bash, zsh, macOS, Linux, WSL)curl -s -X POST https://sparecycle.tech/api/v1/jobs \ -H 'content-type: application/json' \ -d '{"kind":"text","params":{"model":"qwen2.5-1.5b","prompt":"Name three uses for an idle GPU.","maxTokens":64}}'Answer (201){ "id": "0x5b1c…", // the job id "status": "queued", "priceWei": null, // null for a free trial job "readSecret": "Qm0f…" // shown once: keep it to read the result }The
readSecretis shown once and the scheduler keeps only its hash. Without it, nobody can open a free job's result, you included.Step 2: Check its status
Terminalcurl -s https://sparecycle.tech/api/v1/jobs/JOB_IDRepeat until
statusisagreed,disagreed,rejectedorexpired. A first job can wait a minute or two while the project's own GPUs start. When no pair can be reached at all, the submit itself answers503 no-node-pairand no job is created;curl -s https://sparecycle.tech/api/v1/catalogshows each model's live capacity. A paid job also has around:0for its first pair,1or2while it is checked again on another pair (maxRoundsis 3; a free job hasmaxRounds1).Step 3: Read the result
Terminalcurl -s -H "Authorization: Bearer READ_SECRET" https://sparecycle.tech/api/v1/jobs/JOB_ID/resultText jobs answer
text/plain, image jobsimage/png. No credentials:401; wrong secret:403; not agreed:409.
An image job works the same way:
curl -s -X POST https://sparecycle.tech/api/v1/jobs \
-H 'content-type: application/json' \
-d '{"kind":"image","params":{"model":"sd15","prompt":"a lighthouse at dusk, watercolor","width":512,"height":512,"steps":15}}'curl -s -H "Authorization: Bearer READ_SECRET" -o result.png https://sparecycle.tech/api/v1/jobs/JOB_ID/resultWindows
curl.exe (not curl) and put the JSON in a file: curl.exe -s -X POST https://sparecycle.tech/api/v1/jobs -H "content-type: application/json" -d "@job.json".Paid jobs over the API
A paid job sends { request, payment } instead of the bare request. Your balance must already be in the payments contract (deposit on the Jobs page).
{
"request": {"kind":"text","params":{"model":"qwen2.5-1.5b","prompt":"Name three uses for an idle GPU.","maxTokens":64}},
"payment": {
"payer": "0xYOUR_WALLET",
"signature": "0x…", // personal_sign of the message below
"issued": 1795528461, // unix seconds when you signed
"priceWei": "257000000000" // work units × priceWeiPerUnit
}
}signature is an EIP-191 personal_sign by payer of these six lines, joined by newlines. It is valid for 10 minutes after issued, and each signature pays for one job only.
Sparecycle: pay for one job from my balance
Chain: 4663
Payments contract: <payments contract, lowercase>
Job request: <sha256 of JSON.stringify(request), 0x + lowercase hex>
Price: <priceWei> wei
Issued: <issued>The price must match the scheduler's: work units times priceWeiPerUnit from GET /api/v1/payments/account?address=0x…. If it does not, the answer is 409 price-changed with the right priceWei; sign again. Too little available balance gives 402 insufficient-balance.
// pay-job.mjs: submit one paid text job from your prepaid balance.
// npm install viem, then: PAYER_KEY=0x… node pay-job.mjs (a key you control; never paste it into a website)
import { sha256, stringToBytes } from "viem";
import { privateKeyToAccount } from "viem/accounts";
const API = "https://sparecycle.tech/api/v1";
const account = privateKeyToAccount(process.env.PAYER_KEY);
const request = {"kind":"text","params":{"model":"qwen2.5-1.5b","prompt":"Name three uses for an idle GPU.","maxTokens":64}};
// Price = work units × price per unit. Text: 8 per max token + 1 per 16 characters of prompt and system.
const units = request.params.maxTokens * 8 + Math.ceil(request.params.prompt.length / 16);
const acct = await (await fetch(`${API}/payments/account?address=${account.address}`)).json();
const priceWei = BigInt(units) * BigInt(acct.priceWeiPerUnit);
const issued = Math.floor(Date.now() / 1000);
const message = [
"Sparecycle: pay for one job from my balance",
"Chain: 4663",
`Payments contract: ${acct.contract.toLowerCase()}`,
`Job request: ${sha256(stringToBytes(JSON.stringify(request)))}`,
`Price: ${priceWei} wei`,
`Issued: ${issued}`,
].join("\n");
const signature = await account.signMessage({ message });
const res = await fetch(`${API}/jobs`, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ request, payment: { payer: account.address, signature, issued, priceWei: priceWei.toString() } }),
});
console.log(res.status, await res.json()); // keep id and readSecretRead the result the same way as a free job, with the readSecret from the answer, or with a session of the paying wallet (see authentication). The same credentials read the job's invoice (GET /api/v1/jobs/JOB_ID/invoice) and its receipt (GET /api/v1/jobs/JOB_ID/receipt, 409 no-verdict until the results are compared).