# /match-products

Our **/match-products** endpoint matches two products based on the text provided, using the selected AI model.

#### Required Parameters:

* <mark style="background-color:red;">product\_left</mark>: string. required. Provide a JSON object of your supplier product with key value pairs such as {'title':'value'}. You must define the product title under the 'title' key. You can specify familiar or unfamiliar keys. Familiar keys such as 'code', 'brand', 'description', and 'price' will be added under their own key value pair. Do not use the 'id' key for product\_left. All other key value pairs will be added to the 'description' key value pair. See [Product Field](https://theproductllm-com.gitbook.io/docs/topics/product-field) for specific&#x73;**.**
* <mark style="background-color:red;">product\_right</mark>: string. required. Provide a JSON object of a potential matching product, with the same key value pair options as product\_left, plus 'id' for the listing id, if available. See [Product Field](https://theproductllm-com.gitbook.io/docs/topics/product-field), including tip&#x73;**.**

#### Optional Parameters: &#x20;

* <mark style="background-color:red;">model</mark>: string. There is currently only one model available, 'theproductllm-mini,' because larger models are not achieving enough benefit over their cost. Defaults to theproductllm-mini.
* <mark style="background-color:red;">cleaning\_pipeline</mark>: string. If your product data is from a source that requires custom cleaning, you can specify your cleaning pipeline here. For example, the Amazon API catalog responses contain many tokens and we've selected the best attributes to keep. To use this cleaning pipeline, specify "amazon\_api\_catalog\_item". Current cleaning pipeline options:
  * "amazon\_api\_catalog\_item:" To use this, make sure the Amazon catalog item payload is in the description field as a JSON object. "summaries," "attributes," and "identifiers" should be available in the first level of JSON keys

&#x20;

```python
import requests
response = requests.post(
    "https://api.theproductllm.com/search-products",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "product_left": {
            "title":"This is a product title", 
            "description":"This is a product description"
        }
        "product_right": {
            "title": "This is a product title",
            "description": "This is a product description",
            "id":"B0053XNKFQ"
        }
    }
)
print(response.json())

```

#### Response:

```
{
    "match": "yes/no",
    "certainty": "medium",
    "tokens": 1,
    "usage": <Usage Object>
    "cost": 0.000112
}
```

<details>

<summary>Tier 1 Costs and Limits</summary>

The following costs are for our highest volume service provider customers.

| Search             | Cost             | Rate Limit             |
| ------------------ | ---------------- | ---------------------- |
| theproductllm-mini | $0.26 / M Tokens | 100 queries per second |

Contact us to increase your rate limit.

</details>

<details>

<summary>Tier 2 Costs and Limits</summary>

The following costs are for low-to-medium-high volume customers.

| Search             | Cost            | Results               |
| ------------------ | --------------- | --------------------- |
| theproductllm-mini | $0.5 / M Tokens | 10 queries per second |

</details>
