Async Infer (File Upload)
curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/infer-async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form output_type=jsonimport requests
url = "https://api.woodwide.ai/models/{model_id}/infer-async"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "output_type": "json" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', 'test.csv');
form.append('output_type', 'json');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.woodwide.ai/models/{model_id}/infer-async', 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-async",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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-async"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-async")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/infer-async")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--"
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."
}Endpoints
Async Infer (File Upload)
Upload a CSV file and start inference asynchronously.
POST
/
models
/
{model_id}
/
infer-async
Async Infer (File Upload)
curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/infer-async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form output_type=jsonimport requests
url = "https://api.woodwide.ai/models/{model_id}/infer-async"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "output_type": "json" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', 'test.csv');
form.append('output_type', 'json');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.woodwide.ai/models/{model_id}/infer-async', 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-async",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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-async"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-async")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/infer-async")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\ntest.csv\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"output_type\"\r\n\r\njson\r\n-----011000010111000001101001--"
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."
}Returns a
job_id immediately. Poll GET /jobs/{job_id} until status is succeeded, then fetch results via GET /jobs/{job_id}/results.
Maximum file size is 30 MB. Set output_type to control the result format (json, csv, or parquet).
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
multipart/form-data
The file to upload. Maximum file size: 30 MB.
Supported inference output formats.
Available options:
json, csv, parquet Example:
"json"
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.
Available options:
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?