Inference APIs
Models/Vision/OmniParser V2
This model is temporarily unavailable. Requests may fail until it is restored.
VisionUI element detectionOCR
Modality
Image → Structured data
Price
$0.003 / request
Model ID
omniparser2

Quickstart

You need an API key to call this model. Create a free account or log in.

Set INFERENCE_API_KEY to your key from the API Keys page, then run:

import base64, os, requests

with open("screenshot.png", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://api.inferenceapis.com",
    headers={"Authorization": f"Bearer {os.environ['INFERENCE_API_KEY']}"},
    json={"model": "omniparser2", "base64_image": image_b64},
)
print(response.json())
import { readFile } from "node:fs/promises";

const image = await readFile("screenshot.png");
const response = await fetch("https://api.inferenceapis.com", {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.INFERENCE_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "omniparser2", base64_image: image.toString("base64") }),
});
console.log(await response.json());
curl https://api.inferenceapis.com \
  -H "Authorization: Bearer $INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"model\": \"omniparser2\", \"base64_image\": \"$(base64 -w0 screenshot.png)\"}"

Endpoint

POST https://api.inferenceapis.com
Headers Authorization: Bearer $INFERENCE_API_KEY
Content-Type: application/json

Model IDs and aliases

Send any of these as model; they all resolve to this model.

IDNote
omniparser2Canonical
omniparser-v2Alias
omniparserAlias

Request body

ParameterTypeDescription
model required string Model ID: omniparser2
base64_image required string The screenshot to parse, base64-encoded (PNG or JPEG).
box_threshold number Confidence threshold for detected UI elements. Default 0.05.
iou_threshold number Overlap threshold for merging duplicate boxes. Default 0.7.
text_threshold number Confidence threshold for text detection. Default 0.8.
use_paddleocr boolean Use PaddleOCR for text recognition. Default true.

Response

200 OK · application/json
{
  "processed_image": "iVBORw0KGgoAAAANSUhEUgAA...",
  "detected_elements": ["Icon Box ID 0: Search", "Text Box ID 1: Sign in", "..."]
}

Pricing

Price$0.003 / request
BillingPay as you go from prepaid credits. No subscription, no daily request or token cap. See all pricing.

Errors

Errors use the OpenAI envelope: {"error": {"message", "type", "code"}}. 401 missing or invalid key · 402 insufficient_balance · 404 model_not_found · 503 model_unavailable. See the error reference and provider error guides.