API

पासवर्ड API संदर्भ

api.password.es का संदर्भ: हर पैरामीटर, प्रतिक्रिया का हर फ़ील्ड, हर त्रुटि कोड और सीमाएँ। उदाहरण जैसे हैं वैसे ही टर्मिनल में चिपकाए जा सकते हैं।

अगर आप यह ढूँढ़ रहे हैं कि यह क्या है, किसके लिए है और कब इसे नहीं इस्तेमाल करना चाहिए, तो API के पन्ने से शुरू करें।

एंडपॉइंट

सब कुछ https://api.password.es के नीचे है। दो जवाब देते हैं और एक अभी नहीं — और वह एक अपनी ही प्रतिक्रिया में यह कह देता है।

पासवर्ड बनाना

बॉडी वैकल्पिक है: उसके बिना चारों तरह के वर्णों के साथ 16 वर्ण निकलते हैं। उसके साथ, जो आप माँगें।

अनुरोध
curl -X POST https://api.password.es/v1/generate \
  -H 'content-type: application/json' \
  -d '{"length":20,"exclude_ambiguous":true}'
प्रतिक्रिया
{
  "passwords": [
    "P#f.aK+w4pcsx]}Gx;*>"
  ],
  "analysis": {
    "length": 20,
    "pool": 83,
    "bits": 127.50078862693852,
    "log10_guesses": 38.08053185185735,
    "crack_time_log10_seconds": 26.08053185185735,
    "crack_time": {
      "value": "3.8 × 10¹⁸",
      "unit": "years"
    },
    "level": 4,
    "level_scale": "time",
    "ceiling": false
  },
  "notice": "Generated on someone else's machine, which is a security antipattern even though we store nothing. For a password you will actually use, the generator at https://password.es/en/ runs entirely in your browser and sends nothing.",
  "_meta": {
    "plan": "anonymous",
    "lang": {
      "messages": "en",
      "links": "en"
    },
    "limits": {
      "burst": {
        "limit": 60,
        "window_seconds": 60
      }
    },
    "quota": {
      "limit": null,
      "remaining": null,
      "reset": "2026-09-01T00:00:00.000Z"
    },
    "docs": "https://password.es/api/"
  }
}

पैरामीटर

सभी वैकल्पिक। तालिका अंग्रेज़ी में है और अठारहों भाषाओं में एक जैसी है, जानबूझकर: जो कोई API जोड़ता है वह फ़ील्ड के नाम जैसे लिखे हैं वैसे ही टाइप करता है, और exclude_ambiguous के अठारह अनुवाद दायरा नहीं, कर्ज़ होते।

FieldTypeDefaultNotes
lengthinteger 4–6416How many characters. The same range as the generator on this site.
countinteger 1–201How many passwords to return. passwords is always an array, including with count 1.
lowerbooleantrueInclude a–z (26 characters).
upperbooleantrueInclude A–Z (26 characters).
digitsbooleantrueInclude 0–9 (10 characters).
symbolsbooleantrueInclude ~!@#$%^&*()_+-=[]{};:,./<>? — the same 27 as the slider on the home page, no more.
exclude_ambiguousbooleanfalseDrops 0 O 1 I l | o. Six of them in practice, not seven: | is not in the symbol set to begin with. That is why pool reads 83 above instead of 89.
no_repeatsbooleanfalseAvoids adjacent repeated characters. Not an absolute guarantee: it retries ten times, exactly as the web generator does. At length 64 that lets a repeat through about 0.1% of the time.
langstringenWhich language to answer in. One of the site's eighteen. Also accepted as ?lang= in the URL, which wins over this field; without either, Accept-Language is read. An unknown value is not an error — it falls back to English. See the section below: messages exist in English and Spanish, links in all eighteen.

हर आँकड़े का मतलब

वही सोच: संदर्भ अंग्रेज़ी में, व्याख्या साथ में। इनमें से कोई आँकड़ा नया नहीं है — सब उसी इंजन से निकलते हैं जो मुखपृष्ठ का मीटर बनाता है।

FieldNotes
passwordsAn array of strings, always — including with count 1.
analysis.lengthHow many characters came back.
analysis.poolThe size of the alphabet the password was drawn from.
analysis.bitsH = L·log2(N), the same formula as the home page. With no_repeats it becomes log2(N)+(L-1)·log2(N-1).
analysis.log10_guessesThe expected work, as a base-10 logarithm: half the keyspace.
analysis.crack_time_log10_secondsAt 1012 guesses/s, offline, fast hash. The same attack model as the rest of the site.
analysis.crack_timeThe same figure in words. unit follows the answer language: years, años
analysis.level0–4. The same scale as the checker, ever since the site unified the two it used to have.
analysis.level_scale"time". Says where the level came from, so that a future divergence is visible instead of having to be inferred by comparing numbers.
analysis.ceilingfalse: the server generated the password, so the figure is exact and not a ceiling. The same flag the checker uses.
noticeThe antipattern warning, in every single response.
_meta.plan"anonymous". The only lane there is; the others arrive with accounts.
_meta.lang{ "messages", "links" } — which language each half actually came back in. They can differ, and that is why the API says so instead of leaving you to guess.
_meta.limits.burstThe rate limit actually enforced: limit requests per window_seconds.
_meta.quotaThe reserved daily-quota slot. limit and remaining are null because nobody counts daily requests yet.
_meta.docsA link back to the documentation.

प्रतिक्रिया की भाषा

डिफ़ॉल्ट रूप से यह अंग्रेज़ी में जवाब देता है, क्योंकि बिना कुछ कहे जोड़ने वाला यही उम्मीद करता है। इसे तीन तरह से बदला जाता है, और टकराव हो तो पहला जीतता है: URL में ?lang=, बॉडी में "lang", और Accept-Language हेडर।

यहाँ एक विषमता है जो जान लेनी चाहिए: संदेश अंग्रेज़ी और स्पेनी में हैं; लिंक, साइट की अठारहों भाषाओं में। जर्मन माँगने पर लिंक जर्मन में आएँगे और संदेश फिर भी अंग्रेज़ी में।

अनुरोध
curl -X POST 'https://api.password.es/v1/generate?lang=de' \
  -H 'content-type: application/json' \
  -d '{"length":20}'
प्रतिक्रिया
"_meta": {
  "lang": { "messages": "en", "links": "de" }
}

अंदाज़ा लगाने की ज़रूरत नहीं: हर प्रतिक्रिया _meta.lang में बताती है कि किस आधे पर क्या लागू हुआ। और जो भाषा है ही नहीं वह त्रुटि नहीं है — वह अंग्रेज़ी पर आ जाती है, और _meta.lang यह कह देता है।

पासवर्ड जाँचना: अभी नहीं

/v1/check 501 लौटाता है। यह न बग है न चूक: जानबूझकर ऐसा है, और प्रतिक्रिया बताती है कि क्या कमी है और तब तक कहाँ जाएँ। checker_url उसी भाषा में साइट के जाँचकर्ता की ओर इशारा करता है जो आपने माँगी।

अनुरोध
curl -X POST https://api.password.es/v1/check \
  -H 'content-type: application/json' \
  -d '{"password":"x"}'
प्रतिक्रिया
{
  "error": "not_implemented",
  "message": "/v1/check does not exist yet. Returning the same numbers as the password.es checker requires its very same pattern engine, and that costs between 11 ms and 3.6 s of CPU per request depending on the input: it is waiting on a plan cap decision and on a length cap. Meanwhile the web checker does exactly this in your browser, sending nothing: https://password.es/en/checker/",
  "checker_url": "https://password.es/en/checker/",
  "docs": "https://password.es/api/",
  "_meta": { "…": "igual que arriba" }
}

त्रुटियाँ

सबका आकार एक ही है: कोड के लिए एक छोटा error, सीधी भाषा में एक message —यही वह है जो एक AI सहायक अपने उपयोगकर्ता को पढ़कर सुनाता है—, कभी-कभी वह field जिसने इसे जगाया, एक docs और वही हमेशा वाला _meta

HTTPerrorNotes
400invalid_lengthlength outside 4–64. field names it.
400invalid_countcount outside 1–20. field names it.
400empty_alphabetAll four character types turned off, so there is no alphabet to draw from. No field: it is the combination, not one parameter.
400unknown_parameterA parameter this endpoint does not accept. field gives the offending name.
429rate_limitedOver 60 requests in a minute. Carries Retry-After and RateLimit-* headers, and limit / window_seconds in the body.
501not_implementedOnly from /v1/check. Carries checker_url, pointing at the web checker in the answer language.

सीमाएँ

एक ही, और वही सचमुच लागू होती है: प्रति IP प्रति मिनट 60 अनुरोध। इस पन्ने पर भरोसा करने की ज़रूरत नहीं: वह संख्या हर प्रतिक्रिया में, _meta.limits.burst के भीतर, साथ आती है।

सीमा पार होने पर जवाब 429 होता है, Retry-After और RateLimit-* हेडरों के साथ, और सीधी भाषा में एक संदेश जो बताता है कि क्या करें। उसमें पंजीकरण या क़ीमतों का कोई लिंक नहीं है, क्योंकि न पंजीकरण है न क़ीमतें।

_meta में एक quota खंड भी दिखेगा जिसके दोनों मान null हैं। यह जानबूझकर है: यह वह जगह है जो खातों के बनने के लिए रखी है, और खाली है क्योंकि आज कोई प्रतिदिन के अनुरोध नहीं गिनता। घोषित की गई और लागू न की गई सीमा, कोई सीमा न बताने से बुरी है।

MCP सर्वर

MCP वह प्रोटोकॉल है जिससे Claude या ChatGPT जैसे सहायक बाहरी उपकरणों का उपयोग करते हैं। इस पते को अपने सहायक से जोड़ें और वह पासवर्ड गढ़ने के बजाय इन्हीं संख्याओं के साथ बनाएगा। बिना पंजीकरण और बिना कुंजी के, और प्रति मिनट 60 अनुरोधों की वही सीमा।

यह एक स्टेटलेस सर्वर है, और यदि आप दूसरे MCP सर्वरों से आ रहे हैं तो यह जानना उपयोगी है: POST का उत्तर JSON में मिलता है और कोई स्ट्रीम नहीं खुलती, Mcp-Session-Id न भेजा जाता है न अपेक्षित है, अधिसूचना का उत्तर बिना बॉडी के 202 होता है, और GET 405 लौटाता है। 2025-06-18 विनिर्देश इसकी स्पष्ट अनुमति देता है।

curl -X POST https://api.password.es/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"generate_password",
                 "arguments":{"length":20,"lang":"es"}}}'

यह केवल एक उपकरण प्रकाशित करता है, generate_password, ऊपर की तालिका वाले पैरामीटर और साथ में langcheck_password_strength नहीं है और तब तक नहीं होगा जब तक /v1/check मौजूद नहीं है: जो उपकरण हमेशा त्रुटि लौटाता है वह उपकरण नहीं, सहायक की सूची में एक टूटा हुआ वादा है।

यह चेतावनी कि यह एक एंटीपैटर्न है, उपकरण के विवरण में और हर परिणाम में साथ जाती है। यह जानबूझकर है: यही वह वाक्य है जो सहायक अंततः पासवर्ड माँगने वाले को पढ़कर सुनाता है।

वह दस्तावेज़ जो मशीनें पढ़ती हैं

इस पन्ने के अलावा एक OpenAPI 3.1 विवरण भी है, और वह सचमुच प्रकाशित है: api.password.es/openapi.json। यही वह चीज़ है जिसे क्लाइंट जनरेटर, स्वतः पूर्ति वाला संपादक, या कोई एजेंट पढ़ता है ताकि बिना किसी के बताए जान सके कि कौन-से फ़ील्ड हैं। इसमें ऊपर की तालिका वाले वही पैरामीटर, त्रुटि कोड और खाली quota की वजह लिखी है।