Type to search.

Create an OpenShift AI inference endpoint

Auth

Create an inference endpoint to perform an inference task with the openshift_ai service.

Required privileges

Cluster privileges manage_inference

Path parameters

task_type enum required

The type of the inference task that the model will perform. NOTE: The chat_completion task type only supports streaming and only through the _stream API.

Values: text_embedding completion chat_completion rerank
openshiftai_inference_id string required

The unique identifier of the inference endpoint.

Query parameters

timeout union oneOf · default: 30s

Specifies the amount of time to wait for the inference endpoint to be created.

Values: -1 0

Request body

service enum required

The type of service supported for the specified task type. In this case, openshift_ai.

Values: openshift_ai
service_settings object required

Settings used to install the inference model. These settings are specific to the openshift_ai service.

api_key string required

A valid API key for your OpenShift AI endpoint. Can be found in Token authentication section of model related information.

url string required

The URL of the OpenShift AI hosted model endpoint.

model_id string

The name of the model to use for the inference task. Refer to the hosted model's documentation for the name if needed. Service has been tested and confirmed to be working with the following models:

  • For text_embedding task - gritlm-7b.
  • For completion and chat_completion tasks - llama-31-8b-instruct.
  • For rerank task - bge-reranker-v2-m3.
max_input_tokens number

For a text_embedding task, the maximum number of tokens per input before chunking occurs.

similarity enum

For a text_embedding task, the similarity measure. One of cosine, dot_product, l2_norm. If not specified, the default dot_product value is used.

Values: cosine dot_product l2_norm

Response

application/json
service string required

The service type

service_settings object required

Settings specific to the service

task_settings object

Task settings specific to the service and task type

inference_id string required

The inference Id

task_type enum required

The task type

Values: text_embedding chat_completion completion rerank