Prebuilt Classification Functions

The fastest way to start using Nyckel is to call a function someone else has already built. Nyckel hosts dozens of prebuilt classification functions for common tasks — content moderation, sentiment, NSFW detection, document type, language identification, and more.

You don’t define labels, you don’t upload training data, you don’t wait for a model to train. You pick a function, you invoke it. Most prebuilt functions return useful results in under a second.

Time: 3–5 minutes from sign-in to first API call.

1. Pick a function

Browse the catalog at /pretrained-classifiers/. Each prebuilt function has its own page with:

Pick one that matches what you want to do. Some popular starting points:

If nothing in the catalog fits, you’ll need to create your own classification function instead.

2. Try it in the browser

Use the drag-and-drop box on the function’s page to test it on your own input — drop in an image or paste in text and you’ll see the predicted label and confidence right there. This is the moment to sanity-check whether the function actually fits your use case. Some questions worth asking:

If it looks like a good start, you’re ready to add it to your account. If not, create your own function instead.

3. Add it to your account

  1. Create a Nyckel account (or sign in to an existing one).
  2. From the prebuilt function’s page, add it to your own list of functions. It then shows up in your console like any function you built yourself.
  3. Open the function in the console and click Integrate to get the endpoint URL, an access token, and code snippets in your language.

4. Call it from your application

The request shape is the same as for any Nyckel function:

POST https://www.nyckel.com/v1/functions/{functionId}/invoke
Authorization: Bearer {your_access_token}
Content-Type: application/json

{
  "data": "I love this product, it's amazing!"
}

Response:

{
  "labelName": "Positive",
  "confidence": 0.96,
  "sampleId": "smp_xyz789"
}

Read labelName to route the input and confidence to decide whether to act automatically or hold the prediction for human review. The Tuning Confidence Thresholds guide covers how to pick that cutoff for your application.

5. What if it’s not quite right?

Two common situations:

The labels don’t match what you need. Create your own function with the labels you actually use — see Create Your Own Classification Function.

The labels match but accuracy is off on your data. You can clone a prebuilt function into your account and add your own training samples on top of it. The function keeps the prebuilt knowledge and adapts to your specific data distribution.

Next