skillfed

clarifai

clarifai v12.5.0 76.7K downloads/30d#14,594 on PyPI46
Permissive license Apache 2.0 Active released

What it is and what it does

Clarifai is the official Python SDK for Clarifai's AI platform, a service that provides pre-trained and custom machine learning models for both vision and language tasks. It wraps Clarifai's gRPC API (via clarifai-grpc and clarifai-protocol) and exposes high-level Python classes to manage datasets, models, workflows, and inference jobs. The SDK handles authentication via Personal Access Tokens, manages data upload and retrieval, orchestrates model training and deployment across compute clusters, and provides search and retrieval-augmented generation capabilities.

The package is designed for developers integrating AI capabilities into applications without building models from scratch. It abstracts away gRPC protocol details and provides a Pythonic interface for common tasks: uploading images or text, running predictions, training custom models, and composing multi-step workflows. With 22 runtime dependencies—including numpy for array handling, requests and aiohttp for HTTP communication, and openai for LLM integration—it is a feature-complete client for a managed AI platform.

Use it for:

  • Upload images to a Clarifai dataset and train a custom classification model for domain-specific recognition
  • Run batch predictions on image or text inputs using pre-trained models without managing infrastructure
  • Build multi-step workflows combining vision detection, segmentation, and NLP to process complex media
  • Implement semantic search over a dataset of images or documents using Clarifai's embedding models
  • Orchestrate model training and deployment across distributed compute clusters with automatic scaling

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Official Python client for Clarifai's AI platform, enabling computer vision tasks (classification, detection, segmentation) and natural language processing (classification, summarization, generation, Q&A) through a unified API.

Yes, if you are building on the Clarifai platform and need a Python interface to its managed AI services. Low install friction, active maintenance, permissive Apache 2.0 license, and zero known vulnerabilities make it safe to adopt. However, you are committing to Clarifai's ecosystem and pricing model; this is not a general-purpose ML library but a client for a specific commercial platform.

Install

clarifai on PyPI

pip

pip install clarifai

uv

uv add clarifai

poetry

poetry add clarifai

Installing clarifai

Before you install

Low friction installation as a pure-Python wheel. Active maintenance with a recent release and ongoing repository activity. Requires 22 runtime dependencies including numpy, requests, aiohttp, and openai, which adds complexity to the dependency graph but are all standard ecosystem packages.

License in practice

Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include a copy of the license and note any changes.

Quickstart

pip install clarifai

from clarifai.client.user import User
client = User(user_id="user_id", pat="your_personal_access_token")
apps_generator = client.list_apps()
apps = list(apps_generator)

CLARIFAI_PAT environment variable or pat constructor argument required; Clarifai account and Personal Access Token must be created in advance

Verify before relying

  • Whether all 22 dependencies are required for basic usage or if some are optional for specific features
  • Performance characteristics and rate limits when making concurrent requests through aiohttp
  • Specific Python version constraints beyond the stated >=3.9 requirement

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 22 — clarifai-grpc, clarifai-protocol, numpy, tqdm, PyYAML, schema, Pillow, tabulate, fsspec, click, click-option-group, requests, aiohttp, psutil, pygments, pydantic_core, packaging, tenacity, httpx, openai, huggingface_hub, hf-transfer
Maintenance actively maintained — 98 days since the last release
Last repo commit
First released
Downloads 76,734/month — #14,594 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: clarifai-12.5.0-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

computer vision API clientimage classification and detectionnatural language processing SDKAI model inference Pythonclarifai API integrationmachine learning model deploymentvision and NLP platform
computer-visionnlpmanaged-platform

More Artificial Intelligence packages