Invoke Predictions
With your function created and labels defined, you can invoke predictions immediately — even before adding training data. The endpoint is live; the zero-shot model serves until you’ve reviewed enough examples for a private model to train and take over.
Invoke from the console
Open your function and go to the Invoke tab. Paste an input, or upload an image, and click Invoke.
You’ll see a response that looks like this:
{
"labelName": "Refund request",
"confidence": 0.91,
"sampleId": "smp_abc123"
}
Three fields:
labelName— the predicted label, drawn from the set you defined.confidence— a number between 0 and 1 representing how sure the model is. Use this in your application to decide whether to act on the prediction automatically or hand it to a human.sampleId— a unique identifier for this specific invocation. You’ll see it in the review queue, and you can reference it from API annotation calls later.
Try a handful of inputs in the console. Real ones, not idealized ones — paste in actual messages, real photos, real form rows. The point of this stage is to get a feel for how the function behaves on your data before you write any application code.
Invoke from the API
Open your function and click the Integrate tab. It shows the exact endpoint URL, a ready-to-copy access token, and language-specific code snippets.
The request shape:
POST https://www.nyckel.com/v1/functions/{functionId}/invoke
Authorization: Bearer {your_access_token}
Content-Type: application/json
{
"data": "your input here"
}
For image functions, data can be a URL or a base64-encoded image. The Integrate tab has the exact snippet for your input type.
The response is identical to what you see in the console — same labelName, confidence, and sampleId.
{
"labelName": "Refund request",
"confidence": 0.91,
"sampleId": "smp_abc123"
}
Reading confidence
Confidence is the single most useful field in the response, and the most commonly misunderstood. A few rules of thumb:
- High confidence (typically >0.9) — act on the prediction automatically.
- Mid confidence — route to a fallback path or to human review.
- Low confidence (typically <0.5) — the model isn’t sure; treat the prediction as a hint, not an answer.
The right thresholds for your application depend on the cost of acting wrongly vs. the cost of holding things for review. The dedicated Tuning Confidence Thresholds guide walks through how to pick numbers.
For now, just know: every prediction comes with a number that tells you how much to trust it.
Where invocations go
Every invocation — console or API — is captured in the function’s review queue with its sampleId. The next step is to start reviewing those predictions and turning them into training data.
What you just did
| Step | What happened |
|---|---|
| Invoked from the console | Got real predictions on real inputs |
| Invoked from the API | Got the same predictions over HTTP for your application |
| Saw confidence | Started reasoning about how much to trust each prediction |
Next
Review and Improve Predictions — turn invocations into training data and watch your private model take over.