লোরেম ইপসাম জেনারেটর
পাতার বিন্যাস পরীক্ষা করতে নমুনা অনুচ্ছেদ তৈরি করুন।
বেস URL: https://happytails.ai · পাবলিক API সংযুক্ত নেই
প্রক্রিয়াকরণ
API-তে অনুরোধ পাঠালে আপনার দেওয়া তথ্য সার্ভারে প্রক্রিয়া করা হয়।
অনুরোধের প্যারামিটার
একটি JSON অবজেক্ট পাঠান। অচেনা প্রপার্টি থাকলে অনুরোধটি প্রত্যাখ্যান করা হয়। কোনো অপশন বাদ দিলে নিচে দেওয়া ডিফল্ট মান ব্যবহৃত হয়। সংখ্যা ও বুলিয়ান মান উদ্ধৃতি চিহ্ন ছাড়া JSON মান হিসেবে লিখুন।
টেক্সট ইনপুটের প্রয়োজন নেই। নিচের সেটিংস ব্যবহার করুন।
এই এন্ডপয়েন্টে files অ্যারে গ্রহণ করা হয় না।
বিকল্প
options.nnumberঅনুচ্ছেদ
সফল অনুরোধের প্রতিক্রিয়া
HTTP 200 প্রতিক্রিয়ায় tool ও result থাকে। পাঠ্য থাকে result.text-এ। পার্স করা JSON-ও result.data-এ থাকতে পারে। তৈরি ফাইলগুলো result.files-এ থাকে এবং প্রতিটিতে name, mime, bytes ও base64 থাকে। সংরক্ষণের আগে বাইটগুলো ডিকোড করুন। কোনো অপারেশন অন্য ধরনের ফল দিলে ফাইলের অ্যারে খালি থাকা এবং পাঠ্যের মান null হওয়া বৈধ।
আউটপুটের সম্পূর্ণ স্কিমা
{
"type": "object",
"required": [
"tool",
"result"
],
"properties": {
"tool": {
"type": "string"
},
"result": {
"type": "object",
"required": [
"text",
"files"
],
"properties": {
"text": {
"type": [
"string",
"null"
]
},
"data": {
"description": "Parsed JSON when the textual result is JSON."
},
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"mime",
"bytes",
"base64"
],
"properties": {
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"base64": {
"type": "string",
"contentEncoding": "base64"
}
}
}
}
}
}
}
}সীমা ও ত্রুটি
এই এন্ডপয়েন্টে নিচের সীমাগুলো প্রযোজ্য। কাজের বিবরণে দেওয়া ফরম্যাট, পৃষ্ঠা, সময়কাল ও মডেল সংক্রান্ত অতিরিক্ত সীমাও প্রযোজ্য। ব্রাউজারের ইন্টারফেসের সীমা API-এর সীমা থেকে ভিন্ন হতে পারে।
request_bytes- 8388608
input_characters- 1000000
files_bytes- 5242880
max_files- 0
timeout_seconds- 12
অবৈধ অনুরোধে error অবজেক্ট ফেরত আসে, যাতে code ও message থাকে। দেখুন HTTP স্ট্যাটাস, পুনরায় চেষ্টা, সময়সীমা ও একসঙ্গে একাধিক অনুরোধ। অনুরোধের কাজ শেষ হলে একই উত্তরে ফলাফল ফেরত আসে।
অনুরোধের সম্পূর্ণ স্কিমা
JSON স্কিমা খুলুন
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"maxLength": 1000000,
"default": "",
"description": "Plain text input. File tools use files instead unless otherwise documented."
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"n": {
"type": "number",
"description": "Paragraphs",
"default": 3.0,
"minimum": 1,
"maximum": 100,
"multipleOf": 1
}
}
}
}
}ব্রাউজারে কাজ স্বয়ংক্রিয় করতে কেন্দ্রীয় WebMCP নির্দেশিকা ব্যবহার করে দেখুন ব্রাউজারটি আসলে কোন টুলগুলো উপলভ্য করে।
curl https://happytails.ai/api/v1/tools/lorem-ipsum/run \
-H "Content-Type: application/json" \
--data '{"input": "", "options": {}}'const payload = {
"input": "",
"options": {}
};
const response = await fetch(
"https://happytails.ai/api/v1/tools/lorem-ipsum/run",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}
);
const data = await response.json();
if (!response.ok) throw new Error(data.error.message);
console.log(data.result);import json
from urllib.request import Request, urlopen
payload = json.loads('{"input": "", "options": {}}')
request = Request(
"https://happytails.ai/api/v1/tools/lorem-ipsum/run",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
with urlopen(request, timeout=200) as response:
result = json.load(response)
print(result){
"input": "",
"options": {}
}আপনার অ্যাপ্লিকেশন অনুযায়ী API-এর অরিজিন ও ইনপুটের মান বদলান।
{
"tool": "lorem-ipsum",
"result": {
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"files": [],
"name": "result.txt",
"mime": "text/plain;charset=utf-8"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Unknown request property. See the tool input schema."
}
}