happytails.ai
עברית
מדריך עזר ל-API

מחולל לורם איפסום

צרו פסקאות של טקסט זמני כדי לבדוק את פריסת העמוד.

POST/api/v1/tools/lorem-ipsum/run

כתובת URL בסיסית: https://happytails.ai · ה־API הציבורי אינו מחובר

עיבוד

בעת שליחת בקשת API, נתוני הקלט שלכם מעובדים בשרת.

פרמטרים של הבקשה

שלחו אובייקט JSON. מאפיינים לא מוכרים יידחו. אפשרויות שלא צוינו יקבלו את ערכי ברירת המחדל המופיעים בהמשך. יש להזין מספרים וערכים בוליאניים כערכי JSON ללא מירכאות.

אין צורך בקלט טקסט. השתמשו בהגדרות שלהלן.

נקודת הקצה הזו אינה מקבלת מערך files.

אפשרויות

options.nnumber

פסקאות

ברירת מחדל: 3.0 · מינימום: ⁦1⁩ · מקסימום: ⁦100⁩ · גודל צעד: ⁦1⁩

תגובה לבקשה שהצליחה

תשובת 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": {}}'

יש להחליף את כתובת המקור של ה־API ואת ערכי הקלט בערכים המתאימים ליישום שלך.

200 OK · דוגמה שמורה
{
  "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"
  }
}
400 · בקשה לא תקינה
{
  "error": {
    "code": "INVALID_INPUT",
    "message": "Unknown request property. See the tool input schema."
  }
}