#!/usr/bin/env bash # # AOCore embeddings call via curl. # # Usage: # export AOSENTRY_KEY="sk-..." # bash embeddings.sh # # The OpenAI-compatible /v1/embeddings endpoint accepts a single string or an # array of strings as input. The response is the standard OpenAI embedding # shape (data[].embedding is the vector). set -euo pipefail : "${AOSENTRY_KEY:?Set AOSENTRY_KEY to your minted API key (sk-...).}" BASE_URL="${AOSENTRY_BASE_URL:-https://gateway.core.aocyber.ai}" curl -i "${BASE_URL}/v1/embeddings" \ -H "Authorization: Bearer ${AOSENTRY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "model": "text-embedding-3-small", "input": [ "AOCore is an OpenAI-compatible LLM gateway.", "It adds audit, guardrails, and spend control." ] }'