Omni Developers
Guides

Ask with a file

Attach ready Vault knowledge to a stateful task and receive a structured V citation.

After a Vault file reports ready, include its public file_id in the task's attachments array.

curl -sS -X POST "$OMNI_API_ORIGIN/v1/tasks" \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ask-file-$(uuidgen)" \
  -d '{
    "workspace_id": "'$OMNI_WORKSPACE_ID'",
    "message": "What launch month does this file specify? Cite the source.",
    "attachments": ["'$OMNI_FILE_ID'"]
  }'

Attachments already express explicit file intent. Do not send retrieval_intent or other orchestration controls.

Poll the task until completion. A grounded answer can contain [V1], with the same structured citation in data.output.citations. Read workspace history to verify the citation was persisted with the assistant message.