Skip to main content

Create Concepts

Learn how to create concepts within your app


Create via the UI

To create a new concept, head to your application's individual page and select the Inputs option in the collapsible left sidebar.

You'll be redirected to the Inputs-Manager page, where you can create new concepts and use them to complete various operations.

There are several ways to create concepts on the platform. Let's illustrate two of them:

  • Via the Labels section
  • Via the inputs uploader

Via the Labels Section

To create a new concept, go to the Labels section on the Inputs-Manager page and click the plus sign (+) next to the Select or add concepts search box. Then, type the new concept name in the search box.

The new name you've typed will appear underneath the search box. Click the Add new label button to create the concept.

The new concept will be successfully added to your app. You can follow the same process to create other concepts for your app.

Via the Inputs Uploader

You can also create new concepts when uploading inputs to your app. To do so, click the Upload Inputs button at the upper-right corner of the Inputs-Manager page.

The window that pops up allows you to upload your inputs — either by uploading them directly from your local device or by providing a publicly accessible URL.

In the Concepts section of the pop-up window, click the plus sign (+) next to the Select or add concepts search box. Then, type the new concept name in the search box.

The new name you've typed will appear underneath the search box. Click the Add new concept button to create the concept.

The new concept will be successfully added to your app.

You can also click the Upload inputs button at the bottom of the pop-up window to finalize uploading your input.

Create via the API

info

Before using the Python SDK, Node.js SDK, or any of our gRPC clients, ensure they are properly installed on your machine. Refer to their respective installation guides for instructions on how to install and initialize them.

Create Concepts

To create a new concept in your app, you POST the concept with an id and name. You can also post more than one concept in the same request by sending a list of concepts.

Below is an example of how to add concepts.

import os
from clarifai.client.app import App

# Set your Personal Access Token (PAT)
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

app = App(user_id="YOUR_USER_ID_HERE", app_id="YOUR_APP_ID_HERE")

app.create_concepts(concept_ids=["cat", "kitten", "animal"])
Raw Output Example
status {
code: SUCCESS
description: "Ok"
req_id: "9852fce206578f4bc5b6bed38f03eed8"
}
concepts {
id: "cat"
name: "Cat Name"
value: 1.0
created_at {
seconds: 1643890626
nanos: 775078265
}
language: "en"
app_id: "a39423543bb941bf9ba2ee95fad11f0a"
visibility {
gettable: PRIVATE
}
user_id: "ei2l2oz3s3iz"
}