stream=false

if [ "$stream" = true ]; then
    accept_header='Accept: text/event-stream'
else
    accept_header='Accept: application/json'
fi

image_b64=$( base64 image.png )

echo '{
  "model": "meta/llama-4-maverick-17b-128e-instruct",
  "messages": [
    {
      "role": "user",
      "content": "What is in this image? <img src=\"data:image/png;base64,'"$image_b64"'\" />"
    }
  ],
  "max_tokens": 512,
  "temperature": 1.00,
  "top_p": 1.00,
  "stream": false
}' > payload.json

curl https://integrate.api.nvidia.com/v1/chat/completions \
  -H "Authorization: Bearer 
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" \
  -H "Content-Type: application/json" \
  -H "$accept_header" \
  -d @payload.json

