Skip to main content

Clarifai

Clarifai is an AI platform for computer vision, natural language processing, and generative AI, offering image and video recognition, model training, and workflow orchestration. Its REST API lets you manage applications, inputs, annotations, and bulk operations programmatically so you can build, label, and search datasets at scale.

Clarifai icon

Power end-to-end data operations for your Clarifai API with Nexla. Our bi-directional Clarifai connector is purpose-built for Clarifai, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Clarifai or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Clarifai workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Clarifai authenticates API requests with a Personal Access Token (PAT). A PAT represents your Clarifai user account rather than a single application, so most requests are scoped by pairing the token with a user ID and an application ID.

To obtain a Personal Access Token, follow these steps:

  1. Sign in to the Clarifai platform with your account credentials. A default PAT is created automatically when you first create a Clarifai account.

  2. In the collapsible left sidebar, click Settings, then select Secrets from the dropdown list.

  3. On the Secrets page, click Create Personal Access Token.

  4. Enter a short description for the token, select the scopes that the token should be granted, and click Create Personal Access Token.

  5. Copy the generated token and store it securely, as it grants access to your Clarifai account and should be treated as sensitive information.

You will also need your Clarifai user ID and the application ID of the app you want to work with. Both are available in the Clarifai platform under your account and application settings. The Personal Access Token is sent in the Authorization request header using the format Key YOUR_PERSONAL_ACCESS_TOKEN. For complete details, see the Clarifai API overview and the Personal Access Tokens guide.

Authenticate

The Clarifai connector uses a No Authentication credential template, so there are no secret fields to store in the Nexla credential itself. You still create a credential so it can be attached to a data flow; the token that Clarifai requires (an Authorization header in the form Key YOUR_PERSONAL_ACCESS_TOKEN) is supplied when you configure the endpoint or through the Connect to Any API advanced flow.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

    Because this connector uses the No Authentication template, the Clarifai Personal Access Token is not stored in the credential. Add the required Authorization request header (in the format Key YOUR_PERSONAL_ACCESS_TOKEN) when configuring the source or destination endpoint. For details on Clarifai authentication, see the Clarifai Personal Access Tokens guide.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Clarifai connector tile, then select the credential that will be used to connect to Clarifai, and click Next; or, create a new Clarifai credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Clarifai endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

List annotation filters

Retrieves all annotation filters defined in a Clarifai application. Use this endpoint to review the saved filters that scope which annotations are returned for a given app.

  • Optionally supply the User App Id.User Id and User App Id.App Id query parameters to scope the request to a specific Clarifai user and application.
  • Optionally set the Page and Per Page query parameters to page through large result sets.

Get an annotation filter

Retrieves a single annotation filter by its identifier. Use this endpoint when you need the details of one specific filter rather than the full list.

  • Enter the Annotation Filter Id path parameter to identify the filter to retrieve.
  • Optionally supply the User App Id.User Id and User App Id.App Id query parameters to scope the request to a specific Clarifai user and application.

List annotations

Retrieves annotations from a Clarifai application, with rich filtering options for pulling exactly the labels you need. Use this endpoint to export human or model-generated annotations for analysis, review, or downstream training.

  • Optionally supply the User App Id.User Id and User App Id.App Id query parameters to scope the request to a specific Clarifai user and application.
  • Optionally narrow results with the Ids, Input Ids, User Ids, Model Version Ids, Workflow Version Ids, and Task Id query parameters.
  • Optionally set List All Annotations and Return Model Output to control which annotations are included and whether model output is returned.
  • Optionally set the Page and Per Page query parameters to page through large result sets.

Search annotations

Executes a search over annotations in a Clarifai application. Use this endpoint to run structured queries against your annotation data and return only the records that match your search criteria.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Searches body parameter to define the search query, and the Pagination body parameter to control how results are paged.

Patch saved annotation searches

Updates saved annotation searches by their identifiers. Use this endpoint to modify previously stored searches in a Clarifai application.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Searches body parameter identifying the saved searches to update, and the Action body parameter describing the change to apply.

List annotation workers

Lists the users, models, and workflows (collectively known as "workers") that have added annotations to a Clarifai application. Use this endpoint to see which contributors have labeled data in your app.

  • Optionally supply the User App Id.User Id and User App Id.App Id query parameters to scope the request to a specific Clarifai user and application.
  • Optionally set the Additional Fields and Trusted Only query parameters to control the fields returned and to limit results to trusted workers.
  • Optionally set the Page and Per Page query parameters to page through large result sets.

Get an app

Retrieves a specific Clarifai application. Use this endpoint to read the configuration and metadata of a single app.

  • Optionally supply the User App Id.User Id and User App Id.App Id query parameters to identify the user and application to retrieve.
  • Optionally set the Additional Fields query parameter to control which fields are returned.

List apps

Retrieves all Clarifai applications accessible to your account. Use this endpoint to enumerate the apps available under a given user.

  • Optionally supply the User App Id.User Id query parameter to scope the request to a specific Clarifai user.

List bulk operations

Lists the bulk operations in a Clarifai application. Use this endpoint to monitor the status and history of asynchronous bulk jobs.

  • Optionally supply query parameters to scope the request to a specific Clarifai user and application and to page through results.

Perform bulk operations

Performs bulk operations on a list of inputs based on an input source. Operations include add, update, and delete of concepts, metadata, and geo data. This is an asynchronous process; use the List bulk operations endpoint to check the status of a submitted job.

  • Supply the request body describing the inputs and the operations (add, update, or delete of concepts, metadata, or geo data) to apply.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Clarifai data sources can also be manually configured to ingest data from any valid Clarifai API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Clarifai data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the Clarifai destination, and select the Send to Destination option from the menu. Select the Clarifai connector from the list of available destination connectors, then select the credential that will be used to connect to Clarifai, and click Next; or, create a new Clarifai credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Clarifai endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Add annotation filters

Creates one or more annotation filters in a Clarifai application using records from a Nexset. Use this endpoint to programmatically add saved filters that scope annotation queries.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Annotation Filters body parameter describing the filters to add.

Patch annotation filters

Updates one or more existing annotation filters in a Clarifai application. Use this endpoint to modify saved filters based on data from your Nexla flows.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Annotation Filters body parameter identifying the filters to update, and the Action body parameter describing the change to apply.

Delete annotation filters

Deletes one or more annotation filters in a single request. Use this endpoint to remove saved filters that are no longer needed.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Annotation Filter Ids body parameter listing the filters to delete.

Post annotations

Creates annotations in a Clarifai application using records from a Nexset. Use this endpoint to add labels to inputs based on data from your Nexla flows.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Annotations body parameter describing the annotations to add.

Patch annotations

Updates one or more existing annotations in a Clarifai application. Use this endpoint to modify labels based on data from your Nexla flows.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Annotations body parameter identifying the annotations to update, the Action body parameter describing the change to apply, and the Delete If Empty Data body parameter to control removal of annotations that end up with no data.

Delete annotations

Deletes multiple annotations in one request. Use this endpoint to remove labels in bulk from a Clarifai application.

  • Supply the User App Id body parameter to scope the request to a specific Clarifai user and application.
  • Provide the Ids and Input Ids body parameters to identify the annotations to delete.

Upload data (streaming)

Uploads data through Clarifai's streaming endpoint. The request carries an upload_data field that can hold either the configuration for the upload or the actual data to upload. The configuration must be sent first, before the artifact bytes are uploaded.

  • Send the upload configuration first, then stream the artifact data, following the ordering required by the Clarifai streaming upload endpoint.

Cancel bulk operations

Cancels one or more in-progress bulk operations in a Clarifai application. Use this endpoint to stop asynchronous jobs that are no longer needed.

  • Supply the request body identifying the bulk operations to cancel.

Delete terminated bulk operations

Deletes one or more terminated bulk operations from a Clarifai application. Use this endpoint to clean up the records of completed or cancelled jobs.

  • Supply the request body identifying the terminated bulk operations to delete.

Post compute plane metrics

Posts compute plane metrics to Clarifai. Use this endpoint to send operational metrics from your compute plane to the Clarifai platform.

  • Supply the request body containing the compute plane metrics to report.

Manual configuration

Clarifai destinations can also be manually configured to send data to any valid Clarifai API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

Clarifai APIs expect JSON request bodies for these operations. Include the Clarifai Authorization header (in the format Key YOUR_PERSONAL_ACCESS_TOKEN) and the appropriate user and application identifiers when configuring the endpoint.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Clarifai endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Clarifai endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.