Search Modaic documentation

Find a Modaic guide or API reference

ReferenceAPIbatch decisions

Start batch decision

Run a repository model over up to 1,000 examples. Supply stored example IDs, inline examples, or scope: "all"—exactly one selection mode is required.

The endpoint returns 202 Accepted. Poll the URL in the Location response header for progress.

POST/v1/models/{modelId}/batch-decisions

Authorization

Authorizationstringrequired

Send a Modaic bearer token in the Authorization header.

Parameters

Idempotency-Keystringrequired

A key between 8 and 255 characters. Reuse it only when retrying this exact request.

modelIdUUIDrequired

Model repository ID. Repository write access is required.

branchstringdefault: main

Branch whose model configuration will be used.

sourceCommitShastring

Commit to run. When omitted, the current branch head is resolved and stored on the batch decision.

exampleIdsUUID[]

Between 1 and 1,000 unique stored example IDs.

examplesInlineExample[]

Between 1 and 1,000 inline examples. Each item contains an optional UUID id and required JSON state. A UUID is generated when id is omitted.

scopeall

Set to "all" to run every non-deleted example in the model.

Response

idUUIDrequired

Batch decision ID.

repositoryIdUUIDrequired
statusqueued | running | completed | failed | cancelledrequired
phasequeued | deciding | done | failed | cancelledrequired
branchstringrequired
sourceCommitShastringrequired

Exact model revision used by the batch.

progressobjectrequired

Integer total, completed, and failed counts.

resultobject | nullrequired

Final counts when the job reaches a terminal state.

errorobject | nullrequired

Job-level error with code and message.

createdAtISO 8601 datetimerequired
updatedAtISO 8601 datetimerequired
startedAtISO 8601 datetime | nullrequired
finishedAtISO 8601 datetime | nullrequired
Was this page helpful?