الانتقال إلى الوثائق
فتح لوحة التحكم
في هذه الصفحة

الأخطاء وحدود الطلبات

افهم استجابات الأخطاء وأعد المحاولة بأمان واستأنف عمليات التوليد الفاشلة.

استجابة الخطأ#

تصف أخطاء HTTP طلبًا مرفوضًا. قد تفشل عملية محفوظة لاحقًا بينما تظل نقطة حالتها تعيد HTTP 200.

JSON
{  "error": {    "code": "REQUEST_INVALID",    "message": "Check the request fields and try again.",    "request_id": "e8aa0a87-6cd9-42eb-975a-b72bf43218c8",    "retryable": false  },  "request_id": "e8aa0a87-6cd9-42eb-975a-b72bf43218c8"}

الاستئناف#

HTTPالخطأالاستئناف
400طلب غير صالحREQUEST_INVALIDصحح الحقول المشار إليها في الخطأ قبل إعادة المحاولة.
401بيانات اعتماد غير صالحةCREDENTIAL_INVALIDتحقق من بيانات الاعتماد وانتهائها وما إذا أُلغيت.
402أرصدة غير كافيةINSUFFICIENT_CREDITSأضف أرصدة إلى الحساب المالك لبيانات الاعتماد ثم تابع العمل المحفوظ.
403الإذن مرفوضSCOPE_REQUIREDاستخدم بيانات اعتماد بالأذونات المطلوبة والوصول إلى المورد المحدد.
404المورد غير متاحRESOURCE_UNAVAILABLEتحقق من معرّف المورد وملكيته للحساب المصرح له.
409تعارض القصدIDEMPOTENCY_CONFLICTأعد استخدام القصد مع طلبه الأصلي فقط. استخدم UUID جديدًا لإجراء مختلف.
429تم بلوغ حد الطلباتRATE_LIMITEDانتظر المدة المحددة في Retry-After قبل إعادة الطلب نفسه.
503غير متاح مؤقتًاDEPENDENCY_UNAVAILABLEانتظر Retry-After وأعد المحاولة بالقصد نفسه. تحقق من العملية المحفوظة بعد انتهاء مهلة.

الخطأ#

JSON
{  "REQUEST_INVALID": "Check the request fields and try again.",  "TOOL_INPUT_INVALID": "The tool input does not match its public schema.",  "IDEMPOTENCY_KEY_REQUIRED": "Supply a UUID Idempotency-Key for this action.",  "IDEMPOTENCY_CONFLICT": "This intent was already used for different details.",  "CREDENTIAL_INVALID": "The credential is invalid, expired or revoked.",  "AUTHENTICATION_REQUIRED": "A valid credential is required.",  "SCOPE_REQUIRED": "The credential does not permit this action.",  "ACTION_FORBIDDEN": "This action is not permitted.",  "ORIGIN_DENIED": "This origin is not registered for the credential.",  "RESOURCE_UNAVAILABLE": "The requested resource is unavailable.",  "TOOL_UNAVAILABLE": "This tool is unavailable.",  "CURSOR_INVALID": "Refresh the list and try again.",  "ACTION_CHANGED": "The action or its target changed. Read its current state.",  "HUMAN_REVIEW_REQUIRED": "Review this action in the authenticated Tong dashboard.",  "REVIEW_EXPIRED": "This review expired. Read the current operation.",  "INSUFFICIENT_CREDITS": "Add credits to continue.",  "PAID_FEATURE_DEPOSIT_REQUIRED": "Complete the account deposit requirement to use this tool.",  "POLICIES_REQUIRED": "Accept the current account policies to continue.",  "ACCOUNT_UNAVAILABLE": "This account is unavailable.",  "RATE_LIMITED": "Too many requests. Retry after the indicated interval.",  "QUEUE_FULL": "The account work queue is full. Retry later.",  "WEBHOOK_LIMIT": "The account webhook limit has been reached.",  "WEBHOOK_DESTINATION_INVALID": "Use an allowed public HTTPS webhook destination.",  "QUOTE_INVALID": "The quote is invalid or does not match this request.",  "QUOTE_UNAVAILABLE": "The requested quote is unavailable.",  "EXPORT_NOT_READY": "The export is not ready for download.",  "EXPORT_TOO_LARGE": "Narrow the export interval or filters.",  "QUERY_TOO_LARGE": "Narrow the query interval or filters.",  "INTERVAL_INVALID": "Use a valid interval of at most 90 days.",  "UPLOAD_TOO_LARGE": "The upload exceeds the media purpose limit.",  "DEVELOPER_ACCESS_UNAVAILABLE": "Developer access is unavailable.",  "DEPENDENCY_UNAVAILABLE": "A required service is temporarily unavailable.",  "CATALOG_UNAVAILABLE": "The current model catalog is temporarily unavailable.",  "CONFIGURATION_INVALID": "Developer service configuration is unavailable."}

إعادة المحاولة والمهل#

احتفظ بمعرّف UUID واحد لكل إجراء وأعد استخدامه بعد انتهاء المهلة أو إعادة المحاولة. تُرفض المدخلات المختلفة بالمعرّف نفسه.

curl 'https://platform.tongai.io/v1/operations/by-intent/45be69f1-c266-4a09-a82c-bf3c6303eb03' \  -H "Authorization: Bearer $TONG_API_KEY"
الإعدادات
curl --version

حدود الطلبات#

HTTP
Retry-After: {seconds}active_queue_per_account: 100admissions_per_minute: owner=500, credential=180, client=1000HTTP_per_minute: owner=5000, credential=2000, client=10000, IP=1000query_interval_max_days: 90export_max_rows: 100000export_max_bytes: 33554432webhooks_per_account: 10webhook_delivery_attempts: 12

التزم بـ Retry-After. أعد المحاولة بعد الانتظار بالقصد نفسه عند الفشل المؤقت؛ لا تنشئ إجراءً مدفوعًا ثانيًا.