API का उपयोग कैसे करें: GLM 4.6 Derestricted v5 API
-
API key प्राप्त करें: अपने Muapi डैशबोर्ड में एक key बनाएँ।
-
प्रॉम्प्ट भेजें: prompt को POST करें (वैकल्पिक system_prompt और max_tokens सहित, अधिकतम 32768 तक) को /api/v1/glm-4-6-derestricted-v5.
curl -X POST https://api.muapi.ai/api/v1/glm-4-6-derestricted-v5 \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers."}'
- Poll or stream:
status के completed होने तक GET /api/v1/predictions/{request_id}/result पोल करें, या टोकन लाइव स्ट्रीम करें: /api/v1/glm-4-6-derestricted-v5/stream.
curl -X POST https://api.muapi.ai/api/v1/glm-4-6-derestricted-v5/stream \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain how attention works in transformers."}'
- नतीजा देखें: जनरेट किया गया टेक्स्ट
outputs में मिलता है। शुल्क वास्तविक टोकन संख्या के आधार पर लिया जाता है।