#!/usr/bin/env bash # STATUS: LIVE_VERIFIED — executed 2026-09-19 (exit 0 in 0.4s) # POST /v1/documents/search shape (api.x.ai, inference key). With a non-existent collection the API answers 404 not-found — recorded on purpose. set -euo pipefail cd "$(dirname "$0")/../../.." source scripts/lib.sh T=$(mktemp); trap 'rm -f "$T"' EXIT xai POST /v1/documents/search -d '{"query":"quarterly revenue","source":{"collection_ids":["collection_00000000-0000-0000-0000-000000000000"]},"limit":3,"retrieval_mode":{"type":"hybrid"}}' > "$T" log_request xai POST /v1/documents/search "$XAI_STATUS" 0 "example xai/collections/search.sh (fake collection → 404 expected)" echo "status $XAI_STATUS"; mask < "$T"; echo [ "$XAI_STATUS" = "404" ] || [ "$XAI_STATUS" = "200" ]