Skip to content
GradeThread

Grade-as-a-Service API

Embed standardized, AI-powered clothing condition grading into your marketplace, resale app, or internal tooling. Send photos, get a 1.0–10.0 condition grade, a factor-by-factor report, and a verifiable certificate, all through a simple REST API with a JavaScript SDK, a no-credit sandbox, and white-label embeds. Sandbox keys are free on every plan, Free included; live keys come with the Business plan.

Quickstart

  1. Create an API key. In your dashboard under Account → API keys, create a sandbox key (free on every plan) or a live key (Business plan), and grant only the scopes you need (submit, read, webhook_manage). The secret is shown once — store it safely. Rotate or revoke it anytime.
  2. Try it free in the sandbox. Call /api/v1/sandbox/grades (below) — deterministic sample grades, zero credits, same shapes as production.
  3. Go live. Switch to a live key (Business plan), drop the /sandbox path, attach real photos (front, back and label are required; a detail close-up is recommended), and submit to /api/v1/grades. Poll /api/v1/grades/:id or receive a webhook.
  4. Scale up. Grade up to 50 garments per call with /api/v1/grades/batch and let webhooks push each result as it finishes.

Authentication

Every request authenticates with an API key in the X-API-Key header. Keys are created in your dashboard under Account → API keys, are shown once, and can be scoped to read, submit, and webhook_manage. Rotate or revoke a key at any time. A sandbox key starts with gt_test_, is free on every plan, and works on /api/v1/sandbox/* and in test mode (below); anywhere else it gets 403 SANDBOX_ONLY_KEY. A live key reaches every endpoint and comes with the Business plan. Base URL: https://functions.gradethread.com.

Endpoints

MethodPathScopeDescription
POST/api/v1/gradessubmitSubmit a garment (photos) for grading.
POST/api/v1/grades/batchsubmitSubmit up to 50 garments as one durable async batch.
GET/api/v1/grades/batch/:idreadPoll a batch's status + per-garment results.
GET/api/v1/grades/:idreadFetch a submission and its grade report.
DELETE/api/v1/grades/:idsubmitDelete a grade: removes its photos, takes the certificate down and clears its text. Billing records stay. 409 while it is still grading.
GET/api/v1/gradesreadList grades, paginated.
GET/api/v1/retentionreadRead the account's grade retention period. null means none is set.
PUT/api/v1/retentionsubmitSet how many days grades are kept (1 to 3650), or null to keep them. Older grades are deleted nightly.
GET/api/v1/usagereadThis key's monthly call usage vs quota + reset date, and the account's calls per day.
GET/api/v1/referralsreadReferral partners. Sellers who signed up through your signed links, newest first, with signup, first grade and first paid dates.
GET/api/v1/itemsreadList inventory items, paginated and filterable by status.
GET/api/v1/items/:idreadFetch one inventory item and its attributes.
GET/api/v1/listingsreadList marketplace listings, paginated.
GET/api/v1/salesreadList completed sales, paginated.
GET/api/v1/analyticsreadList the FlipDesk Analytics views and the parameters each one takes.
GET/api/v1/analytics/:viewreadOne Analytics view (sell-through, price curve, returns and the rest), the same numbers the page shows. Cohort figures keep the same privacy floor.
POST/api/v1/sealssubmitSeal a garment's condition at shipping: photos plus an order reference, or a certificate you graded.
GET/api/v1/sealsreadList your seals, newest first, filterable by order reference.
GET/api/v1/seals/:idreadOne seal with signed photo URLs and every comparison run on it.
POST/api/v1/seals/:id/comparesubmitCompare return photos with the seal. The verdict is advisory, never a fraud finding.
POST/api/v1/routing-profilessubmitCreate a returns routing profile: the minimum grade for restock, outlet and resale, with per-category overrides.
GET/api/v1/routing-profilesreadList your routing profiles.
GET/api/v1/routing-profiles/:idreadOne routing profile.
PATCH/api/v1/routing-profiles/:idsubmitChange a routing profile. Batches already sent keep the copy they were routed by.
DELETE/api/v1/routing-profiles/:idsubmitDelete a routing profile.
PUT/api/v1/trade-in/offer-tablesubmitPilot. Set your buy-back offer table: credit per grade band, with per-category lists.
GET/api/v1/trade-in/offer-tablereadPilot. Read your offer table.
POST/api/v1/trade-in/quotessubmitPilot. Grade a customer's at-home photos and quote from your offer table. Low confidence returns a range.
GET/api/v1/trade-in/quotes/:idreadPilot. One quote, with its intake grade once attached.
POST/api/v1/trade-in/quotes/:id/intakesubmitPilot. Attach the grade the garment got at intake, to compare with the quote.
GET/api/v1/trade-in/agreementreadPilot. How often at-home quotes agree with intake, with the sample size.
POST/api/v1/brands/:accountId/passportssubmitBrand partners. Mint Garment Passports and printable tags for up to 500 items, keyed on your own item id. A retry returns the same passports.
GET/api/v1/brands/:accountId/passportsreadBrand partners. How many passports you minted and how many were since claimed, graded and sold. No later owner is named.
PATCH/api/v1/webhookwebhook_manageSet the URL we POST to when a grade completes. The first call returns your signing secret.
GET/api/v1/webhookwebhook_manageRead your webhook URL and whether it has a signing secret.
POST/api/v1/webhook/secret/rotatewebhook_manageGet a new signing secret. Shown once.
GET/api/v1/webhook/deliverieswebhook_manageRecent deliveries: status, attempts and the last response code.
POST/api/v1/webhook/deliveries/:id/redeliverwebhook_manageSend one event again, with the same webhook-id.
GET/api/v1/eventswebhook_manageEvery event sent to your account, oldest first, by cursor. Use it to catch up after an outage.
POST/api/v1/sandbox/gradessubmitFree mock submit — returns a sample grade, no credits.
GET/api/v1/sandbox/grades/:idreadFree mock fetch — returns a sample grade.
GET/api/v1/price-guidereadList published Resale Condition Index items (the catalog).
GET/api/v1/price-guide/:slugreadResale value range + sell-through by grade band for an item.
GET/api/v1/sandbox/price-guidereadFree mock catalog — the sandbox mirror of the list endpoint.
GET/api/v1/sandbox/price-guide/:slugreadFree mock price guide — deterministic sample, no live data.

All responses share one envelope: { data, error, meta }. A failed call has error: { message, code, details }. Switch on code, not on the message: UNAUTHORIZED, INSUFFICIENT_SCOPE, SANDBOX_ONLY_KEY, RATE_LIMITED, QUOTA_EXCEEDED, VALIDATION_FAILED, NOT_FOUND or INTERNAL, or a more specific one a call documents. Every response carries meta.request_id, the same as the X-Request-Id header; quote it to support.

Full machine-readable reference (OpenAPI 3.1) — openapi.json. No key required; import it into Postman, Insomnia, or your codegen of choice.

Batch grading

Grade up to 50 garments in one call. The batch is durable and async: you get a batch id back immediately, each garment is graded and charged independently (partial success is fine), and a grade.completed webhook fires per garment. Poll the batch-status endpoint for per-garment results. Every garment is validated the same way as a single grade — an invalid garment rejects the whole request up front. Prefer image URLs over base64 in a batch.

curl https://functions.gradethread.com/api/v1/grades/batch \
  -X POST \
  -H "X-API-Key: gt_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"garments":[
        {"title":"Denim jacket","garment_type":"outerwear","garment_category":"jacket",
         "images":[{"image_type":"front","url":"https://.../f.jpg"},
                   {"image_type":"back","url":"https://.../b.jpg"},
                   {"image_type":"label","url":"https://.../l.jpg"},
                   {"image_type":"detail","url":"https://.../d.jpg"}]}
      ]}'

# → 202 { "data": { "id": "<batch_id>", "status": "running", "item_count": 1 } }
# Poll GET /api/v1/grades/batch/<batch_id> for per-garment results.

Webhooks

Set a webhook URL with PATCH /api/v1/webhook. There is one webhook per account, so each grade sends one grade.completed event however many API keys you have. The first time you set a URL, the response includes a signing_secret that starts with whsec_. Save it: we show it once. Need a new one? Call POST /api/v1/webhook/secret/rotate.

Three events arrive there. grade.completed when a grade is final, grade.failed when a garment could not be graded (any charge was reversed), and batch.completed once every garment in a batch is done, with each one's outcome. Each is sent once, so you never need to poll for a result.

Deliveries follow the Standard Webhooks format, so their verification libraries work as-is. To check one by hand, take the base64 part of your secret after whsec_, decode it, and compute an HMAC-SHA256 over {webhook-id}.{webhook-timestamp}.{raw body}. Base64 it and compare with the value after v1, in webhook-signature. Reject a timestamp more than five minutes old, and use webhook-id to ignore repeats. A failed delivery is retried for about 12 hours, and GET /api/v1/webhook/deliveries shows every attempt.

POST <your webhook_url>
webhook-id: 6f1c…            (same on every retry of this event)
webhook-timestamp: 1757000000
webhook-signature: v1,<base64 HMAC-SHA256 of "{id}.{timestamp}.{raw body}">

{
  "id": "6f1c…",
  "event": "grade.completed",
  "data": {
    "submission_id": "…",
    "grade_report": { "id": "…", "overall_score": 8.5,
                      "grade_tier": "Excellent", "certificate_id": "…",
                      "finalized_at": "2026-07-09T…Z" }
  },
  "timestamp": "2026-07-09T…Z"
}

Sandbox (no credits)

Build and test your integration with zero credits. The sandbox endpoints return deterministic sample grades, with the same auth, scopes and response shape as production, so the only thing you change to go live is the URL path and the key. Sandbox keys are free on every plan, Free included, and sandbox calls never spend credits or count toward a quota. Going live needs a live key, which comes with the Business plan.

curl https://functions.gradethread.com/api/v1/sandbox/grades \
  -X POST \
  -H "X-API-Key: gt_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"Vintage denim jacket","brand":"Levi'\''s"}'

Test mode (certify your integration)

Call the live endpoints with a gt_test_ sandbox key and you get the live flow back: POST /api/v1/grades and POST /api/v1/grades/batch answer 202, the grade moves from queued to processing to a final state over a few seconds, GET /api/v1/grades/:id and GET /api/v1/grades/batch/:id show each step, and your webhook endpoint gets signed grade.completed, grade.failed and batch.completed events with "livemode": false. The grader is a deterministic fake: no AI call, no charge, no quota, and nothing reaches your live grades, your live event log or a public certificate. Test ids start with tgr_ and tbt_; GET /api/v1/events with a test key lists test events only.

Force an outcome by putting a magic word in the title, description or external_id:

  • gt_test_failed: the grade fails and sends grade.failed.
  • gt_test_review: the grade waits in pending_review for about a minute, then completes with needs_human_review: true.
  • gt_test_slow: grading takes about two minutes instead of three seconds.

A poll returns the state, the garment type, category and grade; title, brand, description and your partner ids come back on the 202 and in the webhook, not on a poll. GET /api/v1/grades lists nothing in test mode.

Verify a certificate (no key)

Anyone can check a GradeThread certificate, with no API key and from any origin (the two reads send Access-Control-Allow-Origin: *). Look up the number printed on a hangtag, then confirm the grade still matches the hash sealed when it was issued.

# 1. A printed number to a certificate
curl https://functions.gradethread.com/api/content/public/certificates/by-number/GT-XXXXXXX
# {"found":true,"certificate_id":"...","certificate_number":"GT-XXXXXXX","overall_score":9.2,...}

# 2. Has the grade changed since it was issued?
curl https://functions.gradethread.com/api/content/public/certificates/<certificate_id>/verify
# {"verified":true,"status":"verified","algorithm":"...",...}

verified: true means the grade has not changed since it was issued. To send a person straight to a certificate, link https://gradethread.com/verify?code=GT-XXXXXXX or https://gradethread.com/cert/GT-XXXXXXX; both redirect. Both endpoints are in the OpenAPI spec under “Certificates (no key)”.

Resale Condition Index price guide

Beyond grading, the API exposes GradeThread's proprietary Resale Condition Index as a queryable price guide: for a published brand-and-category item, the resale value range and sell-through at each condition-grade band. It's read-scoped and rate-limited like every other endpoint, with a no-credit sandbox. Every figure is aggregate-only and sample-gated — items and bands without enough recent data are not returned rather than guessed.

curl https://functions.gradethread.com/api/v1/price-guide/patagonia-better-sweater \
  -H "X-API-Key: gt_sk_..."

# → { "data": { "slug": "patagonia-better-sweater", "brand": "Patagonia",
#       "bands": [ { "band": "high", "gradeRange": "8.5 – 10.0",
#                    "valueLowCents": 6500, "valueMedianCents": 8200,
#                    "valueHighCents": 9800, "sellThrough": 0.78 }, ... ] } }

JavaScript SDK

A zero-dependency, typed client for Node 20+ and the browser. It sends an Idempotency-Key on every grade submission and retries rate limits and outages without charging twice.

Install it from npm:

npm install @gradethread/sdk

Then:

import { GradeThread } from "@gradethread/sdk";

const gt = new GradeThread({ apiKey: process.env.GRADETHREAD_API_KEY });

// Try it free in the sandbox (no credits spent):
const sample = await gt.sandbox.grades.create({ title: "Vintage denim jacket" });
console.log(sample.grade_report.overall_score); // e.g. 8.5

// Live grading:
const job = await gt.grades.create({
  title: "Vintage denim jacket",
  garment_type: "outerwear",
  garment_category: "jacket",
  images: [
    { image_type: "front", url: "https://.../front.jpg" },
    { image_type: "back", url: "https://.../back.jpg" },
    { image_type: "label", url: "https://.../label.jpg" },
    { image_type: "detail", url: "https://.../detail.jpg" },
  ],
});
const result = await gt.grades.get(job.id);

Rate limits & quotas

Limits are enforced per API key in a 60-second sliding window, with separate budgets for reads (GET) and writes (POST/PATCH). Exceeding a budget returns 429 with a retry_after_seconds hint. Live usage is shown on your dashboard.

PlanReads / minWrites / min
Business (live and sandbox keys)24040
Pro (sandbox keys)12020
Starter (sandbox keys)6010
Free (sandbox keys)305

Grading volume is metered by credits: each live grade spends 1 credit (Standard), 3 (Premium), or 5 (Collector, tier key express). Sandbox calls never spend credits.

Calls are metered too. Each Business key includes 10,000 successful API calls a month (sandbox calls are free), reset on the 1st (UTC); GET /api/v1/usage shows where you are. Past that, each call draws one prepaid overage credit: $10 for 2,500 calls, $50 for 14,000, $100 for 30,000, $200 for 65,000. Overage credits never expire and are bought on the API keys page. With none left, calls get 429 QUOTA_EXCEEDED until the month resets.

Compatibility & deprecation

Within /api/v1 we only add things: new endpoints, new optional parameters, new response fields and new enum values. Write your client to ignore fields it does not know, and it keeps working.

Before we remove or change anything, the affected responses carry a Deprecation header and a Sunset header with the date it stops working, at least 90 days ahead. Log those headers and you will hear about a change before it reaches you. A change that cannot be made that way ships as /api/v2, and v1 keeps running beside it.

Every call in the OpenAPI spec has a stable operationId, so a generated client keeps its method names from one release to the next.

One change was made before this policy: on November 4, 2026 the 401 and the monthly-quota 429 moved into the envelope (they had been a bare { error }), and quota_exceeded became QUOTA_EXCEEDED. The message text did not change.

White-label embeds

Render any grade certificate inside your own platform, under your brand. Set your company name, color, and logo in the dashboard and copy the generated <iframe> snippet — buyers see the grade in your brand with a small "Verified by GradeThread" trust mark.

Claude and ChatGPT connector

Connect GradeThread to Claude and run your pipeline from a conversation: ask what is unlisted, get drafts written, publish, reprice, end listings. It is a Model Context Protocol server, so it works in Claude Code, the Claude desktop and web apps, and anything else that speaks MCP.

Included on Pro ($59/mo) and Business ($99/mo). Pro includes 500 connector actions a month and Business 2,000; reading costs nothing and is not counted. The sandbox tools work on every plan, including Free, so you can see what it does before paying for it.

Adding it

In Claude Code:

claude mcp add --transport http gradethread https://functions.gradethread.com/mcp

In the Claude web or desktop app: Settings → Connectors → Add custom connector, then paste https://functions.gradethread.com/mcp. Either way you will be sent to GradeThread to sign in and choose what to allow.

In ChatGPT: Plugins → + → Add custom MCP server, choose a public endpoint, paste the same address and pick OAuth. You sign in on GradeThread and see the same permissions, the same confirmation before anything goes live, and the same monthly action count; Claude and ChatGPT share it. Step-by-step guides, once you are signed in: Claude and ChatGPT.

What you are asked to allow

ScopeWhat it lets the assistant do
readSee inventory, grades, listings and sales. Cannot change anything.
submitGrade items, write and edit drafts, publish, reprice and end listings. This is the one that spends money.
webhook_manageSet or remove your webhook, rotate its signing secret, and read its delivery log.

You can turn any of these off on the consent screen and still connect. A read-only connection is a normal thing to want.

Common requests

ToolAsk for it like thisWhat it doesWhat it will not do
gradethread_list_items“What is still unlisted from last week?”Lists inventory with filters for brand, category, status and date.Change anything. Read-only.
gradethread_grading_readiness“Why can I not grade the Carhartt jacket yet?”Names the missing photos and fields per item, the cost, and whether your credits cover the batch.Submit anything or spend a credit.
gradethread_grade_item / _batch“Send these six for grading.”Previews the exact items and cost, then submits once you confirm. Uses your grading credits.Grade anything on the first call. Preview always comes first, and the token it returns expires in ten minutes.
gradethread_create_draft“Write listings for everything I graded today.”Generates title, description, category, item specifics and a suggested price from the item's photos.Publish. It writes a draft and tells you when the batch is done.
gradethread_update_draft“Shorten that title and set it to $48.”Edits title, description, price, quantity, condition and item specifics on an unpublished draft.Touch a listing that is already live. It refuses those and points at the reprice tool.
gradethread_publish_listing“Put the denim jacket live.”Shows exactly what buyers will see, what eBay takes, and anything blocking it — then publishes on a second, confirmed call.Publish in one call, publish at a price that changed after you agreed, or tell you it worked when eBay did not confirm it.
gradethread_reprice_preview / _apply“What should the Levi’s be priced at?”Prices from comparable listings and shows before-and-after per listing before changing anything.Move a price more than 25%, or below an item's cost floor — even if you confirm it. Do those in FlipDesk, looking at the listing.
gradethread_end_listing / _listings“Pull everything from that thrift haul.”Lists every affected item BY NAME, then ends them once confirmed, and reports which actually came down.Act on a count alone, or claim a listing ended when the marketplace has not taken it down yet.
gradethread_queue_extension_work“List these twelve on Poshmark and Mercari.”Queues the work for your own browser, naming every item and channel first. It runs the next time you open your browser with the GradeThread extension installed — Poshmark, Mercari, Grailed, Vinted and Facebook have no listing API, so nothing else can do it for you.Put anything live by itself. The work waits for your desktop, and the confirmation says so rather than reporting a listing that does not exist yet.
gradethread_extension_queue“What is my browser still waiting to do?”Shows what is queued, running and needing attention, including work that expired before a browser ever picked it up.Change anything. Read-only.
gradethread_comps / _price_guide“What do these usually sell for?”Returns comparable listings and the published Resale Condition Index bands.Change anything. Read-only.

Every tool (30)

ToolWhat it is forChanges anything?Plans
gradethread_apply_price_suggestionTake one price suggestionYes (see Connector safety below)Pro and Business
gradethread_compsWhat has this actually sold forNo, it only readsPro and Business
gradethread_create_draftGenerate draft listings for itemsYes (see Connector safety below)Pro and Business
gradethread_dismiss_price_suggestionDismiss one price suggestionYes (see Connector safety below)Pro and Business
gradethread_end_listingEnd one live listingYes (see Connector safety below)Pro and Business
gradethread_end_listingsEnd several live listingsYes (see Connector safety below)Pro and Business
gradethread_extension_queueSee what the seller's browser still has to doNo, it only readsPro and Business
gradethread_get_batchCheck a grading batchNo, it only readsPro and Business
gradethread_get_gradeGet a grade reportNo, it only readsPro and Business
gradethread_get_itemGet one inventory itemNo, it only readsPro and Business
gradethread_grade_batchSubmit several items for gradingYes (see Connector safety below)Pro and Business
gradethread_grade_itemSubmit one item for gradingYes (see Connector safety below)Pro and Business
gradethread_grading_readinessCheck whether items can be gradedNo, it only readsPro and Business
gradethread_list_gradesList grading submissionsNo, it only readsPro and Business
gradethread_list_itemsList inventory itemsNo, it only readsPro and Business
gradethread_list_listingsList marketplace listingsNo, it only readsPro and Business
gradethread_list_salesList completed salesNo, it only readsPro and Business
gradethread_price_guideLook up the GradeThread price guideNo, it only readsPro and Business
gradethread_price_suggestionsPrice suggestions waiting for a decisionNo, it only readsPro and Business
gradethread_publish_listingPublish a listing to eBayYes (see Connector safety below)Pro and Business
gradethread_queue_extension_workQueue cross-listing work for the seller's browserYes (see Connector safety below)Pro and Business
gradethread_relistRelist a sold-out listingYes (see Connector safety below)Pro and Business
gradethread_reprice_applyApply new prices to live listingsYes (see Connector safety below)Pro and Business
gradethread_reprice_previewSee what a reprice would doNo, it only readsPro and Business
gradethread_sandbox_gradeTry grading on sample dataNo, it only readsEvery plan
gradethread_sandbox_price_guideTry the price guide on sample dataNo, it only readsEvery plan
gradethread_sandbox_publishPreview a publish on sample dataNo, it only readsEvery plan
gradethread_update_draftEdit an unpublished draft listingYes (see Connector safety below)Pro and Business
gradethread_usageCheck API usage and remaining quotaNo, it only readsPro and Business
gradethread_verify_certificateVerify a GradeThread certificateNo, it only readsEvery plan

Connector safety

Nothing that costs money or reaches a marketplace happens on one call. Grading, publishing, repricing, ending and relisting all preview first and then need a confirmation that is tied to the exact items and prices you were shown. If the price moves between the preview and the confirmation, the confirmation stops being valid and Claude has to show you the new one.

On Claude clients that support it, you are also asked directly: a prompt with a yes-or-no, not a message from Claude saying it asked you.

What it can spend. Grading uses your grading credits. Writing drafts uses one AI action per item. Publishing and repricing cost nothing themselves, but they change what buyers pay. Everything else is free to run.

The caps, which apply even when you confirm. Per hour: 20 publishes, 50 price changes, 20 listings ended. Per day: 200 grades. Per month: your plan's connector actions. And a price move over 25%, or below an item's cost basis, is refused outright. A confirmation is not a safety net for an arithmetic error.

Turning it off. Settings → API keys lists every connected application. Disconnecting one stops it immediately, not at the end of an hour, and not at the end of a session.

Every call is recorded. Each tool call is written to an audit log with the tool, the items it touched, whether it succeeded and why it was refused if it was. It is kept for 400 days. Ask support for your account's log if you ever need to reconstruct what happened.

Pricing

Sandbox keys are free on every plan. Live API access, white-label embeds, and the developer dashboard are included in the Business plan ($99/mo). Grading is billed per grade via credits on top — see the pricing page for credit packs and per-grade tiers.

Build with the grading standard

Build against the sandbox with a free key on any plan, then ship standardized condition grading with a Business live key.

Start Grading Free

Every endpoint, parameter, error code and webhook payload: the OpenAPI reference.