Static Categorization
Static categorization focuses on metadata related tasks such as generation and extraction. The baseline endpoints use just product title and description to perform tasks that improve your product metadata quality.
Fine-tuning the static categorization models allow you to automate new metadata tasks with the same product information inputs.
Single instance API runs a single product action through the Pumice.ai endpoints.
API information for single instance static categorization endpoint:
import requestsimport jsonurl = 'https://app.pumice.ai/api/categorize-products'payload = { "data":{ "title": "Pink shoes", "description": 'Pink shoes that I can wear' }, "run_type":"static", "model_id":"m"}headers = {'KEY': '<YOUR_API_KEY>','Content-Type': 'application/json'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
Route
https://app.pumice.ai/api/categorize-product
Return
This endpoint returns a json payload. Please note the containing brackets are a part of the output.
{ "product_categories": { "categories": [ "Shoes", "Pink Shoes" ], "tags": [ "shoes", "pink shoes" ] }, "credits": { "bought": 1340, "spent": 68, "left": 1272 }}
Required Headers
API key and content type are required.
{'KEY': '<YOUR_API_KEY>','Content-Type': 'application/json'}
data
Data filed contains a payload of product data for categorization. Currently the only required fields for static categorization are "title" and "description". This field is required. If you are using a fine-tuned instance that does not use title and description please leave the unused field empty.
Type: dict
Default: None
Example Data Payload:
{ "data":{ "title": "Pink shoes", "description": "Pink" }, "run_type":"static", "model_id":"extract_metadata"}
run_type
Choose which categorization endpoint you want to use. Options are static and dynamic.
Type: string
Default: None
model_id
Id used to access your fine-tuned model or any fine-tuned models available across plans. If you are a fine-tuned or enterprise user and do not know your model_id please reach out to support. Model_id is case sensitive.
Type: string
Default: None