Models endpoint on CloudFerro Cloud

The models endpoint returns the list of Sherlock AI models available through the OpenAI-compatible API. Use it to check which model IDs can be used in chat completion requests, embedding requests, or other supported API calls.

The endpoint is useful when you want to verify model availability before updating an application, when you are preparing examples for users, or when you need to confirm that a project can access a specific model.

Endpoint

Send a GET request to the following endpoint:

https://api-sherlock.cloudferro.com/openai/v1/models

The request must include the Sherlock AI API key in the Authorization header. The key is passed as a bearer token.

Prerequisites

Before you start, make sure that:

  1. You have access to a Sherlock AI project.

  2. You have created and copied a Sherlock AI API key.

  3. The API key is stored in the SHERLOCK_API_KEY environment variable.

  4. The tool you want to use, such as curl or Python, is installed on your workstation.

Configure the API key

Store the API key in an environment variable before running the examples. This keeps the key out of the command body and makes the same configuration usable from both curl and Python.

On Linux or macOS, use:

export SHERLOCK_API_KEY="paste-your-api-key-here"

On Windows PowerShell, use:

$env:SHERLOCK_API_KEY="paste-your-api-key-here"

List models with curl

The following curl command sends a GET request to the models endpoint and prints the response returned by Sherlock AI:

curl https://api-sherlock.cloudferro.com/openai/v1/models \
  -H "Authorization: Bearer $SHERLOCK_API_KEY"

A successful response contains a list of available models. Copy the required model ID from the response and use it as the value of the model field in later API requests.

Here is what the output could look like:

../_images/Screenshot_20260617_195536.png

List models with Python

The Python example uses the OpenAI client library and changes the base_url so that requests are sent to Sherlock AI.

Install the package if it is not already available in your environment:

pip install openai

Then run the following script:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["SHERLOCK_API_KEY"],
    base_url="https://api-sherlock.cloudferro.com/openai/v1",
)

models = client.models.list()

for model in models.data:
    print(model.id)

This version prints only the model IDs, which are usually the values needed when preparing chat completion or embedding requests.

The output is something like this:

../_images/Screenshot_20260617_195917.png

If you want to inspect the full response object, use:

print(models)

Note

Some deployments may also accept shorter model aliases, but the recommended value is the full model ID returned by the models endpoint.

Use the returned model ID

After you find the required model ID, pass it in the model field of the next request. For example:

{
  "model": "speakleash/Bielik-11B-v3.0-Instruct",
  "messages": [
    {
      "role": "user",
      "content": "Explain what Sherlock AI is."
    }
  ]
}

Model IDs are case-sensitive. Copy them exactly as returned by the models endpoint or as shown in the Sherlock AI model list.

Troubleshooting

If the request returns an authentication error, check that the SHERLOCK_API_KEY variable is set in the same terminal session where you run the command. Also verify that the key was copied correctly and that it belongs to the Sherlock AI project you want to use.

If the response does not contain the model you expected, the model may not be available in your project. In that case, use one of the returned model IDs or check project access with the administrator of your Sherlock AI environment.

Still need help?
If this article doesn’t answer all of your questions, our support team will do their best to help you.
Contact support