# badhttp Chat Completions — Intentionally Misbehaving LLM Endpoint

> badhttp Chat Completions — Intentionally Misbehaving LLM Endpoint is a paid API for AI agents from badhttp.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

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.

## Facts

- Endpoint: POST https://badhttp.dev/v1/chat/completions?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/badhttp-chat-completions-intentionally-misbehaving-llm-endpoint-146f0df2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tWFLIMTg9yvvl3NrLj_Hu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability badhttp-chat-completions-intentionally-misbehaving-llm-endpoint-146f0df2 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "messages": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/badhttp-chat-completions-intentionally-misbehaving-llm-endpoint-146f0df2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from badhttp.dev](https://www.zero.xyz/host/badhttp.dev/llms.txt)
