Select citations for a task answer

Select evidence sources actually used in the same task’s answer.

POST https://api.moi.matrixorigin.cn/v5/semantic-models/runtime/cite

Before you call this API

Use injected service URLs, technical credentials, Workspace, and short-lived authorization only in the current task environment. Retain original authorization header values. An ordinary PAT cannot replace task identity or establish authorization. Examples use jq. See Shared information for variables, objects, and states.

Request body

curl -X POST "${MOI_ENDPOINT%/}/semantic-models/runtime/cite" \
  -H "X-API-Key: $MOI_API_KEY" \
  -H "X-Workspace-ID: $MOI_WORKSPACE_ID" \
  -H "X-MOI-Runtime-Authorization: $MOI_RUNTIME_AUTHORIZATION" \
  -H 'Content-Type: application/json' \
  --data-binary "$(jq -n --arg REQUEST_ID "$REQUEST_ID" --slurpfile CITATION_SOURCES_FILE "$CITATION_SOURCES_FILE" '
{
  "request_id": $REQUEST_ID,
  "sources": $CITATION_SOURCES_FILE[0],
  "complete_read_requirements": true
}
')"

Select from persisted evidence in the current task; do not fabricate sources from names. Check accepted and complete returned read requirements before resubmitting if rejected. After selection, write the answer from evidence. HTTP 200 does not mean answer facts were verified.

Fields

Type

Required

Description

request_id

string

Yes

Unique ID for this operation, 1–256 bytes, without surrounding whitespace or an audit: prefix. Retain for replay of identical input.

sources

object (array of objects)

No

Explicitly supply the complete source set; send [] without evidence to avoid an unintended empty selection from omission.

complete_read_requirements

boolean

No

Return complete unread requirements for further reading before retrying selection.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "call_id": "request_example",
    "output": {
      "accepted": true,
      "selected": true,
      "sources": []
    }
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

Response explanation.

data.call_id

string

Corresponding original request_id.

data.failed

boolean

true indicates business failure; false may be omitted.

data.output

object

Current operation result.

data.artifacts

object (array of objects)

Original artifacts and evidence from the same task.

data.metadata

object

Operation metadata, returned when present.

data.output.accepted

boolean

Whether citation selection was accepted. Must explicitly be true before answering.

data.output.selected

boolean

Raw value returned by the current operation; retain according to common objects.

data.output.sources

array

Raw value returned by the current operation; retain according to common objects.

Error response

Handle HTTP status, business results, and error fields separately. See Errors and environments. On source or version conflicts, read current state; do not automatically retry with a different identity, resource, or request ID.

Last updated on