Search Modaic documentation

Find a Modaic guide or API reference

ReferenceAPIexamples

Ingest examples

Add up to 1,000 examples to a model. You may provide ground truth during ingest or annotate the example later.

POST/v1/models/{modelId}/examples

Authorization

Authorizationstringrequired

Send a Modaic bearer token in the Authorization header.

Parameters

modelIdUUIDrequired

Model repository ID. Repository write access is required.

examplesExampleInput[]required

Between 1 and 1,000 examples.

ExampleInput fields
examples[].idUUID

Caller-assigned ID. A UUID is generated when omitted.

examples[].stateany JSON valuerequired

The input state that a decision evaluates.

examples[].annotationobject

Optional annotation with required groundTruth and optional groundReasoning. Ground truth is an object keyed by question ID.

When an example is first annotated, Modaic assigns it a stable train or test split. Later annotation updates preserve that split.

Request example

{
  "examples": [
    {
      "id": "31fcc86c-7f49-4daa-a8b1-577db0c8fe76",
      "state": {"ticket": "I was billed twice."},
      "annotation": {
        "groundTruth": {"needs_refund": true, "priority": "high"},
        "groundReasoning": "The ticket reports a duplicate charge."
      }
    }
  ]
}

Response

examplesExample[]required

The ingested examples. Each resource includes id, state, source, imageUrls, annotation, latestDecision, decisionCount, createdAt, and updatedAt. source is ingest for this endpoint.

Was this page helpful?