వాటర్ మీటర్ OCR API
వాటర్ మీటర్ OCR API. ఈ పేజీ థర్డ్-పార్టీ ఇంటిగ్రేషన్ల కోసం వెబ్సైట్ బ్యాకెండ్ ద్వారా బహిర్గతం చేయబడిన పబ్లిక్ HTTP APIని డాక్యుమెంట్ చేస్తుంది.
నిజమైన అప్లోడ్తో ప్రారంభించండి
ముందుగా నమోదు చేసుకోండి, వర్క్స్పేస్లో మీ స్వంత వాటర్ మీటర్ ఫోటోను అప్లోడ్ చేయండి, ఆపై మీరు ఇంటిగ్రేట్ చేయడానికి సిద్ధంగా ఉన్నప్పుడు API కీని సృష్టించండి.
అవలోకనం
- అన్ని బాహ్య ఏకీకరణల కోసం వెబ్సైట్ బ్యాకెండ్ని ఉపయోగించండి.
- మూడవ పక్ష ప్రోగ్రామ్ల నుండి నేరుగా waterMeterAiకి కాల్ చేయవద్దు.
- ఓపెన్ API వెబ్ పోర్టల్ వలె అదే వినియోగదారులు, కోటా, కాష్, టాస్క్లు మరియు ఆడిట్ నియమాలను పంచుకుంటుంది.
- బ్యాకెండ్ డిప్లాయ్మెంట్ కాన్ఫిగరేషన్ ప్రకారం వివిధ దిగువ AI సేవలను ఎంచుకోవచ్చు.
- టాస్క్ ప్రతిస్పందనల్లో ఇప్పుడు సాధారణ result_summary ఆబ్జెక్ట్ ఉంటుంది; అందువల్ల వివిధ సేవలు వివిధ ఫలితాల రకాలను చూపగలవు.
ప్రమాణీకరణ
- వెబ్సైట్లో సైన్ ఇన్ చేయండి మరియు API కీస్ పేజీలో API కీని సృష్టించండి.
- పూర్తి API కీ సృష్టించబడినప్పుడు ఒక్కసారి మాత్రమే చూపబడుతుంది.
- ప్రతి అభ్యర్థనపై Authorization హెడర్లో కీని పంపండి.
Authorization: Bearer wm_xxxxxxxxxxxxxxxxx
API Key Permissions and Limits
- Each API key can have independent scopes, an IPv4/IPv6/CIDR allowlist, a total requests-per-minute limit, and a task submissions-per-minute limit.
- A valid key without the required scope or outside its source IP allowlist returns 403.
- Every valid-key request consumes the total request limit, including requests rejected by scope, IP, or submission policy.
- Batch requests consume one total request unit and one submission unit per uploaded file.
- Rate-limited responses return 429 with Retry-After and both X-RateLimit-* and X-SubmissionLimit-* headers.
- Task creation also has a per-key concurrency limit and returns X-ConcurrencyLimit-* headers; a concurrency rejection uses 429.
- For batch concurrency, only files that pass image validation reserve slots, and success headers report the actual active slots after task binding.
Retry-After: 30 X-RateLimit-Limit: 60 X-RateLimit-Remaining: 59 X-RateLimit-Reset: 1785902400 X-SubmissionLimit-Limit: 10 X-SubmissionLimit-Remaining: 9 X-ConcurrencyLimit-Limit: 3 X-ConcurrencyLimit-Active: 1 X-ConcurrencyLimit-Remaining: 2
అప్లోడ్ నియమాలు
- గరిష్ట ఫైల్ పరిమాణం: ప్రతి చిత్రానికి 20MB.
- మద్దతు ఉన్న ఫార్మాట్లు: JPEG, PNG, WEBP.
- బ్యాకెండ్ ఫైల్ ఎక్స్టెన్షన్ మాత్రమే కాకుండా వాస్తవ ఫైల్ కంటెంట్ను ధృవీకరిస్తుంది.
అప్లోడ్ సైజ్ ఎన్ఫోర్స్మెంట్
- ప్రతి చిత్రానికి 20MB పరిమితి మరియు 20MB మొత్తం ఫైల్-కంటెంట్ పరిమితితో బ్యాచ్ అప్లోడ్లు డిఫాల్ట్గా గరిష్టంగా 8 చిత్రాలను అంగీకరిస్తాయి.
- పరిమితిని మించిన ఫైల్ లేదా బ్యాచ్ ఇమేజ్ ధ్రువీకరణ లేదా టాస్క్ సృష్టికి ముందు 413ని అందిస్తుంది; పాక్షిక బ్యాచ్ సృష్టించబడలేదు.
- Content-Length తప్పిపోయినప్పుడు లేదా చంక్డ్ బదిలీని ఉపయోగించినప్పుడు కూడా బ్యాకెండ్ వాస్తవ స్వీకరించిన బైట్ గణనను అమలు చేస్తుంది.
టాస్క్ స్టేట్స్
- queued: ఆమోదించబడింది మరియు AI ప్రాసెసింగ్ కోసం వేచి ఉంది.
- running: ప్రస్తుతం ప్రాసెస్ అవుతోంది లేదా డిస్పాచర్కు అప్పగించిన తర్వాత తుది ఫలిత స్థితిని క్రమం తప్పకుండా తనిఖీ చేస్తోంది.
- batch_waiting_ai: బ్యాచ్లోని ప్రతి అంశం AI సేవ తిరిగి ఆన్లైన్లోకి రావడానికి వేచి ఉంది.
- batch_running: బ్యాచ్ ఇప్పటికే డిస్పాచర్కు అప్పగించబడింది మరియు ఇంకా ప్రాసెస్ చేయబడుతోంది.
- done: విజయవంతంగా పూర్తయింది.
- failed: ప్రాసెసింగ్ విఫలమైంది.
- waiting_ai: AI సేవ తిరిగి ఆన్లైన్లోకి వచ్చే వరకు క్యూలో ఉంది, తర్వాత అది స్వయంచాలకంగా తిరిగి ప్రారంభమవుతుంది.
ఫలితాల మూలాలు
- fresh: కొత్త AI అమలు ద్వారా రూపొందించబడింది.
- cached_exact: ప్రస్తుత AI వెర్షన్ కాష్తో సరిపోలింది.
- cached_stale: AI ఆఫ్లైన్, తాజా కాష్ చేసిన ఫలితం తిరిగి వచ్చింది.
- pending: ఇంకా తుది ఫలితం లేదు.
- failed: టాస్క్ విఫలమైంది.
- టాస్క్ ఇంకా పూర్తికాకపోతే, తాజా మళ్లీ ప్రయత్నించే లేదా వేచి ఉండే కారణం కోసం error_messageను తనిఖీ చేయండి.
కోటా మరియు బిల్లింగ్
- మీ ఏకీకరణ కోటా వైఫల్యాలను నివారించాలంటే పెద్ద పనిభారాన్ని సమర్పించే ముందు `GET /api/open/quota`ని ఉపయోగించండి.
- `fresh` AI పరుగులు మాత్రమే కోటాను వినియోగించుకుంటాయి.
- `cached_exact`, `cached_stale`, `pending`, మరియు `failed` ఫలితాలు కోటాను వినియోగించవు.
- ఉచిత ఖాతాలు ముందుగా రోజువారీ కోటాను ఉపయోగిస్తాయి. చెల్లింపు ఖాతాలు సక్రియ కాలానుగుణ కోటా ప్యాకేజీలను ఉపయోగిస్తాయి, ఆపై బ్యాకెండ్ విధానం ప్రకారం తాత్కాలిక లేదా స్థిర కోటాను ఉపయోగిస్తాయి.
- కోటా అయిపోయినప్పుడు, టాస్క్ సమర్పణ `429`ని అందిస్తుంది మరియు కొత్త టాస్క్ని సృష్టించే బదులు దోష సందేశాన్ని కలిగి ఉంటుంది.
కాష్ మరియు ఫలితం తాజాదనం
- బ్యాకెండ్ ఇమేజ్ హాష్ మరియు AI వెర్షన్ ఆధారంగా విజయవంతమైన ఫలితాలను కాష్ చేస్తుంది; ఇందులో దిగువ సేవ namespace కూడా ఉంటుంది.
- `cached_exact` అంటే అదే చిత్రం ప్రస్తుత AI సంస్కరణకు ఇప్పటికే విజయవంతమైన ఫలితాన్ని కలిగి ఉంది, కాబట్టి కొత్త AI రన్ అవసరం లేదు.
- `cached_stale` అంటే AI సేవ ఆఫ్లైన్లో ఉంది మరియు బ్యాకెండ్ తాజా అందుబాటులో ఉన్న చారిత్రక ఫలితాన్ని అందించింది.
- `is_latest_ai_version` విలువ false అయితే, ఫలితాన్ని ఉపయోగించగలిగే కానీ సమీక్షించాల్సిన చారిత్రక డేటాగా నిల్వ చేయండి.
- ప్రతి `done` టాస్క్ వినియోగించబడిన కోటాను ఊహించవద్దు; తనిఖీ `result_source`.
Task completion webhooks
- Send signed task completion events to your HTTPS endpoint with automatic retries.
- This API key is inactive. Existing records remain available, but new, enabled, test, and secret-rotation operations are blocked.
X-WaterMeter-Webhook-Id: whev_new_event X-WaterMeter-Webhook-Replay-Of: whev_original_event replay_of_event_id: whev_original_event blocked endpoint management: HTTP 409 canceled delivery status: canceled
GET/api/open/quota
/api/open/quotaప్రస్తుత కోటా మరియు మిగిలిన వినియోగాన్ని చదవండి.
curl -X GET "https://watermeterai.com/api/open/quota" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx"
{
"ok": true,
"email": "[email protected]",
"quota": {
"account_type": "free",
"daily_limit": 20,
"used": 3,
"remaining": 17,
"day_tag": "2026-06-01",
"is_unlimited": false,
"monthly_remaining": 0,
"monthly_bonus_remaining": 0,
"fixed_remaining": 0,
"nearest_expire_at": null,
"quota_summary_text": "Free daily quota: 3/20 used today. Remaining: 17."
}
}GET/api/open/ai-status
/api/open/ai-statusటాస్క్ సమర్పణ మరియు కాష్ చేసిన ఫలితాల ఫాల్బ్యాక్ కోసం పబ్లిక్ సర్వీస్ స్థితిని చదవండి.
curl -X GET "https://watermeterai.com/api/open/ai-status" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx"
{
"ok": true,
"is_online": true,
"busy": false,
"active_jobs": 0,
"public_status": "online",
"public_status_label": "online",
"public_status_reason": "ready",
"accepts_new_tasks": true,
"can_return_cached_result": true,
"queue_state": "idle",
"queue_count": 0,
"current_ai_version": "water_v2:wm-ai-v2-2026-06-01",
"last_checked_at": "2026-06-01T06:15:30Z"
}POST/api/open/tasks
/api/open/tasksఒక చిత్రాన్ని అప్లోడ్ చేయండి మరియు ఒకే టాస్క్ని సృష్టించండి.
curl -X POST "https://watermeterai.com/api/open/tasks" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx" \ -F "file=@D:\data\meter_001.jpg"
{
"ok": true,
"task_id": "8e6c4d1f8f8348c0bc53e2e39d2dc111",
"status": "queued",
"result_source": "pending",
"visibility": "private",
"ai_online": true,
"is_latest_ai_version": false,
"final_reading": "-",
"result_summary": {
"resultKind": "unknown",
"primaryLabel": "Result",
"primaryValue": "-",
"secondaryLabel": "Detail",
"secondaryValue": "-",
"summaryText": "No result is available yet."
},
"error_message": "",
"created_at": "2026-06-01T06:16:10Z"
}GET/api/open/tasks/{task_id}
/api/open/tasks/{task_id}ఒక పని స్థితి మరియు చివరి పఠనం చదవండి.
curl -X GET "https://watermeterai.com/api/open/tasks/task_a" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx"
{
"ok": true,
"task_id": "8e6c4d1f8f8348c0bc53e2e39d2dc111",
"status": "done",
"result_source": "fresh",
"ai_online": true,
"is_latest_ai_version": true,
"final_reading": "123.45",
"meter_type": "pointer",
"success": "yes",
"result_summary": {
"resultKind": "water_meter",
"primaryLabel": "Final Reading",
"primaryValue": "123.45",
"secondaryLabel": "Meter Type",
"secondaryValue": "pointer",
"summaryText": "Water meter recognition finished."
},
"error_message": "",
"created_at": "2026-06-01T06:16:10Z"
}GET/api/open/tasks
/api/open/tasksప్రస్తుత API కీ వినియోగదారుకు చెందిన ఇటీవలి టాస్క్లను చదవండి.
curl -X GET "https://watermeterai.com/api/open/tasks?limit=20" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx"
{
"ok": true,
"items": [
{
"task_id": "8e6c4d1f8f8348c0bc53e2e39d2dc111",
"status": "done",
"result_source": "cached_exact",
"final_reading": "123.45",
"meter_type": "pointer",
"success": "yes",
"result_summary": {},
"ai_online": true,
"is_latest_ai_version": true,
"created_at": "2026-06-01T06:16:10Z",
"error_message": ""
}
]
}POST/api/open/batches
/api/open/batchesఒక అభ్యర్థనలో బహుళ చిత్రాలను అప్లోడ్ చేయండి.
curl -X POST "https://watermeterai.com/api/open/batches" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx" \ -F "files=@D:\data\meter_001.jpg" \ -F "files=@D:\data\meter_002.jpg"
{
"ok": true,
"batch_id": "5a14f4e5f6d34fdabce00e62c0dd0001",
"status": "batch_running",
"total_count": 2,
"done_count": 0,
"failed_count": 0,
"pending_count": 2,
"items": [
{
"index": 0,
"file_name": "meter_001.jpg",
"task_id": "task_a",
"status": "queued",
"result_source": "pending",
"final_reading": "-",
"failure_kind": "",
"error_message": ""
},
{
"index": 1,
"file_name": "meter_002.jpg",
"task_id": "task_b",
"status": "queued",
"result_source": "pending",
"final_reading": "-",
"failure_kind": "",
"error_message": ""
}
]
}GET/api/open/batches/{batch_id}
/api/open/batches/{batch_id}బ్యాచ్ పురోగతి మరియు ప్రతి ఫైల్ టాస్క్ స్టేట్లను చదవండి.
curl -X GET "https://watermeterai.com/api/open/batches/5a14f4e5f6d34fdabce00e62c0dd0001" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx"
{
"ok": true,
"batch_id": "5a14f4e5f6d34fdabce00e62c0dd0001",
"status": "batch_done",
"total_count": 2,
"done_count": 2,
"failed_count": 0,
"pending_count": 0,
"items": [
{
"index": 0,
"file_name": "meter_001.jpg",
"task_id": "task_a",
"status": "done",
"result_source": "fresh",
"final_reading": "123.45",
"failure_kind": "",
"error_message": ""
},
{
"index": 1,
"file_name": "meter_002.jpg",
"task_id": "task_b",
"status": "done",
"result_source": "cached_exact",
"final_reading": "456.78",
"failure_kind": "",
"error_message": ""
}
]
}సిఫార్సు చేయబడిన ప్రవాహం
- పెద్ద పనిభారాన్ని పంపే ముందు `GET /api/open/ai-status`ని తనిఖీ చేయండి.
- సమర్పించిన వెంటనే `task_id` లేదా `batch_id`ని మీ స్వంత సిస్టమ్లో నిల్వ చేయండి.
- `queued`, `running`, `waiting_ai`, `batch_waiting_ai` మరియు `batch_running`ను తుది కాని స్థితులుగా పరిగణించి స్థితిని తనిఖీ చేస్తూ ఉండండి.
- బ్యాకెండ్కు నెట్వర్క్ మార్గంలో ఎక్కువ ఆలస్యం ఉండి, అమలు చేసిన సేవ బ్యాచ్ మోడ్కు మద్దతిస్తే బ్యాచ్ అభ్యర్థనలను ఉపయోగించండి.
- బ్యాచ్ అభ్యర్థనలు ప్రస్తుతం `webBackend -> dispatchCenter -> waterMeterAi` ద్వారా ప్రవహిస్తాయి.
- `batch_waiting_ai` అంటే ప్రతి అంశం ఇప్పటికీ AI సేవ కోసం వేచి ఉంది, ఇంకా చురుకుగా అమలు కావడం లేదు.
- అమలు చేసిన సేవ `CAD` అయితే, ప్రస్తుతానికి `POST /api/open/tasks`ను ఉపయోగించి బ్యాచ్ అప్లోడ్ అందుబాటులో లేదని పరిగణించండి.
ఎర్రర్ నోట్స్
- 400: చెల్లని అభ్యర్థన లేదా అమలు చేసిన సేవ బ్యాచ్ అప్లోడ్కు మద్దతివ్వదు.
- 401: API కీ లేదు, చెల్లదు, గడువు ముగిసింది లేదా నిలిపివేయబడింది.
- 403: the user account is not active, the key lacks the required scope, or the source IP is outside the key allowlist.
- 404: టాస్క్ లేదా బ్యాచ్ కనుగొనబడలేదు లేదా ప్రస్తుత వినియోగదారు స్వంతం కాదు.
- 413: ఫైల్ చాలా పెద్దది.
- 415: మద్దతు లేని చిత్ర రకం లేదా చెల్లని చిత్ర కంటెంట్.
- 429: quota exhausted or the API key request, submission, or concurrency limit was exceeded.
{
"detail": "batch upload is not supported for business: cax"
}{
"ok": false,
"error": "unauthorized",
"message": "Missing or invalid API key."
}{
"ok": false,
"error": "file_too_large",
"message": "Maximum file size is 20MB."
}{
"ok": false,
"error": "quota_exhausted",
"message": "Quota exhausted.",
"quota": {
"remaining": 0,
"quota_summary_text": "Free daily quota: 20/20 used today. Remaining: 0."
}
}వర్క్ఫ్లో పరీక్షించడానికి సిద్ధంగా ఉన్నారా?
మొదటి ఫోటో కోసం వెబ్ వర్క్స్పేస్ని ఉపయోగించండి, ఆపై ఫలితం ఫార్మాట్ మీ సిస్టమ్కు సరిపోయే తర్వాత API కీలకు తరలించండి.