Predict
Predict the pricing of a product based on specified attributes.
/price/predictExample
curl --request POST \
--url https://api.bencha.io/v1/price/predict \
--header 'Authorization: Bearer {api_key}' \
--header 'content-type: application/json' \
--data '{
"query": {
"brand": "newbie",
"category": "tops",
"target": "mixed"
}
}'Body
Query attributes
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
brand | string | No | - | Brand name or identifier |
category | string | No | - | Category name or identifier |
material | [string] | No | - | The condition of the product. |
condition | string | No | - | The condition of the product. |
demography | string | No | - | The targeted demographic. |
target | string | No | - | The pricing target. |
method | string | No | - | The pricing method used. |
status | string | No | - | The listing status of the item. |
reference | string | No | - | Optional ID or label used to link a related item from any system. |
Brand and category
If an identifier is provided for the brand or category, it will be used
directly in the prediction. If not, the API will perform a search based on the
provided brand or category name through the /search/brands or
/search/categories endpoints.
Material
Defines the composition or fabric type of the item. Each material affects the product’s perceived quality, durability, and price estimation.
The order of materials in the material array is important — list materials from the most dominant or primary component to the least significant one.
For best accuracy, generally provide at most one or two materials in the query.
| Material | Description |
|---|---|
acetate | Smooth, shiny synthetic fiber often used in linings. |
acrylic | Synthetic fiber resembling wool, lightweight and warm. |
amber | Fossilized tree resin used as gemstone. |
bamboo | Sustainable natural fiber, soft and breathable. |
brass | Yellowish metal alloy of copper and zinc. |
bronze | Brownish metal alloy of copper and tin. |
cast_iron | Heavy, durable iron alloy. |
ceramic | Hard, non-metallic material fired for strength. |
copper | Reddish-brown metal with decorative appeal. |
corduroy | Ribbed cotton or blended fabric. |
cotton | Breathable and versatile natural fiber. |
cotton_organic | Eco-friendly cotton grown without synthetic chemicals. |
crochet | Open-textured material made with looped yarn. |
crystal | Transparent, cut glass or mineral. |
cupro | Regenerated cellulose fiber similar to silk. |
denim | Durable cotton twill fabric, typically blue. |
down | Soft feathers used for insulation. |
elastane | Synthetic fiber with excellent elasticity (e.g., spandex). |
feather_ostrich | Decorative plume from ostrich feathers. |
fleece | Soft, warm synthetic fabric. |
frotte | Fabric with looped piles, such as terrycloth. |
faux_fur | Synthetic imitation of animal fur. |
faux_leather | Artificial alternative to real leather. |
faux_suede | Synthetic imitation of suede leather. |
fur | Natural animal fur material. |
fur_fox | Dense, warm fur from foxes. |
fur_mink | Luxurious, silky fur from mink. |
fur_rabbit | Soft fur from rabbits, lightweight. |
glass | Transparent or translucent hard material. |
gold | Precious metal valued for color and luster. |
gold_plated | Base metal coated with a thin layer of gold. |
gold_rose | Alloy of gold with a reddish hue. |
gold_white | Alloy of gold with a silvery tone. |
gore_tex | Waterproof, breathable fabric for performance wear. |
hemp | Strong natural fiber with eco-friendly properties. |
iron | Strong, magnetic metal used structurally or decoratively. |
jade | Hard green gemstone. |
knit | Fabric made with interlaced yarns, providing stretch. |
lace | Openwork fabric created from thread. |
leather | Durable natural material made from animal hide. |
linen | Natural fiber made from flax, breathable and lightweight. |
lyocell | Sustainable cellulose-based fiber, smooth and breathable. |
marble | Natural stone with characteristic veining, used as a decorative surface. |
metal | General metallic composition used in hardware or structure. |
micro_modal | Ultra-soft variant of modal fiber. |
modal | Cellulose fiber known for softness and moisture absorption. |
nylon | Synthetic fiber known for its toughness, elasticity, and resistance to wear. |
palladium | Rare precious metal, silvery in color. |
pearl | Natural or cultured formation used in jewelry. |
plastic | Lightweight synthetic material used in hardware or accessories. |
platinum | Precious silver-white metal used in fine jewelry. |
plexiglas | Transparent acrylic plastic. |
polyester | Widely-used synthetic fiber, durable and wrinkle-resistant. |
polyamide | Durable synthetic fabric with elasticity (e.g., nylon). |
polyurethane | Flexible polymer material used in coatings and imitation leathers. |
porcelain | Fine ceramic material used for decorative or functional items. |
rubber | Elastic natural or synthetic material. |
sequins | Decorative plastic disks sewn on fabric. |
silk | Luxurious, natural protein fiber with smooth texture. |
silver | Precious metal used for jewelry and accessories. |
silicone | Flexible, rubber-like synthetic material. |
sponge | Soft, porous material used for cleaning or absorption. |
spandex | Elastic synthetic fiber providing stretch and flexibility. |
steel | Hard metal used in accessories or structure. |
stoneware | Durable ceramic used for tableware or art. |
suede | Soft, brushed leather finish. |
tin | Soft, silvery metal often used in alloys. |
titanium | Lightweight, strong, corrosion-resistant metal. |
velvet | Soft fabric with dense pile and rich appearance. |
velour | Plush fabric similar to velvet with stretch. |
vinyl | Flexible synthetic plastic used for coatings and accessories. |
viscose | Semi-synthetic fiber with a silk-like texture. |
wicker | Material made from woven plant fibers. |
wood | Natural renewable material used for structure or accents. |
wood_mahogany | Reddish-brown hardwood known for its luxury finish. |
wood_oak | Strong hardwood often used in furniture. |
wood_teak | Dense, durable hardwood with natural oils. |
wool | Natural warm fiber from sheep, often blended. |
wool_alpaca | Soft luxury wool from alpacas, lightweight and insulating. |
wool_angora | Extremely soft fiber from angora rabbits. |
wool_blend | Wool combined with other fibers for strength or comfort. |
wool_cashmere | High-end soft wool from cashmere goats. |
wool_lamb | Soft wool from young sheep. |
wool_merino | Soft, breathable wool from merino sheep. |
wool_mohair | Glossy fiber from the Angora goat, durable and warm. |
wool_pashmina | Fine variant of cashmere with silky texture. |
wool_yak | Warm natural fiber derived from yak hair. |
Condition
The condition of an item is often highly subjective, and different sellers or
buyers may evaluate it differently. This subjectivity can have an adverse
effect on the pricing, as it may lead to misalignment between the perceived
and actual condition of the product. If you are unsure about the condition,
take a look at fill_mode for more general values.
Condition values high and low are only available when using spot-2-turbo
model.
Defines the state or quality of the product being priced. You can select from the following options (best to worse):
| Condition | Description |
|---|---|
high | Represents top-tier conditions |
low | Represents lower-tier conditions good, fair and poor, indicating signs of use and potential functional degradation. |
pristine | Unused, in brand-new condition. |
mint | Like new, with no visible defects or signs of use. |
near_mint | Almost new, with very minor signs of wear. |
excellent | Almost perfect condition, minimal signs of use. |
very_good | Lightly used, with minor wear and tear. |
good | Regular signs of wear, but overall functional and intact. |
fair | Noticeable wear but still functional. |
poor | Heavily used, with significant signs of wear and tear. |
Demography
Indicates the target demographic for the product. Choose from:
| Demography | Description |
|---|---|
women | Designed for women. |
men | Designed for men. |
unisex | Suitable for all genders. |
boys | Targeted towards boys. |
girls | Targeted towards girls. |
children | Suitable for all children. |
Target
Specifies the pricing segment you’re aiming for in your predictions. Select from the following:
| Target | Description |
|---|---|
affordable | Priced for affordability, focusing on lower-range estimates. |
mixed | A balanced approach between affordable and premium pricing, providing moderate estimates. |
premium | High-end pricing for luxury or exclusive items, reflecting higher potential outcomes. |
For more information on how these targets relate to data handling, refer to the fill_mode section.
Method
Describes the sales method used for the product:
| Method | Description |
|---|---|
consignment | Products being sold through consignment. |
p2p | Products being sold on peer-to-peer marketplaces. |
Status
Represents the listing status of the product:
| Status | Description |
|---|---|
listed | Products currently listed for sale. |
sold | Products that have been sold. |
Reference
An optional identifier used to reference a related item or entity from either an internal or external system. This field may be used to assist in matching, linking, or influencing price prediction. It can be any recognizable string such as an ID, code, or label.
Additional Parameters
Currency
All prices are in EUR and will be converted to the provided currency using the latest exchange rates, updated atleast every 12 hours.
Specifies the currency in which the predicted price will be returned. The value should be a valid ISO 4217 currency code, e.g. "SEK" for Swedish Krona.
Model
The model parameter specifies the model to be used for generating price predictions. Select from one of our various pre-trained models tailored for different scenarios or datasets.
Selectable Models:
| Model Name | Description |
|---|---|
spot-1-turbo | A quick model designed for fast predictions, ideal for real-time applications. |
spot-2-turbo | An updated version of spot-1-turbo, offering improved performance and accuracy for most use cases. |
spot-3-turbo | The latest iteration of the model, featuring wider brand support and material input capabilities |
Formatting
Formatting controls how numeric values are presented in responses, ensuring consistency and precision. It allows precise control over the number of fraction digits displayed and the rounding behavior applied. By configuring min_fraction_digits and max_fraction_digits, you can enforce consistent precision, while rounding_increment and rounding_mode determine how values are rounded to generate specific price points.
Fraction digits
Specifies the minimum and maximum number of fraction digits in the response. By default, it uses the selected currency’s minor unit digits.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
min_fraction_digits | int | No | Selected currency’s minor unit digits (ISO 4217 (opens in a new tab)) | Minimum number of fraction digits to display |
max_fraction_digits | int | No | Selected currency’s minor unit digits (ISO 4217 (opens in a new tab)) | Maximum number of fraction digits to display |
Rounding
Specifies how numeric values should be rounded. rounding_increment controls the rounding step size, rounding_targets optionally specifies target minor-unit values to round to, and rounding_mode determines the rounding method. When rounding_targets is provided, numbers are rounded to the nearest target value instead of the standard increment.
All rounding increments and targets are applied in minor units. For example,
if currency is USD, an increment of 50 rounds to the nearest 50 cents.
When using rounding_targets, only the smallest target values for each base are applied.
For example, if rounding_targets = [99, 49, 199, 1199], only 49 and 99 will be considered when rounding.
Example #1
Rounds numbers to the nearest multiple of 50 cents, rounding up.
• Input: 12.37 → Output: 12.50
• Input: 12.82 → Output: 13.00
{
"rounding_increment": 50,
"rounding_mode": "ceil"
}Example #2
Rounds numbers to the nearest value in rounding_targets.
• Input: 12.37 → Output: 12.49
• Input: 12.82 → Output: 12.99
• Input: 7.50 → Output: 7.49
{
"rounding_targets": [49, 99]
}Example #3
Rounds numbers to the nearest value in rounding_targets.
• Input: 123 → Output: 145
• Input: 188 → Output: 195
{
"rounding_targets": [4500, 9500]
}| Field | Type | Required | Default | Description |
|---|---|---|---|---|
rounding_increment | int | No | 1 | The step size to round numbers to, in minor units (e.g., 5 for rounding to the nearest 5 cents). |
rounding_targets | [int] | No | - | Optional target minor-unit value(s) to round to (e.g., 49, 99). If provided, numbers are rounded to the nearest target. |
rounding_mode | string | No | auto | The method used for rounding when rounding_increment is applied. Options: auto, floor, ceil. |
| Rounding mode | Description |
|---|---|
auto | Standard rounding according to typical numeric rules (round halves up). |
ceil | Rounds up to the nearest multiple of rounding_increment. |
floor | Rounds down to the nearest multiple of rounding_increment. |
Fine Tuning
Fine-tuning allows customization to the behavior of the model, ensuring that it aligns more closely with specific use cases or market conditions. By adjusting certain parameters, you can enhance the model’s performance, leading to more accurate and reliable predictions.
Fill Mode
Choosing the right fill mode affects how the model interprets and predicts based on incomplete data, so it is important to select the option that best fits your application needs.
The fill mode parameter determines how the model handles missing or undesirable values during the prediction process. The default value is mixed and the available options are:
| Fill Mode | Description |
|---|---|
premium | Fills missing values with estimates that reflect higher potential outcomes. Suitable for more optimistic scenarios. |
mixed | Uses a balanced approach to fill missing values, providing an estimate that represents an average outcome. |
affordable | Fills missing values with lower-range estimates. Designed for situations where quick predictions and cost-effectiveness are prioritized. |
Tolerance
The tolerance parameter is only available when using the spot-2-turbo
model.
The tolerance parameter controls the level of adaptability in the model’s suggestions. It determines how much the model can adjust to the input data, offering flexibility for different use cases.
| Tolerance | Description |
|---|---|
high | The model applies significant adjustments. |
medium | The model applies moderate adjustments. |
low (default) | The model makes minimal adjustments. |
Biases
The biases parameters allows for adjustment to the model’s predictions, helping to mitigate the impact of possible outliers or skewed data distributions.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
bias_correction_factor | number | No | 0.5 | The factor at which to impact the prediction (0-1). A smaller value means smaller impact on the prediction, and vice versa. |
bias_correction_threshold | number | No | 0.95 | Predictions below this threshold will be adjusted (0-1). |