Which model ID should I use?
Usemodel="perceptron-mk1.5" for the workflows in this version of the documentation. Configure the client with Perceptron’s API URL and key as shown in Python setup.
Can I pass a local image, video, or audio path?
Yes, wrap the path withimage(), video(), or audio() in a message’s content list. The SDK reads the file and encodes it inline; the API never reads a path on your computer. To upload once and reuse the media, call client.files.upload() and pass the returned File to the matching helper. See Files. A remote URL must return accessible media bytes; a link to an authenticated viewing page is not enough.
The MCP bridge has separate local-file handling: it reads and uploads the file before making a vision request.
How do I ask a follow-up question?
Resend the conversation history, including the relevant media and prior assistant messages. The API does not recover earlier turns automatically. Preserve complete assistant messages in your client-side history, includingreasoning_content and function calls when present. Historical reasoning is passed to the model for requests with tool declarations or tool traffic; the gateway omits it from ordinary non-tool requests. See Request basics.
Why are coordinates in the answer text?
Spatial and temporal annotations remain available as markup inresponse.text. Call response.annotations(strict=True) to parse boxes, points, polygons, clips, and tracks, then response.resolve_asset_idx(annotation) to select the media from that request. Use that asset’s dimensions when converting to pixels. Parsing does not verify that the prediction is correct.
Use Rendering annotations for a worked example. For video, preserve timestamped observations and object identity as described in Video tracking.
Can I send several assets together?
Yes. Put the media parts in the message’s content list and keep their order stable across follow-up requests. The optionalasset_idx attribute is the zero-based index of a media occurrence available at that point in the conversation; it is not a file ID or video frame index. Numbering continues across messages and turns. If the attribute is neither explicit nor inherited, it defaults to the last asset available at that point. Media added later does not change the target of an earlier annotation. See Multiple assets for the ordering rules.
How do I make asynchronous requests?
UseAsyncClient and await the request. This complete text example uses the same API settings as the synchronous client:
await main() instead of asyncio.run(main()). Bound concurrent requests as described in Scaling.
Does receiving text mean the response is complete?
No. Check the finalfinish_reason before using an answer. A length finish means the output was truncated. Streaming consumers must also handle empty-choice usage chunks, nullable deltas, and API errors after streaming has begun. See the tracking stream example and Error messages.
For JSON output, parse and validate only a successfully completed result; see Structured outputs.