વોટર મીટર 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
અપલોડ નિયમો
- મહત્તમ ફાઇલ કદ: પ્રતિ છબી 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એક છબી અપલોડ કરો અને એક કાર્ય બનાવો.
# 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 કી પર જાઓ.