LOCK
Bash + jq with Meridian
Pipe Meridian responses through jq for one-liner chat, streaming, and embeddings from the terminal.
Chat
curl -s https://api.meridian.sh/v1/chat/completions \
-H "Authorization: Bearer $MERIDIAN_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meridian-4","messages":[{"role":"user","content":"Explain tail recursion in one sentence."}]}' \
| jq -r '.choices[0].message.content'Streaming
curl -sN https://api.meridian.sh/v1/chat/completions \
-H "Authorization: Bearer $MERIDIAN_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meridian-4","stream":true,"messages":[{"role":"user","content":"Count to 10."}]}' \
| while read -r line; do
echo "$line" | jq -r '.choices[0].delta.content // empty'
doneEmbeddings
curl -s https://api.meridian.sh/v1/embeddings \
-H "Authorization: Bearer $MERIDIAN_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meridian-embed-3","input":"ship fast"}' \
| jq '.data[0].embedding | length'Set
MERIDIAN_KEY in your environment. All endpoints require HTTPS and Bearer auth.