Skip to content

Commit

Permalink
Merge branch master into prod
Browse files Browse the repository at this point in the history
* master:
  Add AI docs
  • Loading branch information
lachesis committed Dec 4, 2024
2 parents c6c0667 + 37d85fc commit 197e0c1
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
64 changes: 64 additions & 0 deletions source/includes/_ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# AI Routes

Zinc provides API endpoints optimized for use with LLM tool-calling and
langchain. Responses from these endpoints are intended to be passed directly to
LLMs or intelligent agents. These endpoints are still under development, and their
exact response formats are subject to change. If you need a consistent response
format, consider the traditional API endpoints. These are optimized for AI.

All of these routes can accept a retailer parameter. If retailer is omitted,
these routes assume `amazon` i.e. Amazon.com US.

## Product Search

> Example AI product search request
```shell
curl https://api.zinc.io/v1/ai/search?query=harry+potter&limit=8 \
-u <client_token>:
```

Returns a simplified JSON list of search results, with up to `limit` results,
at most one page. If further pages are required, make further calls, providing
the `page` query parameter.


## Product Details

> Example AI product details request
```shell
curl https://api.zinc.io/v1/ai/products/0923568964/details \
-u <client_token>:
```

Returns the same values as the typical product details endpoint, but with some
irrelevant information omitted to decrease token count, saving money and
context length for other uses.


## Product Variants

> Example AI product variants request
```shell
curl https://api.zinc.io/v1/ai/products/B0CF9G946H/variants \
-u <client_token>:
```

Returns a list of all variants available for a product with their specific
`product_id` values.


## Product Offers

> Example AI product offers request
```shell
curl https://api.zinc.io/v1/ai/products/0923568964/offers \
-u <client_token>:
```

Returns the same values as the typical product offers endpoint, but with some
irrelevant information omitted to decrease token count, saving money and
context length for other uses.
1 change: 1 addition & 0 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ includes:
- cancellations
- returns
- products
- ai
- addax
- proxies
- object_reference
Expand Down

0 comments on commit 197e0c1

Please sign in to comment.