clarifai-grpc 12.2.11


pip install clarifai-grpc

  Latest version

Released: Mar 24, 2026

Project Links

Meta
Author: Clarifai
Requires Python: >=3.8

Classifiers

Topic
  • Scientific/Engineering :: Artificial Intelligence

Programming Language
  • Python :: 3

License
  • OSI Approved :: Apache Software License

Operating System
  • OS Independent

image

Clarifai Python gRPC Client

This is the official Clarifai gRPC Python client for interacting with our powerful recognition API. Clarifai provides a platform for data scientists, developers, researchers and enterprises to master the entire artificial intelligence lifecycle. Gather valuable business insights from images, video and text using computer vision and natural language processing.

PyPI version Build

Installation

python -m pip install clarifai-grpc

Versioning

This library doesn't use semantic versioning. The first two version numbers (X.Y out of X.Y.Z) follow the API (backend) versioning, and whenever the API gets updated, this library follows it.

The third version number (Z out of X.Y.Z) is used by this library for any independent releases of library-specific improvements and bug fixes.

Getting started

Construct the V2Stub object using which you'll access all the Clarifai API functionality:

from clarifai_grpc.channel.clarifai_channel import ClarifaiChannel
from clarifai_grpc.grpc.api import service_pb2_grpc

stub = service_pb2_grpc.V2Stub(ClarifaiChannel.get_grpc_channel())

Alternatives to the encrypted gRPC channel (ClarifaiChannel.get_grpc_channel()) are:

  • the HTTPS+JSON channel (ClarifaiChannel.get_json_channel()), and
  • the unencrypted gRPC channel (ClarifaiChannel.get_insecure_grpc_channel()).

We only recommend them in special cases.

Predict concepts in an image:

from clarifai_grpc.grpc.api import service_pb2, resources_pb2
from clarifai_grpc.grpc.api.status import status_code_pb2

YOUR_CLARIFAI_API_KEY = "???"
YOUR_APPLICATION_ID = "???"
SAMPLE_URL = "https://samples.clarifai.com/metro-north.jpg"

# This is how you authenticate.
metadata = (("authorization", f"Key {YOUR_CLARIFAI_API_KEY}"),)

request = service_pb2.PostModelOutputsRequest(
    # This is the model ID of a publicly available General model. You may use any other public or custom model ID.
    model_id="general-image-recognition",
    user_app_id=resources_pb2.UserAppIDSet(app_id=YOUR_APPLICATION_ID),
    inputs=[
        resources_pb2.Input(
            data=resources_pb2.Data(image=resources_pb2.Image(url=SAMPLE_URL))
        )
    ],
)
response = stub.PostModelOutputs(request, metadata=metadata)

if response.status.code != status_code_pb2.SUCCESS:
    print(response)
    raise Exception(f"Request failed, status code: {response.status}")

for concept in response.outputs[0].data.concepts:
    print("%12s: %.2f" % (concept.name, concept.value))

See the Clarifai API documentation for all available functionality.

Troubleshooting

I get the following error when installing the library: Failed building wheel for grpcio

Try upgrading setuptools to a version 40.7.1 or higher.

pip install --upgrade setuptools

Source: https://github.com/grpc/grpc/issues/17829

12.2.11 Mar 24, 2026
12.2.10 Mar 19, 2026
12.2.9 Mar 18, 2026
12.2.8 Mar 13, 2026
12.2.7 Mar 12, 2026
12.2.6 Mar 10, 2026
12.2.5 Mar 10, 2026
12.2.4 Mar 05, 2026
12.2.3 Mar 04, 2026
12.2.2 Mar 04, 2026
12.2.1 Mar 03, 2026
12.2.0 Mar 03, 2026
12.1.3 Feb 26, 2026
12.1.2 Feb 23, 2026
12.1.1 Feb 17, 2026
12.1.0 Feb 04, 2026
12.0.12 Jan 29, 2026
12.0.11 Jan 29, 2026
12.0.10 Jan 27, 2026
12.0.9 Jan 23, 2026
12.0.8 Jan 23, 2026
12.0.7 Jan 22, 2026
12.0.6 Jan 16, 2026
12.0.5 Jan 15, 2026
12.0.4 Jan 14, 2026
12.0.3 Jan 13, 2026
12.0.2 Jan 13, 2026
12.0.1 Jan 07, 2026
12.0.0 Jan 06, 2026
11.11.8 Dec 23, 2025
11.11.7 Dec 19, 2025
11.11.6 Dec 19, 2025
11.11.5 Dec 19, 2025
11.11.4 Dec 19, 2025
11.11.3 Dec 19, 2025
11.11.2 Dec 16, 2025
11.11.1 Dec 15, 2025
11.11.0 Dec 04, 2025
11.10.10 Nov 27, 2025
11.10.9 Nov 25, 2025
11.10.8 Nov 20, 2025
11.10.7 Nov 20, 2025
11.10.6 Nov 20, 2025
11.10.5 Nov 19, 2025
11.10.4 Nov 18, 2025
11.10.3 Nov 13, 2025
11.10.2 Nov 11, 2025
11.10.1 Nov 05, 2025
11.10.0 Nov 04, 2025
11.9.11 Oct 27, 2025
11.9.10 Oct 23, 2025
11.9.9 Oct 22, 2025
11.9.8 Oct 16, 2025
11.9.7 Oct 16, 2025
11.9.6 Oct 14, 2025
11.9.5 Oct 14, 2025
11.9.4 Oct 10, 2025
11.9.3 Oct 10, 2025
11.9.2 Oct 09, 2025
11.9.1 Oct 09, 2025
11.9.0 Oct 08, 2025
11.8.6 Sep 30, 2025
11.8.5 Sep 29, 2025
11.8.4 Sep 29, 2025
11.8.3 Sep 26, 2025
11.8.2 Sep 10, 2025
11.8.1 Sep 06, 2025
11.8.0 Sep 02, 2025
11.7.9 Aug 27, 2025
11.7.8 Aug 27, 2025
11.7.7 Aug 25, 2025
11.7.6 Aug 21, 2025
11.7.5 Aug 15, 2025
11.7.4 Aug 14, 2025
11.7.3 Aug 13, 2025
11.7.2 Aug 12, 2025
11.7.1 Aug 07, 2025
11.7.0 Aug 06, 2025
11.6.6 Jul 28, 2025
11.6.5 Jul 23, 2025
11.6.4 Jul 23, 2025
11.6.3 Jul 21, 2025
11.6.2 Jul 15, 2025
11.6.1 Jul 08, 2025
11.6.0 Jul 03, 2025
11.5.5 Jun 09, 2025
11.5.4rc1 Jun 07, 2025
11.5.3 Jun 06, 2025
11.4.1 May 29, 2025
11.3.4 Apr 29, 2025
11.3.3 Apr 28, 2025
11.3.2 Apr 11, 2025
11.3.1 Apr 10, 2025
11.3.0 Apr 08, 2025
11.2.6 Mar 25, 2025
11.2.5 Mar 20, 2025
11.2.4 Mar 19, 2025
11.2.3 Mar 18, 2025
11.2.2 Mar 17, 2025
11.2.1 Mar 13, 2025
11.2.0 Mar 07, 2025
11.1.3 Feb 20, 2025
11.1.2 Feb 18, 2025
11.1.1 Feb 11, 2025
11.1.0 Feb 06, 2025
11.0.7 Jan 30, 2025
11.0.6 Jan 28, 2025
11.0.5 Jan 25, 2025
11.0.4 Jan 24, 2025
11.0.3 Jan 21, 2025
11.0.2 Jan 15, 2025
11.0.1 Jan 15, 2025
11.0.0 Jan 08, 2025
10.11.3 Jan 07, 2025
10.11.2 Dec 17, 2024
10.11.1 Dec 12, 2024
10.11.0 Dec 10, 2024
10.10.2 Nov 27, 2024
10.10.1 Nov 21, 2024
10.10.0 Nov 19, 2024
10.9.11 Oct 23, 2024
10.9.10 Oct 18, 2024
10.9.9 Oct 18, 2024
10.9.8 Oct 17, 2024
10.9.7 Oct 16, 2024
10.9.6 Oct 16, 2024
10.9.5 Oct 16, 2024
10.9.4 Oct 10, 2024
10.9.3 Oct 10, 2024
10.9.2 Oct 10, 2024
10.9.1 Oct 10, 2024
10.9.0 Oct 10, 2024
10.8.8 Oct 08, 2024
10.8.7 Sep 23, 2024
10.8.6 Sep 18, 2024
10.8.5 Sep 16, 2024
10.8.4 Sep 07, 2024
10.8.3 Sep 06, 2024
10.8.2 Sep 05, 2024
10.8.1 Sep 04, 2024
10.8.0 Sep 02, 2024
10.7.3 Aug 19, 2024
10.7.2 Aug 13, 2024
10.7.1 Aug 12, 2024
10.7.0 Aug 05, 2024
10.6.7 Jul 30, 2024
10.6.6 Jul 22, 2024
10.6.5 Jul 18, 2024
10.6.4 Jul 16, 2024
10.6.3 Jul 13, 2024
10.6.2 Jul 11, 2024
10.6.1 Jul 05, 2024
10.6.0 Jul 04, 2024
10.5.4 Jun 25, 2024
10.5.3 Jun 20, 2024
10.5.2 Jun 13, 2024
10.5.1 Jun 10, 2024
10.5.0 Jun 03, 2024
10.4.1 May 30, 2024
10.4.0 May 30, 2024
10.3.7 Jun 08, 2024
10.3.6 Jun 08, 2024
10.3.5 May 30, 2024
10.3.4 Apr 25, 2024
10.3.3 Apr 25, 2024
10.3.2 Apr 22, 2024
10.3.1 Apr 19, 2024
10.3.0 Apr 08, 2024
10.2.3 Mar 28, 2024
10.2.2 Mar 22, 2024
10.2.1 Mar 12, 2024
10.2.0 Mar 06, 2024
10.1.6 Feb 22, 2024
10.1.5 Feb 20, 2024
10.1.4 Feb 15, 2024
10.1.3 Feb 09, 2024
10.1.2 Feb 09, 2024
10.1.1 Feb 05, 2024
10.1.0 Feb 01, 2024
10.0.10 Jan 29, 2024
10.0.9 Jan 27, 2024
10.0.8 Jan 25, 2024
10.0.7 Jan 24, 2024
10.0.6 Jan 24, 2024
10.0.5 Jan 23, 2024
10.0.4 Jan 18, 2024
10.0.3 Jan 12, 2024
10.0.2 Jan 11, 2024
10.0.1 Jan 10, 2024
10.0.0 Jan 08, 2024
9.11.5 Dec 28, 2023
9.11.4 Dec 20, 2023
9.11.3 Dec 18, 2023
9.11.2 Dec 13, 2023
9.11.1 Dec 12, 2023
9.11.0 Dec 04, 2023
9.10.8 Nov 30, 2023
9.10.7 Nov 29, 2023
9.10.6 Nov 27, 2023
9.10.5 Nov 22, 2023
9.10.4 Nov 15, 2023
9.10.3 Nov 09, 2023
9.10.2 Nov 07, 2023
9.10.1 Nov 06, 2023
9.10.0 Nov 02, 2023
9.9.5 Oct 27, 2023
9.9.4 Oct 26, 2023
9.9.3 Oct 25, 2023
9.9.2 Oct 24, 2023
9.9.1 Oct 16, 2023
9.9.0 Oct 04, 2023
9.8.6 Sep 29, 2023
9.8.5 Sep 28, 2023
9.8.4 Sep 25, 2023
9.8.3 Sep 19, 2023
9.8.2 Sep 13, 2023
9.8.1 Sep 12, 2023
9.8.0 Sep 05, 2023
9.7.6 Aug 29, 2023
9.7.5 Aug 29, 2023
9.7.4 Aug 27, 2023
9.7.3 Aug 15, 2023
9.7.2 Aug 15, 2023
9.7.1 Aug 15, 2023
9.7.0 Aug 07, 2023
9.6.1 Jul 27, 2023
9.6.0 Jul 08, 2023
9.5.0 Jun 01, 2023
9.4.0 May 02, 2023
9.3.0 Apr 03, 2023
9.2.0 Mar 02, 2023
9.1.2 Feb 09, 2023
9.1.1 Feb 07, 2023
9.1.0 Feb 01, 2023
9.0.0 Jan 08, 2023
8.12.0rc6 Jan 04, 2023
8.12.0rc4 Jan 04, 2023
8.12.0rc3 Jan 04, 2023
8.12.0rc2 Jan 04, 2023
8.12.0rc1 Dec 24, 2022
8.11.0 Dec 07, 2022
8.10.0 Nov 01, 2022
8.8.0 Aug 25, 2022
8.7.0 Jul 20, 2022
8.6.0 Jun 20, 2022
8.0.0 Dec 31, 2021
7.12.0rc2 Jul 12, 2022
7.12.0rc1 Dec 30, 2021
7.11.0 Dec 03, 2021
7.10.0 Nov 01, 2021
7.9.0 Sep 29, 2021
7.8.0 Sep 01, 2021
7.7.0 Aug 16, 2021
7.6.0 Aug 16, 2021
7.5.0 Aug 13, 2021
7.4.0 Apr 30, 2021
7.3.0 Mar 23, 2021
7.2.0 Feb 05, 2021
7.1.0 Feb 05, 2021
7.0.1 Jan 20, 2021
7.0.0 Dec 11, 2020
6.11.0 Nov 10, 2020
6.10.0 Oct 13, 2020
6.9.0 Oct 08, 2020
6.8.1 Sep 29, 2020
6.8.0 Sep 15, 2020
6.7.1 Jul 10, 2020
6.7.0 Jul 08, 2020
6.6.0 Jun 11, 2020
6.5.0 Jun 11, 2020
6.4.0 Jun 11, 2020
6.3.0 Jun 11, 2020
6.2.0 Jun 11, 2020
0.1.1 May 18, 2020
0.1.0 May 18, 2020
0.0.2 Apr 13, 2020
0.0.1 Mar 16, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
grpcio (>=1.53.2)
grpcio (>=1.68.0)
protobuf (>=5.29.5)
googleapis-common-protos (>=1.57.0)