{"uid":"cap_tWFLIMTg9yvvl3NrLj_Hu","slug":"badhttp-chat-completions-intentionally-misbehaving-llm-endpoint-146f0df2","name":"badhttp Chat Completions — Intentionally Misbehaving LLM Endpoint","description":"A stateless catalogue of HTTP edge cases for testing clients, SDKs and agents: slow responses, broken JSON, redirect loops, truncated bodies, flaky endpoints, and x402 paywalls that misbehave.","url":"https://badhttp.dev/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"messages":{"type":"string"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-…","x402":{"paid":true,"network":"eip155:8453","amount_usd":0.002,"transaction":"0x…"},"model":"@cf/openai/gpt-oss-20b","usage":{"total_tokens":0,"prompt_tokens":0,"completion_tokens":0},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"…"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_J_4aAci4HmCH0CGKnbasU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides a chat completions endpoint that deliberately misbehaves (slow responses, broken JSON, flaky behavior, x402 paywalls) to test how clients, SDKs, and agents handle HTTP edge cases.","exampleAgentPrompt":"Send a message to the badhttp chat completions endpoint — it's supposed to misbehave — and tell me exactly what broken response or error we get back so I can see how our SDK handles it.","exampleUseCases":[{"title":"SDK retry logic stress test","prompt":"Hit the badhttp chat completions endpoint with the message 'hello' and show me every error, delay, or malformed response it throws back — I want to make sure our SDK's retry logic handles all the edge cases correctly."},{"title":"x402 paywall integration test","prompt":"Run a test call through the badhttp chat completions endpoint and confirm that the x402 payment of 0.002 USDC goes through on Base mainnet and that we get a valid paid response back with a transaction hash."},{"title":"Agent resilience validation","prompt":"I need to verify our AI agent doesn't crash when it hits a flaky LLM endpoint — can you send a chat message to badhttp's completions API and log exactly how it responds, including any broken JSON or truncated body?"}],"resultDescription":"A JSON chat completion object in OpenAI-compatible format, including an 'x402' field confirming payment (paid status, Base network, 0.002 USD amount, transaction hash), model identifier, token usage counts, and a choices array with an assistant message and finish_reason. The response may intentionally be malformed, truncated, slow, or erroneous depending on the endpoint's misbehavior mode.","failureModes":["Intentionally slow response — endpoint may time out or stall indefinitely to test client timeouts","Broken/malformed JSON — response body may not parse, testing client error handling","Truncated body — response may be cut off mid-stream to test incomplete-response handling","Redirect loops — endpoint may redirect repeatedly, testing client redirect-following limits","Flaky 5xx errors — random server errors to test retry and backoff logic","x402 payment failure — payment may be rejected or paywall may misbehave intentionally","Invalid or missing fields in response — response schema may deviate from OpenAI spec deliberately"],"whenToPreferThis":"Choose this endpoint when you need to test client-side resilience, SDK robustness, or agent error-handling against a real HTTP endpoint that intentionally surfaces edge cases — slow responses, broken JSON, redirect loops, truncated bodies, and x402 paywalls. Prefer it over mocking when you want a live, stateless, network-reachable chaos endpoint without standing up your own infrastructure. Especially useful for validating x402 micropayment client implementations end-to-end.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:30:24.926Z","isFirstParty":false,"canonicalSlug":"badhttp-chat-completions-intentionally-misbehaving-llm-endpoint-146f0df2"}