वॉटर मीटर OCR API
वॉटर मीटर OCR API. यह पृष्ठ बाहरी सिस्टम इंटीग्रेशन के लिए वेबसाइट बैकएंड द्वारा उपलब्ध सार्वजनिक HTTP API का विवरण देता है।
निःशुल्क पंजीकरण करें और API कुंजी बनाएँ। सामान्य निःशुल्क खातों में प्रतिदिन पानी के मीटर की 20 रीडिंग पहचानने की सुविधा मिलती है; यह कोटा वेबसाइट और 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।
- बैकएंड केवल फ़ाइल एक्सटेंशन ही नहीं, बल्कि वास्तविक फ़ाइल सामग्री को मान्य करता है।
अपलोड आकार प्रवर्तन
- बैच अपलोड डिफ़ॉल्ट रूप से 8 छवियों तक स्वीकार करते हैं, प्रति छवि सीमा 20 एमबी और कुल फ़ाइल-सामग्री सीमा 20 एमबी है।
- एक फ़ाइल या बैच जो अपनी सीमा से अधिक है, छवि सत्यापन या कार्य निर्माण से पहले 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एक छवि अपलोड करें और एक एकल कार्य बनाएं।
# public_status_reason=maintenance -> HTTP 409 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एक अनुरोध में एकाधिक छवियाँ अपलोड करें।
# water_v3_foreign returns HTTP 409 unless the foreign service is enabled. curl -X POST "https://watermeterai.com/api/open/batches" \ -H "Authorization: Bearer wm_xxxxxxxxxxxxxxxxx" \ -F "business=water_v3_meter" \ -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 कुंजी बनाएँ।