Inference
An inference request is made with an HTTP POST to an inference endpoint. The model name and (optionally) version must be available in the URL. If a version is not provided the server may choose a version based on its own policies or return an error.
Path parameters
model_namestringRequired
model_versionstringRequired
Body
idstringOptional
Responses
200
OK
application/json
400
Bad Request
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /v2/models/{model_name}/versions/{model_version}/infer HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 371
{
"id": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"inputs": [
{
"name": "text",
"shape": [
1
],
"datatype": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": null
}
],
"outputs": [
{
"name": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
{
"model_name": "text",
"model_version": "text",
"id": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"outputs": [
{
"name": "text",
"shape": [
1
],
"datatype": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": null
}
]
}
An inference request is made with an HTTP POST to an inference endpoint. The model name and (optionally) version must be available in the URL. If a version is not provided the server may choose a version based on its own policies or return an error.
Path parameters
model_namestringRequired
Body
idstringOptional
Responses
200
OK
application/json
400
Bad Request
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /v2/models/{model_name}/infer HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 371
{
"id": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"inputs": [
{
"name": "text",
"shape": [
1
],
"datatype": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": null
}
],
"outputs": [
{
"name": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
{
"model_name": "text",
"model_version": "text",
"id": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"outputs": [
{
"name": "text",
"shape": [
1
],
"datatype": "text",
"parameters": {
"content_type": "text",
"headers": {},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": null
}
]
}
Was this helpful?