Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Transform Json Live Deployment

POST/api/v2/models/liveDeployments/{liveDeploymentRid}/transformJson
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Performs inference on the live deployment.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:models-execute.

Path parameters

liveDeploymentRid
string

The Resource Identifier (RID) of a Live Deployment.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

TransformJsonLiveDeploymentRequest
object
Hide child attributes

Hide child attributes

input
map<string, any>
optional

The input data for the model inference. The structure should match the model's transform API specification, where each key is an input name and the value is the corresponding input data.

Response body

TransformLiveDeploymentResponse
object

The response from transforming input data using a live deployment.

Hide child attributes

Hide child attributes

output
map<string, any>
optional

The output data from the model inference. The structure depends on the model's defined API specification, where each key is an output name and the value is the corresponding output data.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/models/liveDeployments/ri.foundry-ml-live.main.live-deployment.f351c142-0e4c-4b12-adc2-6e1539737ae9/transformJson?preview=true" \ -d '{"input":{"input_df":[{"feature_1":1.0,"feature_2":2}]}}'

Error responses

Error Name
LiveDeploymentNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe specified live deployment was not found.
ParametersliveDeploymentRid
InferenceTimeoutError CodeTIMEOUT
Status Code500
DescriptionThe live deployment took longer than 5 minutes to respond to the inference request. This typically indicates the model execution is taking too long or the deployment is under heavy load.
ParametersliveDeploymentRid
InferenceInvalidInputError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe inference request contains invalid input data that does not match the model's API specification. Check the error type for specific validation failure details.
ParametersliveDeploymentRid, errorType
InferenceFailureError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe inference request failed due to a model execution error or unexpected internal issue. This typically indicates a problem with the model itself rather than the input data.
ParametersliveDeploymentRid, errorMessage
TransformJsonLiveDeploymentPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not transformJson the LiveDeployment.
ParametersliveDeploymentRid