> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/reference/inference/inference-sdk/core-models.md).

# Core Models

`InferenceHTTPClient` supports core models hosted by Inference. Some of these models can be used on the Roboflow hosted inference platform (use `https://serverless.roboflow.com` as the URL); others can be deployed locally (usually the local server is available at `http://localhost:9001`).

## CLIP

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # or "https://serverless.roboflow.com" to use hosted serving
    api_key="ROBOFLOW_API_KEY"
)

CLIENT.get_clip_image_embeddings(inference_input="./my_image.jpg")  # single image request
CLIENT.get_clip_image_embeddings(inference_input=["./my_image.jpg", "./other_image.jpg"])  # batch image request
CLIENT.get_clip_text_embeddings(text="some")  # single text request
CLIENT.get_clip_text_embeddings(text=["some", "other"])  # other text request
CLIENT.clip_compare(
    subject="./my_image.jpg",
    prompt=["fox", "dog"],
)
```

The `CLIENT.clip_compare(...)` method allows you to compare different combinations of `subject_type` and `prompt_type`:

* `(image, image)` (default)
* `(image, text)`
* `(text, image)`
* `(text, text)`

Async methods are also available:

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # or "https://serverless.roboflow.com" to use hosted serving
    api_key="ROBOFLOW_API_KEY"
)

async def see_async_method():
  await CLIENT.get_clip_image_embeddings_async(inference_input="./my_image.jpg")  # single image request
  await CLIENT.get_clip_image_embeddings_async(inference_input=["./my_image.jpg", "./other_image.jpg"])  # batch image request
  await CLIENT.get_clip_text_embeddings_async(text="some")  # single text request
  await CLIENT.get_clip_text_embeddings_async(text=["some", "other"])  # other text request
  await CLIENT.clip_compare_async(
      subject="./my_image.jpg",
      prompt=["fox", "dog"],
  )
```

See the [CLIP model reference](https://docs.roboflow.com/models/supported-models/clip) for details about the model itself.

## DocTR

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # or "https://serverless.roboflow.com" to use hosted serving
    api_key="ROBOFLOW_API_KEY"
)

CLIENT.ocr_image(inference_input="./my_image.jpg")  # single image request
CLIENT.ocr_image(inference_input=["./my_image.jpg", "./other_image.jpg"])  # batch image request
```

Async equivalent: `CLIENT.ocr_image_async(...)`. See the [DocTR model reference](https://docs.roboflow.com/models/supported-models/doctr) for details.

## Gaze (deprecated)

{% hint style="warning" %}
`CLIENT.detect_gazes(...)` and `CLIENT.detect_gazes_async(...)` have been removed along with the MediaPipe dependency. They now short-circuit client-side and raise `inference_sdk.http.errors.FeatureDeprecatedError` without issuing a network call. Contact Roboflow if you require this capability.
{% endhint %}
