Documents and images
SubQ Snap takes text and images, not files. Send a document's text as
state, and add images to judge what they show. Both go in the same
Decisions API request as your questions.
Documents
Use a document to fact-check a claim against its source, find the passage that backs an answer, or tag a record from its text.
The Decisions API takes no files. To ask about a PDF, Word file, or other
document, extract its text and send it as state, on its own or as a field
next to other data. Run OCR on scanned PDFs first.
- Label the parts. Mark pages, sections, or passages in the text, like
[P2]or--- page 24 ---, so options can name them. - Ask where. A choice whose options are those labels returns a probability
for each location. Add an option like
not_foundfor when the document doesn't say.
Send the text as a state field, and use the labels as choice options:
best_passage returns "choice": "P2" with a probability for every label,
including not_found.
Images
Judge photos or screenshots alongside the text, such as checking that a
listing's photos match its description, or that a screenshot shows a step is
done. Send each image as base64, with no URL or data: prefix:
- Cost: each image costs 66 to about 1,600 input tokens, set by resolution rather than file size. Downscale anything above about 1.6 megapixels to cut the cost.
- Video: not supported. Sample up to 4 frames and send them as images.
Formats, size limits, and image errors are in Images on the API reference.
Next steps
- Make a decision: question types and reliable decision workflows.
- Decisions API: every field, limit, and error.