Quickstart: classify your first product
Get a key, paste it in $CLEO_API_KEY, send one curl, and read back an HS code with the notes behind it. Then send your catalogue as a batch.
1. Get an API key
Sign up, then create a key in the dashboard. New accounts start on the Sandbox: 200 units, no card. The key is shown once; copy it then.
2. Paste it in $CLEO_API_KEY
3. Classify one product
A men's knitted cotton T-shirt shipped to France, with the facts a broker would ask for. It costs 1 unit (1 + the number of kit components).
In this capture the answer is ambiguous: the French national line 61091000 (cn8) and the HS6 row 610910 lead, each with verbatim notes as evidence. Your own call can return a different status, order or confidence; provenance says which model answered and why the gate held. Send "system": "cn8" when you want the national line.
| data.status | For example classified, needs_information, needs_review or ambiguous; the reference lists every value. needs_information comes with missing_attributes and questions to ask your supplier. |
| data.candidates[] | code, system (hs6, cn8, hts…), confidence, and set_aside_reason when a candidate was ranked below another. |
| data.candidates[].evidence[] | Verbatim excerpts of the notes behind the candidate, each with ref, url and source_version. |
| data.coverage | Whether the destination answers at the national line (level: national, national_systems: ["cn8"]) or at HS6 only. |
| data.provenance | The acceptance policy used for classified and whether the notes index was available. |
| advisory_disclaimer | A top-level string on every classification response. Show it verbatim next to any recommendation. |
A bare description with no facts comes back needs_information with the questions to ask. The customs guide shows it, with kits, dossiers and code validity.
4. Your first catalogue batch
Send up to 2,000 items in one request. The answer is a job id (202); poll it, then download the items as CSV. Replaying the same Idempotency-Key within 24 h returns the same job and is not charged again. Units: the sum over items of min(1 + components, 11), so 2 units here.
Webhooks classification_batch.completed and .failed tell you when the job ends: see Classify a whole catalog.
5. Legal data
The same key reads the legal corpus: search regulations, fetch a document, follow changes.
6. Pick your integration surface
REST works everywhere; every operation is in the API reference. The TypeScript SDK and the MCP server sit on the same key. When the Sandbox runs out, pick a plan.