AI Integration
Claude, ChatGPT, Cursor, और GitHub Copilot जैसे AI assistants का उपयोग करके 2328.io को अपने application में मिनटों में integrate करें।
2328.io documentation LLM-friendly बनाई गई है। आप पूरे API reference को किसी भी आधुनिक AI assistant को सौंप सकते हैं और अपनी पसंद की language में — PHP, Node.js, Python, Go, Rust — काम करने वाला integration घंटों के बजाय मिनटों में generate करवा सकते हैं।
यह page बताता है कि इसे efficiently कैसे करें।
Integrate करने के लिए AI का उपयोग क्यों करें
- तेज़ onboarding — boilerplate skip करें, सीधे business logic पर कूदें
- सही signing — AI किसी भी language में HMAC-SHA256 signing को विश्वसनीय रूप से reproduce करता है
- Webhook handlers — out of the box सिग्नेचर verification और idempotent handlers generate करें
- Up-to-date — हमारा
llms-full.txtहर docs update पर regenerate होता है, इसलिए आपको हमेशा वर्तमान schemas मिलते हैं
Machine-readable docs
हम llmstxt.org standard के अनुसार तीन endpoints publish करते हैं:
| Endpoint | Purpose |
|---|---|
/llms.txt | सभी docs का link सहित संक्षिप्त index |
/llms-full.txt | एक single file के रूप में पूर्ण documentation — इसे अपने AI chat में paste करें |
/md/{locale}/{slug} | किसी भी page को raw Markdown के रूप में |
प्रत्येक HTML page उसके Markdown संस्करण की ओर इशारा करते हुए <link rel="alternate" type="text/markdown"> भी expose करता है, ताकि AI crawlers इसे automatically discover कर सकें।
Claude या ChatGPT के साथ Quick start
Step 1 — Docs प्रदान करें
एक नया chat खोलें और llms-full.txt की सामग्री को अपने पहले message के रूप में paste करें, या यदि model इसे fetch कर सकता है तो बस link share करें।
Step 2 — अपना stack describe करें
Assistant को बताएँ कि आप क्या बना रहे हैं:
I'm building a Laravel 11 application. I need to:
1. Create a payment for an order (amount in USD, user pays in USDT TRC20)
2. Handle the webhook and credit the user's balance
3. Store payment records in a `payments` table
Use the 2328.io API above. Include HMAC signing, webhook signature
verification, and idempotency.Step 3 — Review और test करें
Assistant एक controller, एक service class, और एक webhook handler produce करेगा। Ship करने से पहले:
- Verify करें कि
apiSign()body को HMAC-SHA256 से पहले Base64 के रूप में encode करता है - जाँचें कि webhook handlers signatures की तुलना के लिए
hash_equals()(न कि===) call करते हैं - सुनिश्चित करें कि handler idempotent है — credit करने से पहले
order_id/txidजाँचें - पहले dev environment पर एक छोटे real payment के साथ test करें
Signing और webhook verification logic की समीक्षा किए बिना AI-generated payment code कभी ship न करें। ये critical security boundaries हैं।
IDE integrations
Cursor
Docs को Cursor settings में एक custom docs source के रूप में जोड़ें:
Settings → Features → Docs → Add new doc
URL: https://doc.2328.ioफिर chat में, अपने प्रश्न के सामने @2328.io लगाएँ:
@2328.io generate a webhook handler in Next.js App Router
with signature verification and idempotent credit logicGitHub Copilot
Copilot Chat llms-full.txt को सीधे read कर सकता है:
#fetch https://doc.2328.io/llms-full.txt
Using the 2328.io API docs above, implement a payout endpoint
in Express that withdraws USDT BEP20 to a user-supplied address.Windsurf / Continue / अन्य assistants
कोई भी assistant जो URL context या file attachment support करता है उसी तरह काम करता है — llms-full.txt attach करें और अपने लक्ष्य का वर्णन करें।
Claude API (Agent SDK)
यदि आप अपना खुद का agent या chatbot बना रहे हैं जिसे 2328.io के साथ interact करना है, तो docs को system prompt में एक बार inject करें:
from anthropic import Anthropic
import urllib.request
docs = urllib.request.urlopen(
"https://doc.2328.io/llms-full.txt"
).read().decode()
client = Anthropic()
response = client.messages.create(
model="claude-opus-4-7",
max_tokens=4096,
system=f"""You are an integration assistant for 2328.io.
Use the API reference below to answer questions and generate code.
<docs>
{docs}
</docs>""",
messages=[
{"role": "user", "content": "Write a Python function that creates a USDT payment"}
],
)
print(response.content[0].text)पूर्ण docs file ~15 KB है — किसी भी आधुनिक model के context limit से काफी कम। आप इसे अपनी ओर से cache कर सकते हैं और दिन में एक बार refresh कर सकते हैं।
अच्छी तरह काम करने वाले example prompts
llms-full.txt share करने के बाद इन्हें Claude, ChatGPT, या अपने AI IDE में copy करें:
Full backend integration:
Build a Node.js + Express service that exposes two routes:
- POST /checkout → creates a 2328.io payment and returns the payment URL
- POST /webhook/2328 → verifies the signature and marks the order as paid
Use TypeScript, Zod for validation, and a simple in-memory store.Payout tool:
Write a CLI in Go that takes a currency, network, amount, and address
and creates a payout via the 2328.io Payout API. Use a separate payout
API key from env. Poll the status endpoint until the payout is completed.Static wallet for user deposits:
I have a Django app where users deposit USDT TRC20 to top up their balance.
Each user should have a permanent deposit address. Implement this using
2328.io static wallets, including the webhook handler that credits their
balance when a deposit arrives.AI-assisted integration के लिए best practices
llms-full.txtसे शुरू करें — यह LLM context के लिए designed है, कोई boilerplate नहीं- अपने stack के बारे में specific रहें — framework, language version, ORM
- Tests के लिए कहें — AI signing logic के लिए unit tests generate करने में अच्छा है
- Error handling को double-check करें — AI कभी-कभी failure paths को skip कर देता है
- सिग्नेचर code की manually समीक्षा करें — यह एकमात्र हिस्सा है जो बिल्कुल सही होना चाहिए
- समय-समय पर refresh करें — यदि हमारा API बदलता है, तो
llms-full.txtको फिर से fetch करें और re-prompt करें