API v1 · stable

Developer
documentation

The Broker Genius API provides U.S. HTS (Harmonized Tariff Schedule) code classification for import/export items — text, images, or whole invoices in, 10-digit codes and PGA flags out.

BASE URLJSON · REST
POST https://api.brokergenius.ai/api/classify
POST https://api.brokergenius.ai/api/getbatch
10-digit
HTS PRECISION
Async
BATCH MODEL
Webhooks
COMPLETION EVENTS
01 · OVERVIEW

Asynchronous classification, built for batches

The API leverages advanced AI to accurately determine the proper 10-digit HTS code for product descriptions and identify any applicable Partner Government Agency (PGA) requirements.

It uses an asynchronous processing model: you submit a batch of items, receive a batch ID immediately, then retrieve the results once processing is complete. For large batches, provide a webhook URL to be notified when processing finishes.

STEP 01
Submit a batch
POST your items in one request.
STEP 02
Get a batch ID
Returned immediately, no waiting.
STEP 03
We classify
AI assigns HTS codes and PGA flags.
STEP 04
Retrieve or listen
Poll the batch, or receive a webhook.
02 · AUTHENTICATION

Bearer token on every request

All API requests must include an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Obtaining an API key

01Log in to your Broker Genius account
02Navigate to “Account Profile” in the top-right user menu
03Select the “API Keys” tab
04Use this key in all API requests in the Authorization header

For security, API keys should be kept confidential and never shared publicly. You can generate multiple keys for different applications or services, and revoke them individually if needed.

03 · ENDPOINTS

Three ways to submit

Our API offers multiple ways to classify your products using advanced AI. Choose the submission method that best suits your needs.

POST /api/classify Submit text →

Classify products based on their textual descriptions. Send a batch of product descriptions and our AI analyzes the text to determine the appropriate HTS codes, duty rates, and regulatory requirements.

EXAMPLE
"Women's knit cotton sweater with embroidered pattern, long sleeves, no hood, 100% cotton"
RESULT HTS 6110.20.2070 — Women's cotton sweaters, 16.5% duty rate
POST /api/classify-image Submit images →

Submit product images for HTS code identification — useful for items that are difficult to describe in text, or when you need confirmation based on visual characteristics.

EXAMPLE
{
  "item": [
    {
      "id": "prod123",
      "image_url": "https://example.com/products/leather-wallet.jpg"
    }
  ]
}
RESULT HTS 4202.31.0000 — Leather wallet, 8% duty rate
POST /api/xclassify-invoice Submit invoices →

Streamline classification for entire commercial invoices. Submitting PDF invoices automatically extracts and classifies multiple line items at once, while preserving quantities, pricing, and invoice structure.

EXAMPLE
{
  "item": [
    {
      "id": "inv456",
      "invoice_url": "https://example.com/invoices/office-supplies-invoice.pdf"
    }
  ]
}
RESULT Multiple items classified — Printer Paper (HTS 4802.55.2000), Sticky Notes (HTS 4820.10.2020), Office Chair (HTS 9401.99.9081)

Batch statuses

queuedBatch accepted and waiting for a processing slot.
processingItems are being classified. Partial results are not returned.
completedAll items classified. Results available on the batch endpoint.
failedBatch could not be processed. The error object explains why; no charge applies.

Try our customs automation tool for FREE!

No credit card required

Broker Genius offers flexible pricing plans tailored to meet various business needs. Our transparent pricing structure ensures predictable monthly cost, helping businesses to budget effectively.

Enjoy a free trial first
Book a demo

Book a customs automation demo with our team

Experience Broker Genius in action by scheduling a personalized demo. Our experts will walk you through the platform's powerful features, answering any questions and demonstrating how easily it integrates with your existing workflows.

PICK A TIME30 MIN · GOOGLE MEET · YOUR TIMEZONE
Loading available times…