Manina AI API · Manina-4B-Lite

API reference

Powered by Manina-4B-Lite. Send a phone screenshot and one instruction to POST /v1/locate, or step through a whole task with POST /v1/act and the manina CLI.

Full model, POST /v1/act & CLI guide →

Locate

POSThttps://llm.manina.ai/v1/locate

Finds the on-screen element that one instruction describes, in a screenshot from an iPhone or Android phone.

It returns the point to tap and the element’s box in the pixels of the image you sent, whether the element is on screen at all, and a confidence score.

When on_screen is false the point and box are still the model’s best guess; don’t tap them, change the screen or the instruction instead.

Every successful answer is billed, including “not on screen”. Errors are never billed.

Authentication

Send your API key as a bearer token. Create one on the API keys page of your account. Live keys start with hsk_live_; sandbox keys start with hsk_test_. Get an API key →

Authorization: Bearer $MANINA_API_KEY

Request

cURL
{ printf '{"image":"'; base64 < 'screenshot.png' | tr -d '\n'; printf '","text":%s}' '"Settings app icon"'; } |
curl https://llm.manina.ai/v1/locate \
  -H "Authorization: Bearer $MANINA_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @-

Streams the screenshot’s base64 straight into curl, so large images never hit the shell’s argument limit.

Parameters

Headers

NameTypeRequiredDescription
AuthorizationheaderyesBearer hsk_live_… (or hsk_test_… in sandbox).
Content-Typeheaderyesapplication/json. Request body up to 12 MB.

Body (JSON)

NameTypeRequiredDescription
imagestringyesBase64 of the screenshot. Formats: png, jpeg, webp. A data:image/…;base64, prefix is accepted and removed. Any size.
textstringyesWhat to find, in plain language, 1 to 1,000 characters after trimming. Any language.
min_presentnumbernoThreshold from 0 to 1 for on_screen, applied to both present_prob and confidence. Default 0.5. Raise it to tap only when the model is surer the target is there and of its box.

Unknown fields are rejected with 400 invalid_request.

Response

Example response
{
  "id": "loc_2f7c9a1e0b6d4f3a",
  "point": {"x": 1203, "y": 330},
  "box": [1112, 266, 1294, 394],
  "on_screen": true,
  "present_prob": 0.998,
  "confidence": 0.93,
  "image": {"width": 1320, "height": 2868},
  "latency_ms": 268,
  "model": "manina-locate-1"
}
FieldTypeDescription
idstringCall ID, loc_ followed by 16 hex characters.
pointobject{x, y}: the box centre, integer pixels of your original image. Tap here when on_screen is true.
boxarray[x1, y1, x2, y2]: integer pixels of your original image, clamped into it.
on_screenbooleantrue when present_prob ≥ min_present and confidence ≥ min_present (an occluded or ambiguous target with a weak box stays false).
present_probnumber0 to 1: how likely the target is on this screen.
confidencenumber0 to 1: how sure the model is about the box. A ranking signal, not a calibrated probability.
imageobject{width, height} of the image you sent, after decoding.
latency_msintegerServer time from receiving the request to answering (84 ms /v1/locate, 113 ms /v1/act server P50 on A100). Your network round trip comes on top.
modelstringModel that answered. Values: manina-locate-1.

Errors

Errors are JSON: {"error": {"code": "…", "message": "…"}}. None of them is billed.

503 busy
{
  "error": {
    "code": "busy",
    "message": "The model is busy. Retry after 1 second."
  }
}
StatusCodeMeaningWhat to do
400invalid_requestBad JSON, unknown field, or text empty or over 1,000 characters.Fix the request.
400invalid_imageThe image could not be decoded or is too large.Send a PNG, JPEG or WebP screenshot.
401unauthorizedNo bearer token, or an unknown one.Send Authorization: Bearer hsk_live_….
401key_invalidThe key was revoked or rotated.Create a new key in your account.
402insufficient_balanceYour balance cannot cover the call.Top up, or turn on Auto Top-up.
402key_limitThe key reached its own spending limit.Raise the key’s limit or use another key.
503busyThe model could not take the call within 2 s. Comes with Retry-After: 1.Wait a second and retry.
503model_unavailableThe model is down or gave a bad answer.Retry with backoff.
503billing_unavailableBilling could not be reached to authorize the call.Retry with backoff.

Pricing & CLI

  • $0.30 per 1,000 calls ($0.0003 per call) for both POST /v1/locate (manina-locate-1) and POST /v1/act (manina-act-1), flat. Image size and instruction length don’t change the price.
  • Every 200 answer is billed, including on_screen: false. Errors, busy and timeouts are free.
  • New accounts get $1 of free credit once (about 3,333 calls; never expires, non-refundable) for the Playground, Web App, and the manina CLI (npm i -g manina).
  • Developer API keys (hsk_live_…) use prepaid balance: top up from $5 on the billing page, or let Auto Top-up refill your balance when it runs low.

Billing and top-ups →

Image tips

  • Send the whole screen as captured. Don’t crop to the area you expect; the model needs the context.
  • Any size works. The server resizes to 540 pixels wide JPEG before the model sees it: that is the input it was evaluated on, so sending a 540-wide JPEG yourself saves upload time and loses nothing.
  • Coordinates come back in the pixels of the image you sent. On an iPhone, divide by the screen scale (usually 3) to get points.
  • Describe one element. “Settings app icon” works better than “open Settings and then Wi-Fi”.

Reading the scores

  • Use on_screen to decide whether to tap. Raise min_present when a wrong tap is costly.
  • confidence is a ranking signal, not a calibrated probability: a higher score is more likely right, but 0.9 does not mean right 9 times in 10.
  • Use it to compare answers, for example several phrasings of the same instruction, or to decide when to take a fresh screenshot and ask again.