# Clarifai

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/clarifai/Clarifai)

Clarifai large language models.

To use, you should have an account on the Clarifai platform,
the ``clarifai`` python package installed, and the
environment variable ``CLARIFAI_PAT`` set with your PAT key,
or pass it as a named parameter to the constructor.

## Signature

```python
Clarifai()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import Clarifai
clarifai_llm = Clarifai(user_id=USER_ID, app_id=APP_ID, model_id=MODEL_ID)
                 (or)
clarifai_llm = Clarifai(model_url=EXAMPLE_URL)

## Extends

- `LLM`

## Properties

- `model_url`
- `model_id`
- `model_version_id`
- `app_id`
- `user_id`
- `pat`
- `token`
- `model`
- `api_base`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/llms/clarifai/Clarifai/validate_environment)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/llms/clarifai.py#L18)