POST /v1/vision
Run a perception pass (unit-billed, per image)
Robot vision route (route_type: vision; task #37). Perception turn: image file(s) in, mask/annotation JSON or binary out — negotiated by the response_format form field (json, the default | binary; anything else is 400 invalid_param/response_format). Multipart/form-data ONLY; the body crosses to the card VERBATIM (the dial is POST <lane-base>/vision). Accepted form fields — model (required), one or more file FILE parts (the single-kind slot, the OCR twin), response_format. SAM point/box prompts are NOT accepted day one (automatic-mask / full-image is the day-one shape; a point or box field is 400 unknown_param — the additive later param set if a lane ever needs them). The 25 MiB multipart family cap applies (413). Metering: unit_type='images' (the existing per-image unit) — the model-reported images count on a JSON answer when it is a whole count in [1, 1e9], else the request's file-part count (files — a reported zero/negative, fractional, or absurd value on a 200 falls to the files basis). usage on a JSON answer is OUR {images, cost} at 6dp; a BINARY answer (response_format=binary) is the provider's Content-Type + bytes VERBATIM — no rewrite is possible, billing is input-side (the files basis). An unparseable 2xx JSON body relays verbatim (the row already billed by count). Lane saturation at the provider relays as CLIENT 429 rate_limited (never a 502) with the card's Retry-After forwarded when present, non-rotating, the turn unbilled. Idempotency-Key: accepted and logged, NO replay semantics (the §8 multipart family). The robot models ship UNLISTED at launch (task #37).
Request
The body is multipart/form-data — one part per field below; the sample sends it
with curl -F legs (curl owns the boundary — no Content-Type header).
Request body fields for runVision | Field | Type | Required | Description |
| model | string | yes | An IronStratum alias whose route_type is vision. |
| file | array of string (binary) | yes | One or more images (the single-kind payload slot). |
| response_format | string enum | no | json (the default) returns the annotations JSON with OUR usage; binary returns the provider's bytes verbatim under its own Content-Type. |
Responses
200 JSON (default)
200 response fields for runVision | Field | Type | Required | Description |
| annotations | array of object | no | The card's own mask/annotation shape, passed through byte-intact. |
| usage | object | no | OUR count and OUR retail cost — the card's usage block never crosses. |
400 400
400 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
401 401
401 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
402 402
402 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
403 403
403 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
404 404
404 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
413 413
413 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
429 429
429 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
500 500
500 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
502 502
502 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |
503 503
503 response fields for runVision | Field | Type | Required | Description |
| error | object | yes | — |