Getting started
A complete walkthrough from buying credits to downloading your first result. No support contact needed.
1. Choose a credit package
Go to the purchase page and pick a package. Package sizes and prices are on the pricing page. An execution's cost depends on the tool: Light tools 2 credits, Standard 5, Heavy 8.
2. Pay and watch for the e-mail
Checkout is handled by Stripe. When the payment completes, a wallet is created and credited, and a one-time retrieval link is e-mailed to the address you entered. The e-mail usually arrives within a minute; check your spam folder before contacting support. If you mistyped the address, nothing can be redirected later, so take care at checkout.
3. Open the retrieval link
The link works once and expires 15 minutes after it was issued. On the retrieval page, press Reveal API token to redeem it — nothing is redeemed until you do.
4. Store the token securely
Copy the token to wherever you keep secrets: an environment variable in your deployment, a secret manager, a keychain. It is shown only once; leaving the page without copying it means you cannot retrieve it again. A leaked token is the key to your credit wallet, so do not commit it to a repository or paste it into chat.
5. Authenticate
Send the token on every call:
Authorization: Bearer tfk-YOUR-TOKENA token you can test with is your wallet's balance endpoint:
curl -H "Authorization: Bearer tfk-YOUR-TOKEN" \
https://api.tooley.work/v1/wallet/balance{"wallet_id": "w-…", "available_credits": 100,
"reserved_credits": 0}6. Discover a tool and inspect its schema
Tool catalogue reads are open, so you can browse before buying:
curl https://api.tooley.work/v1/toolsEach entry carries the tool's credits price and its
full input map (files, params, optional
text). Pick a tool and note its id. A
single tool's entry is at GET /v1/tools/{slug}.
7. Submit a job
Parameter-only tools take one JSON object whose top-level keys are the tool's parameters:
curl -X POST https://api.tooley.work/v1/tools/colour-converter/jobs \
-H "Authorization: Bearer tfk-YOUR-TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": "sample text", "from_format": "auto"}'File tools take multipart form data, with the parameters as a
JSON string in the params form field:
curl -X POST https://api.tooley.work/v1/tools/archive-inspector/jobs \
-H "Authorization: Bearer tfk-YOUR-TOKEN" \
-F "[email protected];type=application/zip" \
-F 'params={}'Which parameters exist, and which are required, comes from each
tool's published schema in its catalogue entry
(GET /v1/tools/{slug}). The same schema is
what the server validates against: a missing required key answers
V_MISSING_PARAM, an undeclared one
V_UNKNOWN_PARAM.
A successful submission answers 202:
{"job_id": "b57b…", "state": "queued",
"price_credits": 2, "credits_reserved": 2,
"poll_url": "/v1/jobs/b57b…",
"deduplicated": false}8. Poll for completion
GET the poll_url every few seconds. States run
queued → running →
result, or end in failed /
cancelled:
{"id": "b57b…", "state": "result",
"price_credits": 2, "tariff": "Light",
"result": {"outputs": [{"name": "out_…", "bytes": 120,
"content_type": "text/plain", "fid": "…"}]}}9. Retrieve the output
The output index lists every produced file with its relative URL; the URL streams the bytes:
curl https://api.tooley.work/v1/jobs/b57b…/outputs \
-H "Authorization: Bearer tfk-YOUR-TOKEN"curl -o out.csv \
https://api.tooley.work/v1/jobs/b57b…/outputs/0 \
-H "Authorization: Bearer tfk-YOUR-TOKEN"Outputs expire when the tool's retention window closes (per
tool, shown on its catalogue entry); the endpoint then answers
410 R_EXPIRED.
10. Check your balance
The price was reserved at admission and settled on success. Confirm with:
curl -H "Authorization: Bearer tfk-YOUR-TOKEN" \
https://api.tooley.work/v1/wallet/transactionsRows are newest first with the running deltas per job, so you can see exactly which job spent what. Failures and cancellations release the reservation instead of settling it — a job that produced nothing costs nothing.
Where to go next
The API reference covers every endpoint; Executing tools has more request shapes; Credits and errors explains the failure codes you may meet.