Model Serving Query
Use real-time inference for machine learning
Query GA
POST
Query a serving endpoint
API scopes: model-serving, model-serving-inference
Parameters
- namestringpath
The name of the serving endpoint. This field is required and is provided via the path parameter.
Request body
- promptobjectPublic Preview
The prompt string (or array of strings) field used ONLY for completions external & foundation model serving endpoints and should only be used with other completions query fields.
- inputobjectPublic Preview
The input string (or array of strings) field used ONLY for embeddings external & foundation model serving endpoints and is the only field (along with extra_params if needed) used by embeddings queries.
- messagesarray of objectPublic Preview
The messages field used ONLY for chat external & foundation model serving endpoints. This is an array of ChatMessage objects and should only be used with other chat query fields.
Show child attributesHide child attributes
- rolestringPublic Preview
The role of the message. One of [system, user, assistant].
- contentstringPublic Preview
The content of the message.
- temperaturedoublePublic Preview
The temperature field used ONLY for completions and chat external & foundation model serving endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be used with other chat/completions query fields.
- stoparray of stringPublic Preview
The stop sequences field used ONLY for completions and chat external & foundation model serving endpoints. This is a list of strings and should only be used with other chat/completions query fields.
- max_tokensint32Public Preview
The max tokens field used ONLY for completions and chat external & foundation model serving endpoints. This is an integer and should only be used with other chat/completions query fields.
- nint32Public Preview
The n (number of candidates) field used ONLY for completions and chat external & foundation model serving endpoints. This is an integer between 1 and 5 with a default of 1 and should only be used with other chat/completions query fields.
- streambooleanPublic Preview
The stream field used ONLY for completions and chat external & foundation model serving endpoints. This is a boolean defaulting to false and should only be used with other chat/completions query fields.
- extra_paramsobjectPublic Preview
The extra parameters field used ONLY for completions, chat, and embeddings external & foundation model serving endpoints. This is a map of strings and should only be used with other external/foundation model query fields.
- dataframe_recordsarray of object
Pandas Dataframe input in the records orientation.
- dataframe_splitobject
Pandas Dataframe input in the split orientation.
Show child attributesHide child attributes
- indexarray of int32
Index array for the dataframe
- columnsarray of object
Columns array for the dataframe
- dataarray of object
Data array for the dataframe
- instancesarray of object
Tensor-based input in row format.
- inputsobject
Tensor-based input in columnar format.
- client_request_idstring
Optional user-provided request identifier that will be recorded in the inference table and the usage tracking table.
- usage_contextobject
Optional user-provided context that will be recorded in the usage tracking table.
Response
- choicesarray of objectPublic Preview
The list of choices returned by the chat or completions external/foundation model serving endpoint.
Show child attributesHide child attributes
- textstringPublic Preview
The text response from the completions endpoint.
- messageobjectPublic Preview
The message response from the chat endpoint.
Show child attributesHide child attributes
- rolestringPublic Preview
The role of the message. One of [system, user, assistant].
- contentstringPublic Preview
The content of the message.
- indexint32Public Preview
The index of the choice in the chat or completions response.
- finishReasonstringPublic Preview
The finish reason returned by the endpoint.
- logprobsint32Public Preview
The logprobs returned only by the completions endpoint.
- dataarray of objectPublic Preview
The list of the embeddings returned by the embeddings external/foundation model serving endpoint.
Show child attributesHide child attributes
- embeddingarray of doublePublic Preview
The embedding vector
- indexint32Public Preview
The index of the embedding in the response.
- objectstringPublic Preview
This will always be 'embedding'.
- modelstringPublic Preview
The name of the external/foundation model used for querying. This is the name of the model that was specified in the endpoint config.
- usageobjectPublic Preview
The usage object that may be returned by the external/foundation model serving endpoint. This contains information about the number of tokens used in the prompt and response.
Show child attributesHide child attributes
- prompt_tokensint32Public Preview
The number of tokens in the prompt.
- completion_tokensint32Public Preview
The number of tokens in the chat/completions response.
- total_tokensint32Public Preview
The total number of tokens in the prompt and response.
- idstringPublic Preview
The ID of the query that may be returned by a completions or chat external/foundation model serving endpoint.
- createdint64Public Preview
The timestamp in seconds when the query was created in Unix time returned by a completions or chat external/foundation model serving endpoint.
- objectstringPublic Preview
The type of object returned by the external/foundation model serving endpoint, one of [text_completion, chat.completion, list (of embeddings)].
- predictionsarray of object
The predictions returned by the serving endpoint.
- outputsarray of object
The outputs of the feature serving endpoint.