Report & Balance API (POST /v1/report & GET /v1/balance)
Opt-in Bad-Case Report (POST /v1/report)
Section titled “Opt-in Bad-Case Report (POST /v1/report)”POSThttps://llm.manina.ai/v1/report
Paid Developer API calls (POST /v1/locate and POST /v1/act with hsk_live_…) enforce zero content retention: screenshots, prompts, and responses are processed in memory only and are never written to disk or read proactively by our team. When you encounter a bad case in evaluation or production and want engineering review, call POST /v1/report to either flag the prior response id (loc_… or act_…) with a short tag/note, or explicitly attach the bad-case screenshot, input, output, and expected result. Calls to POST /v1/report are free ($0) and work even when your wallet balance is $0.
Request (POST /v1/report)
Section titled “Request (POST /v1/report)”curl -sS https://llm.manina.ai/v1/report \ -H "Authorization: Bearer $MANINA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "call_id": "loc_2f7c9a1e0b6d4f3a", "reason": "false_positive", "note": "Bottom Home tab was hidden behind a full-screen sheet" }'import base64import jsonimport osimport urllib.request
with open("bad_case.jpg", "rb") as f: image_b64 = base64.b64encode(f.read()).decode("ascii")
payload = { "call_id": "act_2f7c9a1e0b6d4f3a", "reason": "risky_action", "note": "Modal popped up while goal was Save draft", "input": {"goal": "Save draft", "plan": "1. Tap Save draft"}, "output": {"op": "TAP", "step": "other", "op_prob": 0.78}, "expected": {"op": "BACK"}, "tags": ["modal", "safety"], "image": image_b64,}
req = urllib.request.Request( "https://llm.manina.ai/v1/report", data=json.dumps(payload).encode("utf-8"), headers={ "Authorization": f"Bearer {os.environ['MANINA_API_KEY']}", "Content-Type": "application/json", }, method="POST",)with urllib.request.urlopen(req) as resp: print(json.loads(resp.read().decode("utf-8")))const response = await fetch('https://llm.manina.ai/v1/report', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MANINA_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ call_id: 'loc_2f7c9a1e0b6d4f3a', reason: 'wrong_box', expected: 'Bottom Home tab icon, not top filter chip', }),});
console.log(await response.json());Parameters (POST /v1/report)
Section titled “Parameters (POST /v1/report)”Provide at least one of call_id, reason, note, expected, or image. Unknown JSON fields return 400 invalid_request.
| Name | Type | Required | Description |
|---|---|---|---|
call_id |
string | no | Response id from /v1/locate (loc_…) or /v1/act (act_…), 1 to 128 characters. Alias request_id is also accepted. |
endpoint |
string | no | Enum values: "locate", "act". Inferred automatically when call_id starts with loc_ or act_. |
reason |
string | no | 1 to 200 characters (default "bad_case"). Recommended labels: "false_positive", "false_negative", "wrong_box", "wrong_op", "risky_action", "other". |
note |
string | no | Free-text description of what went wrong, up to 4,000 characters. |
expected |
string | object | no | Expected target, coordinate, or action (JSON-serializable, up to 8,000 bytes). |
input |
object | no | Request parameters you sent on the failed step (up to 16,000 bytes; an inline input.image is promoted automatically if top-level image is omitted). |
output |
object | no | Response JSON returned on the failed step (up to 16,000 bytes). |
tags |
string[] | no | Up to 16 short labels (1 to 64 characters each) for grouping evaluation runs. |
image |
string | no | Optional opt-in base64 screenshot (PNG, JPEG, or WebP, up to 8 MiB decoded). Stored privately with explicit report consent; your raw API key is never stored. |
Example response (POST /v1/report)
Section titled “Example response (POST /v1/report)”{ "id": "rep_9a3f1c8e4b20d7a1", "status": "recorded", "call_id": "loc_2f7c9a1e0b6d4f3a", "has_image": false}statusenum value:"recorded".- Rate limit: 2,000 reports per API key per UTC day (
429 rate_limitedwithRetry-After: 60), 40 req/s per IP, $0 charge.
Wallet Balance Lookup (GET /v1/balance)
Section titled “Wallet Balance Lookup (GET /v1/balance)”GEThttps://llm.manina.ai/v1/balance
Returns the current spendable prepaid balance and estimated remaining calls for the authenticated API key without counting as a model call or holding funds. Use this before launching long evaluation batches or automated schedules to verify remaining credit programmatically. Calls to GET /v1/balance (and the upstream account summary GET https://api.manina.ai/api/key/summary) are free ($0).
Request (GET /v1/balance)
Section titled “Request (GET /v1/balance)”curl -sS https://llm.manina.ai/v1/balance \ -H "Authorization: Bearer $MANINA_API_KEY"import json, os, urllib.request
req = urllib.request.Request( "https://llm.manina.ai/v1/balance", headers={"Authorization": f"Bearer {os.environ['MANINA_API_KEY']}"},)with urllib.request.urlopen(req) as resp: bal = json.loads(resp.read().decode("utf-8"))print(f"${bal['balance_usd']:.2f} (~{bal['calls_remaining_estimate']} calls left)")const res = await fetch('https://llm.manina.ai/v1/balance', { headers: { Authorization: `Bearer ${process.env.MANINA_API_KEY}` },});const bal = await res.json();console.log(`$${bal.balance_usd} (~${bal.calls_remaining_estimate} calls left)`);Parameters (GET /v1/balance)
Section titled “Parameters (GET /v1/balance)”| Name | Location | Required | Description |
|---|---|---|---|
Authorization |
header | yes | Bearer hsk_live_… (or Bearer hsk_test_… in Sandbox). |
Example response (GET /v1/balance)
Section titled “Example response (GET /v1/balance)”{ "balance_usd": 4.99, "balance_cents": 499, "calls_remaining_estimate": 16633, "used_cents": 0, "included_cents": 0, "manage_url": "https://manina.ai/account/billing"}| Field | Type | Description |
|---|---|---|
balance_usd |
number | Spendable balance in US dollars (excluding in-flight holds; 0 if the account is on hold). |
balance_cents |
integer | Spendable balance in whole US cents. |
calls_remaining_estimate |
integer | Approximate /v1/locate or /v1/act calls remaining at $0.0003 per call. |
used_cents |
integer | Included monthly subscription allowance used in US cents (0 for pure prepaid top-up accounts). |
included_cents |
integer | Included monthly subscription allowance in US cents (0 without an active subscription). |
plan |
string | Present when an account subscription is active (e.g. "Starter", "Pro"). |
status |
string | Subscription status enum when present: "active", "past_due", "canceled". |
manage_url |
string | Billing page URL for top-ups and Auto Top-up settings. |
