Python 88.3%
TypeScript 7.6%
Shell 4.1%
1#!/usr/bin/env bash2# STATUS: LIVE_VERIFIED — executed 2026-09-19 (exit 0 in 2.5s)3# input_image with a base64 data URL on /v1/responses (32x32 PNG; min 512 pixels).4set -euo pipefail5cd "$(dirname "$0")/../../.."6source scripts/lib.sh7PNG=$(python3 -c 'import base64,struct,zlib8w=h=32; raw=b"".join(b"\x00"+b"\xff\xff\xff"*w for _ in range(h))9ch=lambda t,d: struct.pack(">I",len(d))+t+d+struct.pack(">I",zlib.crc32(t+d)&0xffffffff)10print(base64.b64encode(b"\x89PNG\r\n\x1a\n"+ch(b"IHDR",struct.pack(">IIBBBBB",w,h,8,2,0,0,0))+ch(b"IDAT",zlib.compress(raw))+ch(b"IEND",b"")).decode())')11T=$(mktemp); trap 'rm -f "$T"' EXIT12xai POST /v1/responses -d "{\"model\":\"grok-4.3\",\"store\":false,\"max_output_tokens\":2000,\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_image\",\"image_url\":\"data:image/png;base64,$PNG\",\"detail\":\"low\"},{\"type\":\"input_text\",\"text\":\"Reply with OK.\"}]}]}" > "$T"13log_request xai POST /v1/responses "$XAI_STATUS" 0.0006 "example xai/responses/image_input.sh"14mask < "$T" | python3 -c 'import json,sys; r=json.load(sys.stdin); print([o["type"] for o in r["output"]], r["usage"]["input_tokens"], "input tokens")'15[ "$XAI_STATUS" = "200" ]16