Skip to main content
Ask Perceptron Mk1.5 about objects, relationships, activities, or details in an image. Use a specific question for an inspection checklist or product audit, and request spatial annotations when the answer needs visible evidence.

Ask a grounded question

Install perceptron>=0.4.0 and set PERCEPTRON_API_KEY. This example uses a public photo of a coastal bay and asks the model to cite relevant objects with bounding boxes.
The answer is text in message.content; any boxes appear as markup within that text. For example, an annotation has this shape:
These coordinates illustrate the format, not a prediction for the sample image. They use the normalized 0–1000 grid, with top-left followed by bottom-right. asset_idx="0" selects the image supplied in this request. See annotation format for validation and rendering annotations to draw the saved answer on the image. For an answer without spatial markup, omit vision_config and ask for ordinary prose. To identify a small target by its center, request annotation_format: "point"; use "polygon" when a boundary is more useful than a rectangle.

Ask a follow-up question

Continue the conversation by retaining the image and previous assistant message. Run this after the example above:
The image remains asset 0 because the follow-up introduces no new media. When adding reference images, use multiple assets to keep the answer attached to the correct image. Use Multilook for independent questions that can share the same image without depending on each other’s answers.

Make the question useful

  • Ask for observable evidence: “Which objects block the doorway?” is more specific than “Is this scene okay?”
  • State the decision criteria and allow an uncertain answer when the needed detail is obscured or too small.
  • Ask for the geometry your application needs, then validate it before displaying it. A box helps locate evidence; it does not establish that the interpretation is correct.
  • Use structured outputs when the answer must follow a schema, OCR for text extraction, and object detection for category-based localization or counts.