curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/infer-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "a1b2c3d4-0000-0000-0000-000000000001",
"output_type": "json"
}
'import requests
url = "https://api.woodwide.ai/models/{model_id}/infer-batch"
payload = {
"dataset_id": "a1b2c3d4-0000-0000-0000-000000000001",
"output_type": "json"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dataset_id: 'a1b2c3d4-0000-0000-0000-000000000001', output_type: 'json'})
};
fetch('https://api.woodwide.ai/models/{model_id}/infer-batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.woodwide.ai/models/{model_id}/infer-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => 'a1b2c3d4-0000-0000-0000-000000000001',
'output_type' => 'json'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.woodwide.ai/models/{model_id}/infer-batch"
payload := strings.NewReader("{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.woodwide.ai/models/{model_id}/infer-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/infer-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "c3d4e5f6-0000-0000-0000-000000000004",
"status": "queued",
"model": {
"id": "b2c3d4e5-0000-0000-0000-000000000001",
"version_id": "b2c3d4e5-0000-0000-0000-000000000002",
"version_number": 1
}
}{
"detail": "Not authenticated"
}{
"detail": "Forbidden"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded. Retry after a short delay."
}Async Infer (Dataset)
Run inference asynchronously using a dataset reference instead of a file upload.
curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/infer-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "a1b2c3d4-0000-0000-0000-000000000001",
"output_type": "json"
}
'import requests
url = "https://api.woodwide.ai/models/{model_id}/infer-batch"
payload = {
"dataset_id": "a1b2c3d4-0000-0000-0000-000000000001",
"output_type": "json"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dataset_id: 'a1b2c3d4-0000-0000-0000-000000000001', output_type: 'json'})
};
fetch('https://api.woodwide.ai/models/{model_id}/infer-batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.woodwide.ai/models/{model_id}/infer-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => 'a1b2c3d4-0000-0000-0000-000000000001',
'output_type' => 'json'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.woodwide.ai/models/{model_id}/infer-batch"
payload := strings.NewReader("{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.woodwide.ai/models/{model_id}/infer-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/infer-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"a1b2c3d4-0000-0000-0000-000000000001\",\n \"output_type\": \"json\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "c3d4e5f6-0000-0000-0000-000000000004",
"status": "queued",
"model": {
"id": "b2c3d4e5-0000-0000-0000-000000000001",
"version_id": "b2c3d4e5-0000-0000-0000-000000000002",
"version_number": 1
}
}{
"detail": "Not authenticated"
}{
"detail": "Forbidden"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded. Retry after a short delay."
}dataset_id (latest ready version) or dataset_version_id. Returns a job_id immediately.
Poll GET /jobs/{job_id} until status is succeeded, then fetch results via GET /jobs/{job_id}/results.
See Output Formats for output columns by model type.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Request body for asynchronous dataset inference.
Reference input data by dataset_id (resolves to the latest ready
version) or dataset_version_id for reproducibility. Optionally
pin a model_version_id.
Pin a specific model version. If omitted, the latest ready version is used.
Pin a specific dataset version for inference input.
Dataset to run inference on (uses latest ready version). Provide this OR dataset_version_id.
Output format: json, csv, or parquet.
json, csv, parquet Controls anomaly detection output shape. 'ids_only' returns a list of anomalous row indices. 'per_row' returns id, is_anomaly, and anomaly_score for every input row. Ignored for non-anomaly model types.
ids_only, per_row Response
Successful Response Output format depends on the output_type parameter (json, csv, or parquet). See Output Formats for output columns by model type.
Was this page helpful?