Skip to main content

Using Postman with Clarifai APIs

This page explains how to use Postman to perform some API calls to Clarifai by showing the actions available within the Clarifai platform. You can use Postman to make a wide variety of GET, POST, PATCH, and DELETE calls.

With Postman, you can use, hit, or test the Clarifai API without the need to use the Portal or call the endpoints programmatically. Postman also allows you to make API calls and generate code snippets in your favorite programming language. You can use the snippets to make REST requests to the Clarifai API.

This page will hopefully get you set up and somewhat familiar with using Postman to make requests to the Clarifai platform. After learning how to use Postman to make calls to Clarifai, you can make other requests by referring to the REST examples throughout this documentation.

Prerequisites

  • An active Clarifai account
  • Basic knowledge of an API structure and JSON formatting

Postman Basics

By clicking the Send button , you can receive the response for a particular request you created or selected from the collection.

Alt text

Getting Started

Follow the steps below to start using Postman with Clarifai APIs.

Step 1: Fork Your Postman Collection

Click the button below to fork the Clarifai Postman collection to your workspace.


Run in Postman

Step 2: Get Your PAT Token

Obtain your PAT by Logging into Portal → Profile Icon → Security Settings → Create Personal Access Token → Set the scopes → Confirm.

  • Visit this link to create Clarifai account.

  • Learn how to get your PAT here.

Step 3: Set up Authorization

Postman allows users to setup authorization in a parental level for each collection so that you dont have to add it to the headers of each request individually. To set this feature go to Authorization tab of the collection and set the values as shown below.

Alt text

Step 4: Create Your Postman Environment

Set up environment in your personal workspace.

Click on the eye icon placed on the right panel to view the environment. Click the Add button to create a new environment.

Alt text

Step 5: Add Variables to Postman Environment

Add the following variables to the new environment to start making API calls.

Alt text

The values for variable can be set as following:

Step 6: Test Clarifai API for SUCCESS!

To test if its working , select Applications collection. From that select Create Application (Universal) request and hit Send. You will get the following response body if all the steps have been done correctly.

Alt text