API קרדיטים

חפש עלויות endpoint ובדוק את יתרת הקרדיטים שלך באופן תכנותי.

מקרי שימוש
תכנון תקציב

חשב עלויות לפני ביצוע קריאות API כדי לנהל את הוצאות הקרדיטים שלך.

שילוב לוח מחוונים

הצג יתרה ומידע עלויות בזמן אמת בפאנל הניהול שלך.

אוטומציה חכמה

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

99.9 % זמן פעילות
תגובה
20 req/s
0 קרדיטים / בקשה

Look up endpoint cost


POST https://api.yeb.to/v1/credits/cost
פרמטרסוגנדרשתיאור
api_key string כן Your API key
endpoint string אופציונלי Single endpoint key, e.g. youtube/channel/audit
endpoints array אופציונלי Array of up to 50 endpoint keys (use instead of endpoint)

דוגמה

curl -X POST https://api.yeb.to/v1/credits/cost \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "endpoint": "youtube/channel/audit"
}'

דוגמת תגובה

{
  "endpoint": "youtube/channel/audit",
  "credits": 0.01,
  "credits_spent": 0.0001,
  "credits_left": 142.5,
  "response_code": 200,
  "response_time_ms": 12
}
{"error":"Provide \"endpoint\" (string) or \"endpoints\" (array).","code":422}

קודי תגובה

קודתיאור
200 Successהבקשה עובדה בהצלחה.
400 Bad Requestאימות קלט נכשל.
401 Unauthorizedמפתח API חסר או שגוי.
403 Forbiddenמפתח לא פעיל או לא מורשה.
429 Rate Limitיותר מדי בקשות.
500 Server Errorכשל בלתי צפוי.

Look up cost

credits/cost 0.0001 credits

Parameters

API Key
body · string · required
Endpoint
body · string
Endpoints
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Check credit balance


POST https://api.yeb.to/v1/credits/balance
פרמטרסוגנדרשתיאור
api_key string כן Your API key

דוגמה

curl -X POST https://api.yeb.to/v1/credits/balance \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY"
}'

דוגמת תגובה

{
  "credits": 142.5,
  "credits_spent": 0.0001,
  "credits_left": 142.5,
  "response_code": 200,
  "response_time_ms": 8
}
{"error":"Cannot resolve user from API key.","code":401}

קודי תגובה

קודתיאור
200 Successהבקשה עובדה בהצלחה.
400 Bad Requestאימות קלט נכשל.
401 Unauthorizedמפתח API חסר או שגוי.
403 Forbiddenמפתח לא פעיל או לא מורשה.
429 Rate Limitיותר מדי בקשות.
500 Server Errorכשל בלתי צפוי.

Check balance

credits/balance 0.0001 credits

Parameters

API Key
body · string · required

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

API קרדיטים — Practical Guide

Look up how many credits any API endpoint costs and check your balance — all programmatically. Ideal for budget control, dashboards, and pre-flight checks before batch jobs.

#What the Credits API does

The Credits API lets you look up endpoint costs and check your balance without making an actual API call. Use it to build cost-aware workflows, display pricing in your UI, or validate you have enough credits before launching a batch job.

Each Credits API call costs only 0.0001 credits — essentially free.

#Endpoints

# POST /v1/credits/cost

  • Best for: Looking up the credit cost of any endpoint before calling it.
  • Single lookup: Send "endpoint": "youtube/channel/audit" to get one cost.
  • Bulk lookup: Send "endpoints": ["screenshot/capture", "qr/code"] for up to 50 at once.

# POST /v1/credits/balance

  • Best for: Checking your current credit balance from code.
  • Returns: Your total available credits.

#Quick start

# Look up a single endpoint cost
curl -X POST "https://api.yeb.to/v1/credits/cost" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -d '{"endpoint": "screenshot/capture"}'
# Bulk lookup (up to 50 endpoints)
curl -X POST "https://api.yeb.to/v1/credits/cost" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -d '{"endpoints": ["youtube/channel/audit", "qr/code", "geoip/city"]}'
# Check your balance
curl -X POST "https://api.yeb.to/v1/credits/balance" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <YOUR_API_KEY>"

#Parameters

Cost endpoint

Param Type Required Description
endpoint string One of the two Single endpoint key, e.g. youtube/channel/audit
endpoints array One of the two Array of up to 50 endpoint keys for bulk lookup

Balance endpoint

No extra parameters — just authenticate with your API key.

#Reading responses

Single cost lookup

{
  "endpoint": "youtube/channel/audit",
  "credits": 0.01,
  "credits_spent": 0.0001,
  "credits_left": 142.5,
  "response_code": 200,
  "response_time_ms": 12
}

Bulk cost lookup

{
  "costs": {
    "screenshot/capture": 0.05,
    "qr/code": 0.009,
    "chatbot/message": 0.05
  },
  "credits_spent": 0.0001,
  "credits_left": 142.5,
  "response_code": 200,
  "response_time_ms": 8
}

Balance response

{
  "credits": 142.5,
  "credits_spent": 0.0001,
  "credits_left": 142.5,
  "response_code": 200,
  "response_time_ms": 8
}

#Endpoint key format

Endpoint keys follow the pattern module/action. Here are some examples:

KeyCreditsAPI
youtube/channel/audit0.01YouTube Channel
screenshot/capture0.05Screenshot
qr/code0.009QR Code Generator
geoip/city0.009GeoIP
chatbot/message0.05ChatBot
bot/detect/detect0.003Bot Detect
captions/transcribe1Captions
Use the /v1/credits/cost endpoint itself to discover costs for any key — if a key doesn't exist, it returns null.

#Practical recipes

  • Pre-flight check: Call /balance before a batch job. If credits < estimated cost, abort early and notify.
  • Pricing page: Fetch all costs with /cost and display them dynamically — always in sync with reality.
  • Usage dashboard: Combine /balance with your transaction history to show spend over time.

#Errors

HTTPWhenWhat to do
422 Neither endpoint nor endpoints provided Send at least one of the two parameters.
422 More than 50 endpoints in array Split into multiple requests.
401 Invalid or missing API key Check your API key in X-API-Key header or api_key param.

#API Changelog

2026-02-07
Initial release — /cost (single + bulk) and /balance endpoints.

שאלות נפוצות

כמעט — כל קריאה עולה 0.0001 קרדיטים (למעשה חינם). זה מונע שימוש לרעה תוך שמירה על נגישות.

כן — שלח מערך "endpoints" עם עד 50 מפתחות endpoint וקבל את כל העלויות בתגובה אחת.

כן — העלויות נקראות ישירות מהתצורה החיה, כך שתמיד תקבל את התמחור הנוכחי.

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

צרו איתנו קשר ב-[email protected]. אנחנו מתייחסים למשוב ברצינות—אם דוח הבאג או בקשת הפיצ'ר שלכם משמעותיים, נוכל לתקן או לשפר את ה-API במהירות ולהעניק לכם 50 קרדיטים חינם כתודה.

זה תלוי ב-API ולפעמים אפילו ב-endpoint. חלק מה-endpoints משתמשים בנתונים ממקורות חיצוניים, שעשויים להיות בעלי מגבלות מחמירות יותר. אנחנו גם אוכפים מגבלות כדי למנוע שימוש לרעה ולשמור על יציבות הפלטפורמה. בדקו את התיעוד למגבלה הספציפית של כל endpoint.

אנחנו פועלים על מערכת קרדיטים. קרדיטים הם יחידות ששולמו מראש ואינן ניתנות להחזר, שאתם מוציאים על קריאות API וכלים. קרדיטים נצרכים בשיטת FIFO (הישנים ביותר קודם) ותקפים ל-12 חודשים מתאריך הרכישה. לוח הבקרה מציג כל תאריך רכישה ותפוגתו.

כן. כל הקרדיטים שנרכשו (כולל יתרות חלקיות) תקפים ל-12 חודשים מהרכישה. קרדיטים שלא נוצלו פגים אוטומטית ונמחקים לצמיתות בסוף תקופת התוקף. קרדיטים שפגו לא ניתנים לשחזור או להמרה למזומן או ערך אחר. כלל מעבר: קרדיטים שנרכשו לפני 22 בספט׳ 2025 מטופלים כאילו נרכשו ב-22 בספט׳ 2025 ופגים ב-22 בספט׳ 2026 (אלא אם צוין תאריך תפוגה מוקדם יותר ברכישה).

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

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

המחירים נקבעים בקרדיטים, לא בדולרים. לכל endpoint יש עלות משלו—ראו את תג "קרדיטים / בקשה" למעלה. תמיד תדעו בדיוק כמה אתם מוציאים.
← חזרה ל-APIs