This guide was prepared with AI assistance using the linked documentation. Code examples are illustrative; verify them against your environment and current API documentation before use.
Begin with a question the image can answer
A photo of a delivery label may help an operator find a printed order number. It doesn't establish that the order belongs to the current user or that the package has arrived. Define the exact task and keep authorization checks in your application.
OpenAI's vision guide describes image inputs by URL, base64 data URL, or file ID. Check the current model's supported inputs and request limits before choosing an upload path.
Prepare readable inputs
Test with the images people actually submit: small labels, glare, rotations, unusual crops, and different languages. The provider notes that small or rotated text can be difficult to read, images can be resized, and original filenames or metadata are not processed by the model.
Keep metadata you need in your own application record. If a crop improves the task, preserve the original and ensure the crop doesn't remove context needed to interpret it.
Set a review boundary
Treat the model output as a proposed interpretation. For a high-impact field such as an amount or identifier, show the relevant image beside the extracted value and let an authorized person correct it before submission.
Vision models can misdescribe images, miscount objects, or struggle with precise spatial tasks. The provider also says its models are not suitable for interpreting specialized medical images. Match the workflow's risk to the review it receives.
Check file handling
- Allow only formats and sizes your application and the selected API support.
- Protect uploaded files with access controls and an explicit retention period.
- Reject a remote URL if your application cannot safely fetch it under its own network policy.
- Avoid treating visible instructions in an image as instructions to the application.
- Keep uploaded images and access tokens out of routine logs.
Make uncertain output usable
Provide an ‘unable to read’ state rather than forcing a guess into a required field. The example below shows an application-level result shape. It is not an API response schema, and it doesn't measure model confidence.
type FieldForReview = {
value: string | null;
status: "needs-review" | "confirmed" | "unreadable";
note?: string;
};Evaluate against known answers
Create a small synthetic set with expected values and include missing text, cropped labels, glare, rotated images, and an image from the wrong account. Measure whether the extracted value is correct and whether the human review path catches errors.
Repeat the set when you change the model, prompt, image preprocessing, or output schema. Keep examples and test fixtures free of private customer material unless you have the necessary permissions.
Work through a delivery-label example
A customer uploads a label and your application asks for an order number. The model proposes a value, but the label may be blurred, cropped, or attached to a different account. Show the proposal beside the image and let the authorized operator compare it with the source. Check the confirmed value against the user's permitted orders on the server.
If the image is unreadable, offer a way to enter the value manually or upload a clearer photo. If the model returns a plausible-looking number that doesn't match an allowed order, do not disclose details of an unrelated order. A null or unreadable state is a useful outcome when the evidence isn't sufficient.
The result type shown above is an application design example. It deliberately does not include a numeric confidence score, because the example hasn't established how such a score would be produced or calibrated.
Build a repeatable image test set
Create synthetic labels with known values and variants: a sharp image, a small crop, a rotated label, a glare-obscured number, and two similar identifiers on the same page. Include an image with no identifier and one whose identifier belongs to a different synthetic account. Record the expected action as well as the expected extracted text.
For every case, check whether the model's proposal is accurate, whether the person reviewing it can see the relevant source, and whether the application prevents unauthorized access. Record the input preparation, model, prompt, schema, and date so your team can repeat the test after a change.
The vision guide documents limits such as small text, rotation, approximate counting, and image resizing. Those limits should shape your tests. They don't tell you the error rate for your own images; measure that rate before setting an operational threshold.
Add a case where the correct value appears twice with different labels, such as an order number and a tracking number. The expected result should say which label is relevant, not merely which digits are visible. Reviewers can then distinguish a reading error from a task-definition error. When the source lacks the required label, test the manual-entry path rather than grading a guessed value as correct.
Sources and further reading
Documentation reviewed November 9, 2026. Verify current model support, limits and pricing before implementation.
