openinstinctdocs

POST /v1/systemone/batch

Send many requests in one call.

POST https://api.openinstinct.dev/v1/systemone/batch

Use a batch to label a list of items, or to ask about several states at once. The requests are spread over the model's replicas and answered in order.

Request body

FieldType
requestsarray1 to 256 requests, each of the shape /v1/systemone takes
  • All requests of a batch must use the same model (or all leave model out).
  • The whole body is limited to 32 MB. With images, size the batch accordingly.
curl https://api.openinstinct.dev/v1/systemone/batch \
  -H "Authorization: Bearer $OPENINSTINCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {
        "state": "Where is my invoice for March?",
        "questions": { "is_billing": { "type": "noul", "instructions": "Is this about billing?" } }
      },
      {
        "state": "The app crashes when I open settings.",
        "questions": { "is_billing": { "type": "noul", "instructions": "Is this about billing?" } }
      }
    ]
  }'

Response

200 OK, with one entry per request, in the order they were sent:

{
  "responses": [
    {
      "model": "instinct-one-latest",
      "answers": { "is_billing": { "type": "noul", "noul": 0.97 } },
      "usage": { "input_tokens": 24, "output_tokens": 17 },
      "latency_ms": 41
    },
    {
      "error": { "status": 422, "detail": "..." }
    }
  ],
  "count": 2,
  "errors": 1
}
Field
responsesFor each request, a /v1/systemone response or {"error": {"status", "detail"}}
countThe number of entries
errorsHow many of them failed

A batch returns 200 even when some of its requests failed. Check errors, or each entry for an error field.

Limits and cost

  • Each request of a batch counts toward the requests per minute limit; the batch as a whole takes one concurrent slot. See Rate limits.
  • Usage is the sum over the answered requests.

On this page