WaterMeter AI

पानीको मिटर OCR API

पानीको मिटर OCR API. यस पृष्ठले तेस्रो-पक्ष एकीकरणको लागि वेबसाइट ब्याकइन्डद्वारा सार्वजनिक HTTP API कागजात गर्दछ।

Register for free and create an API key. Standard free accounts include 20 water meter recognitions per day, shared across the website and API. Your allowance resets daily; unused recognitions do not carry over. Paid, custom and cooperation accounts follow their actual quota policy.

वास्तविक अपलोडको साथ सुरू गर्नुहोस्

पहिले दर्ता गर्नुहोस्, कार्यक्षेत्रमा तपाईंको आफ्नै पानी मिटर फोटो अपलोड गर्नुहोस्, र त्यसपछि 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

अपलोड नियमहरू

  • अधिकतम फाइल साइज: प्रति छवि 20 एमबी।
  • समर्थित ढाँचाहरू: JPEG, PNG, WEBP।
  • ब्याकइन्डले वास्तविक फाइल सामग्री मान्य गर्दछ, केवल फाइल विस्तार मात्र होइन।

अपलोड साइज कार्यान्वयन

  • ब्याच अपलोडले पूर्वनिर्धारित रूपमा ८ छविहरू स्वीकार गर्दछ, २० एमबी प्रति-छवि सीमा र २० एमबी कुल फाइल-सामग्री सीमाको साथ।
  • एउटा फाइल वा ब्याच जसले यसको सीमा पार गर्दछ 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

हालको कोटा र बाँकी प्रयोग पढ्नुहोस्।

उदाहरण अनुरोध गर्नुहोस्
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

कार्य सबमिशन र क्यास-परिणाम फलब्याकको लागि सार्वजनिक सेवा स्थिति पढ्नुहोस्।

उदाहरण अनुरोध गर्नुहोस्
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

एउटा छवि अपलोड गर्नुहोस् र एकल कार्य सिर्जना गर्नुहोस्।

उदाहरण अनुरोध गर्नुहोस्
# 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}

एक कार्य स्थिति र अन्तिम पढाइ पढ्नुहोस्।

उदाहरण अनुरोध गर्नुहोस्
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 कुञ्जी प्रयोगकर्ताको स्वामित्वमा रहेको हालैका कार्यहरू पढ्नुहोस् ।

उदाहरण अनुरोध गर्नुहोस्
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

एक अनुरोधमा धेरै छविहरू अपलोड गर्नुहोस्।

उदाहरण अनुरोध गर्नुहोस्
# 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}

समूह प्रगति र प्रति-फाइल कार्य स्थितिहरू पढ्नुहोस् ।

उदाहरण अनुरोध गर्नुहोस्
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.
400 ब्याच अपलोड उपलब्ध छैन
{
  "detail": "batch upload is not supported for business: cax"
}
401 कुञ्जी हराएको वा अवैध API
{
  "ok": false,
  "error": "unauthorized",
  "message": "Missing or invalid API key."
}
413 फाइल धेरै ठूलो छ
{
  "ok": false,
  "error": "file_too_large",
  "message": "Maximum file size is 20MB."
}
429 कोटा समाप्त भयो
{
  "ok": false,
  "error": "quota_exhausted",
  "message": "Quota exhausted.",
  "quota": {
    "remaining": 0,
    "quota_summary_text": "Free daily quota: 20/20 used today. Remaining: 0."
  }
}

कार्यप्रवाह परीक्षण गर्न तयार हुनुहुन्छ?

पहिलो फोटोको लागि वेब कार्यक्षेत्र प्रयोग गर्नुहोस्, त्यसपछि परिणाम ढाँचा तपाईंको प्रणालीमा फिट भएपछि API कुञ्जीहरूमा सार्नुहोस्।