Prediction Endpoints
A prediction endpoint is an API endpoint that receives an input and returns a prediction with a confidence score.
Unlike a static model that is trained once and never changes, a Nyckel prediction endpoint can improve over time as your application provides feedback.
How it works
When you send an input to a prediction endpoint, Nyckel runs it through the current model and returns:
- A label — the predicted category
- A confidence score — a number between 0 and 1 indicating how certain the prediction is
{
"labelName": "Spam",
"confidence": 0.94
}
Your application uses the label to make a decision and can use the confidence score to decide how to act — for example, routing low-confidence predictions to a human review queue.
Prediction endpoints accept image, text, or tabular inputs. See Functions for the per-type details, or Developer Platform → Function types for the request/response schemas.
Pretrained vs custom
You can create a prediction endpoint in two ways:
- Pretrained classifiers — Ready to use immediately, trained on broad categories (object detection, sentiment, language, etc.)
- Custom functions — Trained on your own labeled examples, scoped to your specific task
Both work the same way from your application’s perspective: send an input, get a prediction back.
Why not a static model?
Static models are fixed after training. If your data changes — new products, new categories, new edge cases — the model goes stale and accuracy degrades.
A Nyckel prediction endpoint is designed to receive feedback. As you annotate predictions, correct mistakes, and add new samples, the endpoint retrains automatically and gets better without any infrastructure work on your part.