Skip to main content

Inference

POST 

/v2/models/$:MODEL_NAME/versions/$:MODEL_VERSION/infer

An inference request is made with an HTTP POST to an inference endpoint. In the request the HTTP body contains the Inference Request JSON Object. In the corresponding response the HTTP body contains the Inference Response JSON Object or Inference Response JSON Error Object. See Inference Request Examples for some example HTTP/REST requests and responses.

Request

Path Parameters

    MODEL_NAME stringrequired
    MODEL_VERSION stringrequired

Body

    idstring
    parametersobject
    inputs object[]required
  • Array [
  • namestringrequired
    shapeinteger[]required
    datatypestringrequired
    parametersobject
    data object[]required
  • Array [
  • anyOf
  • ]
  • ]
  • outputs object[]
  • Array [
  • namestringrequired
    parametersobject
  • ]

Responses

OK

Schema
    model_namestringrequired
    model_versionstring
    idstring
    parametersobject
    outputs object[]required
  • Array [
  • namestringrequired
    shapeinteger[]required
    datatypestringrequired
    parametersobject
    data object[]required
  • Array [
  • anyOf
  • ]
  • ]
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://deploy-preview-526--elastic-nobel-0aef7a.netlify.app");
request.Headers.Add("Accept", "application/json");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Parameters
— pathrequired
— pathrequired
Body
{
  "id": "string",
  "parameters": {},
  "inputs": [
    {
      "name": "string",
      "shape": [
        0
      ],
      "datatype": "string",
      "parameters": {},
      "data": [
        null,
        0,
        "string",
        true
      ]
    }
  ],
  "outputs": [
    {
      "name": "string",
      "parameters": {}
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!