匠人学院 JR Academy
Skip to article
Learning guide
OpenAI API Guide

Build with the OpenAI API using Responses API, streaming, tools, embeddings, and multimodal inputs.

3 chapters·9 guides·Access varies by chapter
Vision
On this page

Vision with the OpenAI API

Use image understanding for a first analysis of screenshots, documents or mixed visual/text material, with appropriate rule or human verification. It is not error-free OCR or a final financial approval mechanism.

#Responses example

python
import os from openai import OpenAI client = OpenAI(timeout=30.0) response = client.responses.create( model=os.environ["OPENAI_VISION_MODEL"], input=[{ "role": "user", "content": [ {"type": "input_text", "text": "Describe the visible layout and uncertainties."}, {"type": "input_image", "image_url": os.environ["IMAGE_URL"], "detail": "auto"}, ], }], ) print(response.output_text)

Use an authorized image and a model that supports the chosen input. Supported workflows can use an image URL, a base64 data URL or an uploaded file reference; check the current endpoint requirements.

#Detail and cost

Where supported, low/high/auto detail controls trade input handling and detail inspection. Start with the detail the task needs rather than assuming the largest image always yields the best result.

#Review boundaries

Check tiny text, ambiguous fields, crop/orientation, missing context and any important extracted figures against the original. Preserve uncertainty instead of turning a plausible observation into a confirmed fact.

#Reference

Published by
JR Academy
Learning resources

Individual authors and reviewers are credited where recorded.

System Design

Core system design concepts and practical case studies

Learn the trade-offs and patterns that matter in technical interviews.

Open System Design →

Related Roadmaps

Done reading? Next steps