MiniToolAI फ्री चैटजीपीटी एपीआई आपको चैटजीपीटी का एपीआई मुफ्त में उपयोग करने की अनुमति देता है। यह परीक्षण, अनुसंधान या सीखने के उद्देश्यों के लिए उपयुक्त है और व्यावसायिक उपयोग के लिए नहीं है।
हमारा आधिकारिक एपीआई आज़माएँ: एपीआई दस्तावेज़
POST https://minitoolai.com/api/chatgpt/
Headers "Authorization: Bearer MINITOOLAI-API-KEY"
Body
[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello"}
]
import requests, json
url = "https://minitoolai.com/api/chatgpt/" #ending in "/"
headers = {
"Authorization": "Bearer MINITOOLAI-API-KEY",
"Content-Type": "application/json"
}
data = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "How can I help you today?"},
{"role": "user", "content": "What's the largest U.S. state by area?"}
]
response = requests.post(url, headers=headers, json=data, stream=True)
print(response.text)
'''
#Response:
data: {"reasoning_content": "..."}
data: {"content": "..."}
'''
import json
....
for line in response.iter_lines():
if line:
decode_line = line.decode("utf-8")
if decode_line.startswith("data: "):
try:
json_line = json.loads(decode_line[6:])
# reasoning_content
if "reasoning_content" in json_line:
reasoning = json_line["reasoning_content"]
print(reasoning, end="", flush=True)
# content
if "content" in json_line:
content = json_line["content"]
print(content, end="", flush=True)
except json.JSONDecodeError:
pass
import json
....
result = ""
reasoning_result = ""
for line in response.iter_lines():
if line:
decode_line = line.decode("utf-8")
if decode_line.startswith("data: "):
try:
json_line = json.loads(decode_line[6:])
# reasoning_content
if "reasoning_content" in json_line:
reasoning_result += json_line["reasoning_content"]
# content
if "content" in json_line:
result += json_line["content"]
except json.JSONDecodeError:
pass
print("=== REASONING ===")
print(reasoning_result)
print("\n=== CONTENT ===")
print(result)
एपीआई गलतियाँ कर सकता है, महत्वपूर्ण जानकारी की जाँच करें।
दर सीमा: प्रत्येक उपयोगकर्ता के लिए 100,000 अनुरोध/महीना।
वर्तमान में बीटा संस्करण में, साप्ताहिक रूप से अपडेट किया जाता है।
टैग: फ्री OpenAI एपीआई, फ्री चैटजीपीटी एपीआई, फ्री जीपीटी एपीआई, GPT-4o एपीआई फ्री
free gpt 5 api