{"uid":"cap_GAL7rE4jQM_o62UWxiWP1","slug":"api-production-853c-up-railway-app-0bc4a4b1","name":"MatrixFold X API Failure Explainer","description":"","url":"https://api-production-853c.up.railway.app/v1/explain-failure","method":"POST","headers":{},"bodySchema":{"type":"object","required":["platform","text"],"properties":{"text":{"type":"string","maxLength":6000,"minLength":1,"description":"AI agent social post body to validate for length, hashtags, links, emoji density, and publishing guardrails."},"title":{"type":"string","maxLength":160,"description":"Optional social post title to validate for platform rules."},"hashtags":{"type":"array","items":{"type":"string"},"maxItems":30,"description":"Hashtags to check for platform limits."},"platform":{"enum":["x","linkedin","xiaohongshu"],"type":"string","description":"Target social platform for post compliance validation: X/Twitter, LinkedIn, or Xiaohongshu."},"imageUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":20,"description":"Image URLs to check for platform image-count limits."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uR57F8QY4riyhOozkn8Ft","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies failed X (Twitter) create-post API responses into error categories and returns retry guidance and repair hints for AI agents","exampleAgentPrompt":"My agent just got a 403 error back from X's POST /2/tweets endpoint with the message 'You are not permitted to perform this action' — can you classify what kind of failure this is and tell me how to fix it or whether to retry?","exampleUseCases":null,"resultDescription":"Returns a structured JSON object containing the error category (one of: auth, permission, rate-limit, payload, media, duplicate, transient, or unknown), a plain-language explanation of the failure, retry guidance (whether and when to retry), and specific repair hints to fix the root cause before attempting again.","failureModes":["Missing or malformed failed X API response body — returns unknown classification","Unrecognized error format not matching any X API error schema — classified as unknown","Service unavailable on Railway hosting — 502/503 upstream error","Malformed request body to this endpoint — 400 bad request"],"whenToPreferThis":"Use this endpoint when an AI agent has already attempted to post to X via POST /2/tweets and received a failure response and needs structured triage before deciding whether to retry, repair the payload, or escalate. Ideal for autonomous agents running social publishing workflows who need programmatic error handling rather than raw HTTP status codes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:34:26.835Z","isFirstParty":false}