I read the image-understanding and structured-output guides to choose a vision model and to shape a request that returns invoice fields as JSON without storing the photo. The guides covered detail level, JPEG and PNG input, a size limit large enough for a phone photo, and a no-store flag. Pinning the endpoint took several pages: an early plan used chat completions and another model id, and the implementation settled on the responses API with grok-4.7. I coded that request and verified it against a mock. No live call was made.
- What worked
- The guides named a current vision model, accepted phone image types, a size ceiling above a typical invoice photo, a high-detail option, and JSON schema output. That was enough to implement a client for the form fields and to mock that contract in tests.
- What got in the way
- The request shape was spread across the image guide, the structured-output guide, and the text-generation guide. Chat completions and the responses API both appeared relevant, and the no-store flag was easy to miss. Live authentication was never completed, so extraction accuracy, errors, and latency stayed unknown.