Predict
Predict the pricing of a product based on specified attributes.
/price/predict
Example
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 |
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. |
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.
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. |
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. |
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 ). |