{"components":{"schemas":{"BoundingBox":{"properties":{"x1":{"description":"Top-left x coordinate","title":"X1","type":"number"},"x2":{"description":"Bottom-right x coordinate","title":"X2","type":"number"},"y1":{"description":"Top-left y coordinate","title":"Y1","type":"number"},"y2":{"description":"Bottom-right y coordinate","title":"Y2","type":"number"}},"required":["x1","y1","x2","y2"],"title":"BoundingBox","type":"object"},"ContentBounds":{"properties":{"bottom_y":{"description":"Bottom Y coordinate of content area (above nav bar)","title":"Bottom Y","type":"integer"},"top_y":{"description":"Top Y coordinate of content area (below notification bar)","title":"Top Y","type":"integer"}},"required":["top_y","bottom_y"],"title":"ContentBounds","type":"object"},"Detection":{"properties":{"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"Bounding box coordinates"},"class_id":{"description":"Class ID of detected object","title":"Class Id","type":"integer"},"class_name":{"description":"Class name of detected object","title":"Class Name","type":"string"},"confidence":{"description":"Detection confidence score","maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"}},"required":["bbox","confidence","class_id","class_name"],"title":"Detection","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"HashResult":{"properties":{"ahash":{"description":"Average hash of the content area","title":"Ahash","type":"string"},"content_bounds":{"anyOf":[{"$ref":"#/components/schemas/ContentBounds"},{"type":"null"}],"description":"Content area bounds used for hashing"},"dhash":{"description":"Difference hash of the content area","title":"Dhash","type":"string"},"histogram":{"anyOf":[{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"null"}],"description":"RGB histogram (3 channels, 32 bins each)","title":"Histogram"},"phash":{"description":"Perceptual hash of the content area","title":"Phash","type":"string"}},"required":["phash","ahash","dhash"],"title":"HashResult","type":"object"},"InferenceData":{"properties":{"hash_result":{"anyOf":[{"$ref":"#/components/schemas/HashResult"},{"type":"null"}],"description":"Image hash of content area"},"icon_detections":{"description":"Icon detections (YOLO)","items":{"$ref":"#/components/schemas/Detection"},"title":"Icon Detections","type":"array"},"metadata":{"$ref":"#/components/schemas/InferenceMetadata","description":"Inference metadata"},"ocr_results":{"description":"OCR text detections","items":{"$ref":"#/components/schemas/OCRResult"},"title":"Ocr Results","type":"array"}},"required":["metadata"],"title":"InferenceData","type":"object"},"InferenceMetadata":{"properties":{"icon_detections_after_nms":{"description":"Number of icon detections after NMS filtering","title":"Icon Detections After Nms","type":"integer"},"icon_detections_before_nms":{"description":"Number of icon detections before NMS filtering","title":"Icon Detections Before Nms","type":"integer"},"image_height":{"description":"Input image height","title":"Image Height","type":"integer"},"image_width":{"description":"Input image width","title":"Image Width","type":"integer"},"inference_time_ms":{"description":"Total inference time in milliseconds","title":"Inference Time Ms","type":"number"},"ocr_ns":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Nanoseconds spent in OCR","title":"Ocr Ns"},"queue_wait_ns":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Nanoseconds the job waited in the inference queue","title":"Queue Wait Ns"},"yolo_ns":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Nanoseconds spent in YOLO detection","title":"Yolo Ns"}},"required":["inference_time_ms","image_width","image_height","icon_detections_before_nms","icon_detections_after_nms"],"title":"InferenceMetadata","type":"object"},"InferenceRequest":{"properties":{"confidence_threshold":{"default":0.25,"description":"Minimum confidence threshold for detections and OCR results","maximum":1.0,"minimum":0.0,"title":"Confidence Threshold","type":"number"},"image":{"description":"Base64 encoded image data","title":"Image","type":"string"},"inference_type":{"$ref":"#/components/schemas/InferenceType","default":"combined","description":"Type of inference to perform"},"nms_iou_threshold":{"default":0.45,"description":"IoU threshold for Non-Maximum Suppression (NMS)","maximum":1.0,"minimum":0.0,"title":"Nms Iou Threshold","type":"number"},"ocr_engine":{"default":"free","description":"OCR engine to use: 'free' or 'premium'","title":"Ocr Engine","type":"string"}},"required":["image"],"title":"InferenceRequest","type":"object"},"InferenceResponse":{"properties":{"analyzer_type":{"default":"all","description":"Analyzer type used","title":"Analyzer Type","type":"string"},"data":{"$ref":"#/components/schemas/InferenceData","description":"Inference results data"},"type":{"default":"analyzer_result","description":"Response type","title":"Type","type":"string"}},"required":["data"],"title":"InferenceResponse","type":"object"},"InferenceType":{"enum":["yolo","ocr","combined"],"title":"InferenceType","type":"string"},"LocateBBox":{"description":"Pixel-space bbox returned by the VLM for the located element.","properties":{"height":{"description":"Height in pixels","exclusiveMinimum":0.0,"title":"Height","type":"integer"},"width":{"description":"Width in pixels","exclusiveMinimum":0.0,"title":"Width","type":"integer"},"x":{"description":"Top-left x in image pixels","minimum":0.0,"title":"X","type":"integer"},"y":{"description":"Top-left y in image pixels","minimum":0.0,"title":"Y","type":"integer"}},"required":["x","y","width","height"],"title":"LocateBBox","type":"object"},"LocateRequest":{"description":"Argus /inference/locate request.\n\nThe caller pre-computes OCR via /inference/infer (or reuses cached\nresults keyed by frame hash) and passes the text list here. Argus does\nNOT re-run OCR; the VLM call uses the provided `texts` as grounding\ncontext.","properties":{"image":{"description":"Base64 encoded image (PNG or JPEG)","title":"Image","type":"string"},"model":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"VLM model to use; must be one of the models from GET /inference/models. Omit to use the server's configured default. The system prompt is fixed to the element-locator task.","title":"Model"},"query":{"description":"Natural-language target description","minLength":1,"title":"Query","type":"string"},"texts":{"description":"Pre-computed OCR text elements. Empty list means Argus skips OCR grounding and asks the VLM to locate from the image alone.","items":{"$ref":"#/components/schemas/TextElementInput"},"title":"Texts","type":"array"}},"required":["image","query"],"title":"LocateRequest","type":"object"},"LocateResponse":{"description":"Argus /inference/locate response.\n\nExactly one of `matched_text_index` or `bbox` is populated when\n`found` is True. `matched_text_index` indicates the VLM grounded its\nanswer to a specific OCR text element (pixel-accurate bbox available\nvia the original `texts` list). `bbox` is a free-form VLM bbox.","properties":{"bbox":{"anyOf":[{"$ref":"#/components/schemas/LocateBBox"},{"type":"null"}],"description":"Pixel-space bbox. None when matched_text_index is set or found=False."},"completion_tokens":{"default":0,"description":"Completion (output) tokens the model billed for this call","minimum":0.0,"title":"Completion Tokens","type":"integer"},"confidence":{"description":"Model self-reported confidence","maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"cost_microdollars":{"description":"Provider-reported cost in microdollars","minimum":0.0,"title":"Cost Microdollars","type":"integer"},"found":{"description":"Whether the VLM located the target","title":"Found","type":"boolean"},"latency_ms":{"description":"End-to-end VLM call latency","minimum":0.0,"title":"Latency Ms","type":"integer"},"matched_text_index":{"anyOf":[{"minimum":0.0,"type":"integer"},{"type":"null"}],"description":"Index into the request `texts` list when the answer is OCR-grounded.","title":"Matched Text Index"},"model":{"description":"Model identifier returned by the provider","title":"Model","type":"string"},"prompt_tokens":{"default":0,"description":"Prompt (input) tokens the model billed for this call","minimum":0.0,"title":"Prompt Tokens","type":"integer"}},"required":["found","confidence","model","cost_microdollars","latency_ms"],"title":"LocateResponse","type":"object"},"ModelInfo":{"description":"One supported model and its pricing, as a standard /v1/models catalog row.","properties":{"context_window":{"description":"Maximum context window, in tokens.","title":"Context Window","type":"integer"},"id":{"description":"Model identifier, e.g. 'anthropic/claude-sonnet-4.5' or 'axilio/argus-ocr-pro-1'. VLM ids are passed as `model` to /vision/locate; Axilio ids identify the engine behind /vision/detect calls (selected via `ocr_engine` / `inference_type`) and are what usage rows are labeled with.","title":"Id","type":"string"},"name":{"description":"Human-readable model name.","title":"Name","type":"string"},"object":{"const":"model","default":"model","title":"Object","type":"string"},"owned_by":{"description":"Model provider, e.g. 'anthropic' or 'axilio'.","title":"Owned By","type":"string"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"type":{"description":"Model type: 'vlm' for the vision-language models served by /vision/locate; 'detect', 'ocr', and 'vision' for the Axilio model line behind /vision/detect.","title":"Type","type":"string"}},"required":["id","name","owned_by","type","context_window","pricing"],"title":"ModelInfo","type":"object"},"ModelPricing":{"description":"The customer's billed rates in USD.\n\nVLMs price per token (input/output); the Axilio model line prices per\npage, where one screenshot is one page \u2014 so per_page reads as the price\nof one call. A rate is \"0\" when that unit is free for the model.","properties":{"input":{"description":"USD per input token.","title":"Input","type":"string"},"output":{"description":"USD per output token.","title":"Output","type":"string"},"per_page":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"USD per page (one screenshot = one page) for the per-page-billed Axilio models. Absent for per-token models.","title":"Per Page"}},"required":["input","output"],"title":"ModelPricing","type":"object"},"OCRResult":{"properties":{"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"Bounding box around text region"},"confidence":{"description":"OCR confidence score","maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"text":{"description":"Detected text content","title":"Text","type":"string"}},"required":["text","confidence","bbox"],"title":"OCRResult","type":"object"},"SupportedModelsResponse":{"description":"Response for GET /vision/models.\n\nLists every model Argus supports, each with its final post-markup\npricing: the curated VLMs for the element-locator task (per-token\npricing; pass their id as `model` to /vision/locate) and the Axilio\nmodel line behind /vision/detect (per-page pricing; selected via the\n`ocr_engine` and `inference_type` request fields \u2014 lite = the free\nengine, pro = premium). Lets a client compare cost and validate\n`find(model=...)` up front instead of round-tripping to /locate and\ngetting a 400.\n\nThe VLM set is curated: `/locate` enforces it \u2014 an unsupported model is\nrejected, so this is the authoritative allowlist, not just advisory.\nThe Axilio ids are not /locate targets.\n\nShaped like a standard /v1/models response ({object: \"list\", data: [...]}).","properties":{"data":{"description":"Supported models, sorted by id.","items":{"$ref":"#/components/schemas/ModelInfo"},"title":"Data","type":"array"},"object":{"const":"list","default":"list","title":"Object","type":"string"}},"required":["data"],"title":"SupportedModelsResponse","type":"object"},"TextElementInput":{"description":"OCR-detected text element to seed the VLM's grounding context.","properties":{"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"Normalized [0, 1] bbox in the source image"},"text":{"description":"OCR'd text content","title":"Text","type":"string"}},"required":["text","bbox"],"title":"TextElementInput","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}},"securitySchemes":{"AxilioApiKey":{"description":"Axilio API key (axl_*).","in":"header","name":"X-Axilio-Api-Key","type":"apiKey"}}},"info":{"title":"Argus","version":"1.3.0"},"openapi":"3.1.0","paths":{"/api/v1/vision/detect":{"post":{"operationId":"detect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"AxilioApiKey":[]}],"summary":"Run Inference","tags":["Vision"]}},"/api/v1/vision/locate":{"post":{"operationId":"locate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"AxilioApiKey":[]}],"summary":"Run Locate","tags":["Vision"]}},"/api/v1/vision/models":{"get":{"description":"List every model Argus supports, with pricing.\n\nTwo families: the curated VLMs served by /vision/locate (per-token\npricing; pass their id as `model`) and the Axilio model line behind\n/vision/detect (per-page pricing; selected via `ocr_engine` /\n`inference_type` \u2014 lite is the free engine, pro is premium).\n\nPublic: no API key required (it's a catalog of model names and public\nprices, nothing sensitive), so a client can discover supported models\nbefore it holds credentials. The SDK fetches this once, caches it, and\nvalidates find(model=...) locally so a typo fails fast with a clean\nerror instead of a 400 from /locate.","operationId":"list_models","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedModelsResponse"}}},"description":"Successful Response"}},"summary":"List Models","tags":["Vision"]}}}}